# Toast Notification

System toast that springs in, holds, and slides away.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/toast-notification
```

<Step>Copy and paste the following code into your project.</Step>

<Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { ToastNotification } from "@/components/framecn/toast-notification";
```

```tsx
<ToastNotification />
```

## API Reference

### ToastNotification

| Prop               | Type           | Default                                  |
| ------------------ | -------------- | ---------------------------------------- |
| `title`            | `string`       | `"Deployment successful"`                |
| `message`          | `string`       | `"Your changes are live at framecn.dev"` |
| `variant`          | `ToastVariant` | `"success"`                              |
| `background`       | `string`       | `"#fafafa"`                              |
| `cardColor`        | `string`       | `"white"`                                |
| `textColor`        | `string`       | `"#171717"`                              |
| `mutedColor`       | `string`       | `"#71717a"`                              |
| `speed`            | `number`       | `1`                                      |
| `fps`              | `number`       | `FPS`                                    |
| `durationInFrames` | `number`       | `DURATION_IN_FRAMES`                     |
| `className`        | `string`       | `-`                                      |

## Notes

  The toast animates through three phases: spring-based enter, a hold period,
  and interpolate-based exit. Use `durationInFrames` to control the overall
  timing.

  The toast is positioned absolutely at the bottom-right of the frame. Ensure
  the parent has a defined size for correct placement.