
Table Component
Components
An animated toast component with elastic notification stacks, swipe dismissal, expandable descriptions, and responsive status feedback for modern web applications.
Toast shows compact notifications in a stack along the screen edge. They can enter elastically or grow from the triggering button, morph their icon from loading to success or error, and be swiped away with a subtle tilt.
Use it to confirm saved settings, uploads, completed tasks, and failed requests without a separate screen. Users should know what happened and whether to act, with the message always more important than the motion.
Choose default or glass surfaces, roundness, stack position, coloured accent edges for success, warning, and error, and optional descriptions and action buttons. Motion options include elastic or smooth entrances, trigger-origin growth, content fade, fade or slide exits, swipe tilt, icon morphing, and a timer bar.
A project management app can show a loading toast during a file upload, then morph it to success with an Open action, or to an error with Retry, without the user losing their place.
An ecommerce store can confirm add-to-cart with a short toast that grows from the button and dismisses itself after a few seconds.
A SaaS settings page can use a glass toast with a collapsible description to confirm a saved preference and explain what it changes.
Information users must read before continuing, like legal notices or destructive confirmations, needs a persistent interface.
Field validation errors should stay next to the field, not only in a temporary toast.
Don’t toast every minor click, and use a dedicated progress panel for long operations needing supervision.
Keep entrances, exits, and stack moves light, follow the latest state during rapid updates, and keep swipe tracking local. Limit simultaneous toasts, stop timers on dismissal, and go easy on blurred glass on low-powered devices.
Use polite live regions for routine messages and assertive ones only for urgent errors, without stealing focus. Actions and close controls need labels and keyboard support, and messages need enough time to read. On mobile, keep the stack clear of navigation, make swipe optional, and keep descriptions inside the viewport. With reduced motion, simplify entrances, morphing, and tilt.
| Prop | Type | Default | Description |
|---|---|---|---|
theme | string | claude | Colour palette, toasts included. Any theme but Default also tints the timer bar. |
mode | string | dark | Light or dark version of the palette. Starts dark. |
variant | string | success | Kind of message. Loading → success shows a spinner, then succeeds after a moment. |
showDescription | boolean | true | Adds a second line of detail under the title. |
collapsibleDescription | boolean | true | Long descriptions fold to one line with a toggle to expand. Needs Description on. |
showAction | boolean | true | Adds an Undo button to the toast. |
timeout | number | 5 | How long a toast stays before closing itself, in seconds. 0 keeps it until dismissed. |
elastic | boolean | true | Toasts spring in with a slight overshoot. |
originFromTrigger | boolean | false | Toasts grow out of the button that opened them. |
fadeContent | boolean | true | The toast's text fades in just after the toast arrives. |
exitAnimation | string | fade | How a toast leaves when it closes. |
tiltOnSwipe | boolean | true | Toasts tilt in the direction you swipe them away. |
morphIcon | boolean | false | The loading spinner morphs into a tick on success. Only for the Loading → success variant, or after Undo with Show action on. |
showTimerBar | boolean | true | A bar shrinks to show the time left. Not used with Stays for 0; with Loading → success it appears after the success. |
glass | boolean | true | Frosted, see-through background. |
showAccentEdge | boolean | true | A coloured line on the edge for success, info, warning and error toasts. Not used by Default. |
rounded | string | md | Corner radius of the toasts. |
position | string | bottom-center | Where on the screen toasts stack. |
Toast is an animated React component that shows brief notifications in a screen-edge stack, with status messages, expandable descriptions, actions, swipe dismissal, and configurable animations.
Yes. It supports several variants and status types, with optional coloured accent edges.
Yes. A contextual action can sit beside the message, and the application connects it to the operation.
Yes. Loading to tick morph animates the icon between loading, success, and error as the application updates the result.
Yes, after a configurable interval. A timeout of zero keeps it visible until dismissed.
It can be, with live-region announcements, keyboard-operable actions, a usable close control, enough reading time, and clear status text.
Need a custom effect? Tell us what to create.