A snackbar component is used to provide feedback about an operation by showing a brief message at the bottom of the screen.
The component integrates with the
Invoker Commands API:
an Ignite button or a native <button> with command="--show" / "--hide" /
"--toggle" and commandfor pointing to this element will call the
corresponding method declaratively without any JavaScript.
- Slots
-
default— Default slot to render the snackbar content. -
action— Renders the action part of the snackbar. Usually an interactive element (button).
- CSS Parts
-
base— The base wrapper of the snackbar component. -
message— The snackbar message. -
action— The default snackbar action button. -
action-container— The area holding the actions.
Properties
Section titled "Properties"actionText
Section titled "actionText"The text of the action button.
actionText: string | undefined Events
Section titled "Events"onAction
Section titled "onAction"Emitted when the snackbar action button is clicked.
onAction(args: CustomEvent<void>): void Parameters
- args:
CustomEvent<void>