Feedback
Toast
Notification toasts via Sonner with entrepta tokens. Mount <Toaster> once in root layout, then call toast() anywhere.
Preview
Installation
terminal
bash
npx @entrepta/cli@latest add toast// Resolves dependencies, copies the source, and installs npm packages automatically.
Usage
toast.tsx
tsx
import { Toaster } from "@/components/entrepta/toast"
import { toast } from "sonner"
// In root layout:
<Toaster position="bottom-right" />
// Trigger from anywhere:
toast.success("Component copied!")
toast.error("Build failed")
toast.warning("Deprecated API used")
toast("New update available")Props
| Prop | Type | Default | Description |
|---|---|---|---|
| position | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center" | "bottom-right" | Where toasts appear on screen |
| duration | number | 4000 | Auto-dismiss delay in ms |
| expand | boolean | false | Always show all toasts expanded |