CodeAI

Toast

Brief elevated notification for lightweight feedback. Dismisses automatically in product UIs; chrome matches Figma Toast.

Appearance

Content

Layout & behavior

Props — Toast
View MUI docs
PropTypeDescription
sentiment"primary" | "pink" | "success" | "error" | "warning" | "info" | "neutral"Semantic color theme. primary = brand chrome.
childrenReactNodeBrief notification message.
iconNameFaIconName | falseLeading icon. Omit for sentiment default; false hides the icon; string overrides.
hasActionbooleanShow outlined secondary action button.
actionLabelReactNodeAction button label.
actionStartIconNameFaIconNameLeading icon on the action button.
actionEndIconNameFaIconNameTrailing icon on the action button.
onAction() => voidAction button click handler.
isDismissiblebooleanShow dismiss control.
onClose() => voidDismiss handler.
openbooleanControlled visibility for the snackbar host. Omit for inline/fixture surface-only render.
placement"topLeft" | "topCenter" | "topRight" | "bottomLeft" | "bottomCenter" | "bottomRight"Viewport corner/edge when hosted (MUI Snackbar anchorOrigin).
offsetnumberDistance in px from the pinned viewport edge(s).
surfaceOnlybooleanRender elevated chrome without the snackbar portal. Default when open is omitted.