Skip to main content
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

PropTypeDefaultDescription
position"top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center""bottom-right"Where toasts appear on screen
durationnumber4000Auto-dismiss delay in ms
expandbooleanfalseAlways show all toasts expanded
Active theme: entrepta, dark mode.