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 toast

Run 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

PropTypeDefaultDescription
variant
'default' | 'destructive' | 'success' | 'warning' | 'loading''default'The visual style variant of the toast
limit
number3Maximum number of toasts to show at once
timeout
number5000Auto-dismiss timeout in milliseconds
swipeDirection
Array<'up' | 'down' | 'left' | 'right'>['down', 'right']Allowed swipe directions for dismissing
title
stringThe title of the toast message
description
stringThe description text of the toast