Toast options
Every option a toast accepts, with its type and default.
Pass these as the second argument to toast(), or as defaults in
<Toaster toastOptions>, where they can also be grouped by type
(success, error, info, warning, loading, blank, custom). A toast’s own options win.
Content
idstringReuse an id to update that toast in place
descriptionReactNodeA second, quieter line under the message
iconReactNode, or (toast) => ReactNodeReplaces the built-in icon;
null hides iticonTheme{ primary, secondary }primary colours the built-in glyph and spinneraction{ label, onPress, color?, countdown? }A trailing button; the toast dismisses after
onPress. countdown: true drains a ring around it over the time leftcancel{ label, onPress, color? }A quieter button before
action, for “Cancel / Delete” pairscloseButtonbooleanA trailing × button
closeButtonColorstringColour of the ×
avatarimage source or ReactNodeA round picture in place of the icon
timestampstringSmall text at the end of the first line (“now”, “2/4”)
expandable{ content, label?, defaultExpanded? }A toggle that shows more below; the toast pauses while open
Progress
progressnumber (0 to 1) or 'indeterminate'Shows a bar; prefer
toast.progress, which updates on the UI threadprogressStyle'bar' or 'ring'A bar along the bottom edge, or a ring around the icon
progressSegmentsnumberSplits the bar into steps
Timing and placement
durationnumber, 'short', 'long' or 'infinite'Milliseconds, or 2000 / 4500 / never
positionToastPositionOne of the six positions
toasterIdstringWhich Toaster shows it
dedupeKeystringSkip this toast if one with the same key is on screen, and count the repeat
dedupeWindowMsnumberHow long a key counts as on screen
removeDelaynumberHow long a dismissed toast stays mounted
Behaviour
dismissOnTapbooleanTap to dismiss
onPress() => voidTapping the toast calls this, then dismisses it
dismissiblebooleanfalse turns off swipe and tap to dismiss; a button or the timer still canswipeDirectionsSwipeDirection[]Which ways a swipe dismisses
onDismiss(id, reason) => voidCalled once the toast has left, with why
hapticsboolean or ToastHapticfalse for silence, or a named haptic: 'light', 'medium', 'heavy', 'rigid', 'soft', 'success', 'warning', 'error'importantbooleanShow at once, ahead of the queue, and interrupt other announcements
accessibilityLabelstringWhat screen readers announce
Appearance
variant'auto', 'pill', 'snackbar', 'card', 'banner', 'hud' or 'island'The toast’s shape; see Rich toasts
themepartial theme tokensToken overrides for this toast
glassboolean or GlassConfigfalse draws the opaque surfacerichColorsbooleanTinted surface and text for success, error, info and warning toasts
styleViewStyleThe toast surface, applied after tokens
textStyleTextStyleThe message
iconStyleViewStyleThe icon’s box
styles{ [slot]: style }A style for any part; see Customising
classNames{ [slot]: string }A
className for any part, for NativeWind or UniwindunstyledbooleanDraw no surface, padding or shadow; bring your own through
stylescloseable still works as a deprecated name for closeButton.
What did you think of this content?
Glad it helped. A star on GitHub is how other people find it.
Thank you. The issue that just opened goes straight to the maintainer; say what was missing and the page gets fixed.