Toast
Notification message displayed temporarily.
Preview
Installation
bash
npx auralix-ui add toastUsage
Show Toast
tsx
import { useToast } from "@/components/ui/Toast";
const { toast } = useToast();
<Button onClick={() => toast("Success!", "success")}>Show Toast</Button>Props
| Name | Type | Default | Description |
|---|---|---|---|
type | "success" | "error" | "info" | "warning" | "default" | The type of toast. |
message | string | - | The message content. |
duration | number | 3000 | Duration in ms. |
Variants
Toast Types
Success Message
Error Message
On this page