Skip to main content

Toast

Confirm what just happened in a brief message, with an action to undo it, built on Base UI.

Installation

Component API

PropTypeDefaultDescription
triggerReactNode-
titlestring-The toast's first line.
The toast's first line.
descriptionstring-A line under the title.
A line under the title.
actionLabelstring-
onAction() => void-
timeoutnumber5000
limitnumber3How many toasts stay visible; older ones wait until there is room.
How many toasts stay visible; older ones wait until there is room.
triggerIntentneutral | dangerneutralThe trigger's color: danger when the action it reports destroys something.
The trigger's color: danger when the action it reports destroys something.
shapenone | rounded | pillrounded
animatedbooleantrue
classNamestring-Extra classes for the trigger.
Extra classes for the trigger.
focusboolean | stringtrue
containerHTMLElement | null-