# 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.

Section: Feedback. Docs: https://entrepta.vercel.app/docs/components/toast

## Install

```bash
npx @entrepta/cli@latest add toast
```

Files: `feedback/toast.tsx`, `lib/overlay.ts`, `lib/icon.tsx`, `primitives/icon-tile.tsx`.
npm packages: `@phosphor-icons/react`, `class-variance-authority`, `sonner`.
Comes with: `overlay-lib`, `icon-lib`, `icon-tile`.

## Usage

```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

| 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 |
