Snackbar

Snackbar presents transient status updates with optional action and dismiss affordances built from the same button primitives as the library.

Message archived

Props

NameDescriptionDefaultControl
actionLabelOptional

Label for the optional action button.

string | undefined
undefined
actionDisabledOptional

Whether the action button is disabled.

boolean | undefined
false
actionAutofocusOptional

Whether the action button should autofocus when rendered.

boolean | undefined
false
actionOnNewLineOptional

Whether the action should be placed on a separate line.

boolean | undefined
false
dismissibleOptional

Whether to show a dismiss button.

boolean | undefined
false
dismissButtonLabelOptional

Accessible label for the dismiss button.

string | undefined
"Dismiss notification"

Events

NameTypeDescription
action[]-
dismiss[]-

Slots

NameParametersDescription
default-Supporting text content for the snackbar.
action-Optional custom action content.
dismiss-Optional custom dismiss content.

Default

Message archived

Options

Supporting text only
Action only
Dismiss only
Action and dismiss
Disabled action

Combinations

Single-line
File moved to trash
Single-line with action
File moved to trash
Two lines
Your changes were saved locally and will sync when the connection is available again.
Two lines with longer action
Your changes were saved locally and will sync when the connection is available again.