Back to Alert
Alert

Controlled toast

Open/close a toast alert with external state.

API

PropTypeDefaultDescription
variant"soft" | "outlined" | "filled"softSurface style.
tone"default" | "success" | "warning" | "destructive"defaultSemantic color.
toastbooleanfalseWhen true, renders as a portaled toast instead of inline.
openbooleantrueControls visibility.
placement"top-left" | "top-right" | "top-center" | "bottom-left" | "bottom-right" | "bottom-center"top-rightFixed corner when `toast` is true.
durationnumber5000Auto-close delay (ms) in toast mode; 0 disables.
persistentbooleanfalseToast mode only — disables auto-close and outside-click dismiss.
pauseOnHoverbooleantruePauses auto-close while hovered in toast mode.
live"assertive" | "polite"assertiveInline default is assertive; toast default is polite.
titleReact.ReactNodeBold heading line.
actionReact.ReactNodeOptional action slot below the description.
iconReact.ReactNode | falseOverride the tone icon, or false to hide.
dismissible / onDismissboolean / () => voidClose button; defaults to true in toast mode.
View full API on Alert

More Alert examples