Snackbar

Snackbars show short updates about app processes at the bottom of the screen.

Props

React props
NameTypeRequiredDefaultDescription
classNamestring | Partial<Record<"container" | "icon" | "snackbar" | "supportingText", string>> | ClassNameComponent<SnackbarInterface>NoRoot classes (string), static element classes (object), or state-aware element classes (function).
messagestringYesMessage announced through the snackbar.
openbooleanNoControlled open state.
defaultOpenbooleanNotrueInitial open state when uncontrolled. Defaults to `true`.
durationnumberNoAuto-dismiss delay in milliseconds. Omit to require an explicit close.
closeIconIconNoiCloseIcon for the built-in close button.
transitionTransitionNoMotion transition shared by every framework for the open/close height animation.
onOpenChange(open: boolean) => voidNoNotifies an accepted open-state request.