Feedback

Toast

Notification toasts via Sonner, on the overlay surface. The status shows as a tinted icon tile and a glow in the corner, and each status has its own icon shape. Mount <Toaster> once in the root layout, then call toast() anywhere.

view .md
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", {
  action: { label: "reload", onClick: () => location.reload() },
})
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.