Skip to content

ShowSnackbarOptions

ShowSnackbarOptions = object

Options of showSnackbar.

optional autoHideDuration?: number | null

Milliseconds before the snackbar hides on its own; null keeps it until it is closed. Defaults to 3000.


optional buttonLabel?: string

Label of the action button, which shows only together with onButtonClick.


optional close?: boolean

Whether to show the close button. Defaults to true.


optional key?: string

Makes the snackbar unique: while one with this key is shown, queued or still closing, showing it again does nothing. Without a key, every call shows a new snackbar.


optional onButtonClick?: () => void

Called when the action button is pressed; the snackbar closes after it.

void


optional onClose?: () => void

Called when the person closes the snackbar with the close button, not when it hides on its own or closeSnackbar closes it.

void


optional subtitle?: string

Shown as given, below the title.


title: string

Shown as given: translate it before passing it in.


variant: SnackbarVariant

Visual style of the @workflowbuilder/ui Snackbar.