Documentation
Getting Started
Foundations
Form
Layout
Display
Navigation
Overlay
Feedback
Toast
Feedback
A non-intrusive notification system that displays temporary messages to users. Supports multiple variants, stacking, actions, and promise states for async operations.
Installation
bash
1npx @dinachi/cli@latest add toastRun the CLI command above to automatically install the component and its dependencies.
Examples
Default Toast
A basic toast notification
Toast Variants
Different toast variants and types
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'destructive' | 'success' | 'warning' | 'loading' | 'default' | The visual style variant of the toast |
limit | number | 3 | Maximum number of toasts to show at once |
timeout | number | 5000 | Auto-dismiss timeout in milliseconds |
swipeDirection | Array<'up' | 'down' | 'left' | 'right'> | ['down', 'right'] | Allowed swipe directions for dismissing |
title | string | — | The title of the toast message |
description | string | — | The description text of the toast |