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>No—Root classes (string), static element classes (object), or state-aware element classes (function).
messagestringYes—Message announced through the snackbar.
openbooleanNo—Controlled open state.
defaultOpenbooleanNotrueInitial open state when uncontrolled. Defaults to `true`.
durationnumberNo—Auto-dismiss delay in milliseconds. Omit to require an explicit close.
closeIconIconNoiCloseIcon for the built-in close button.
transitionTransitionNo—Motion transition shared by every framework for the open/close height animation.
onOpenChange(open: boolean) => voidNo—Notifies an accepted open-state request.