Confirm what just happened in a brief message, with an action to undo it, built on Base UI.
Installation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | ReactNode | - | |
title | string | - | The toast's first line. |
| The toast's first line. | |||
description | string | - | A line under the title. |
| A line under the title. | |||
actionLabel | string | - | |
onAction | () => void | - | |
timeout | number | 5000 | |
limit | number | 3 | How many toasts stay visible; older ones wait until there is room. |
| How many toasts stay visible; older ones wait until there is room. | |||
triggerIntent | neutral | danger | neutral | The trigger's color: danger when the action it reports destroys something. |
The trigger's color: danger when the action it reports destroys something. | |||
shape | none | rounded | pill | rounded | |
animated | boolean | true | |
className | string | - | Extra classes for the trigger. |
| Extra classes for the trigger. | |||
focus | boolean | string | true | |
container | HTMLElement | null | - | |