# Toast

Keys that raise a notification in each tone.

[View Toast on CyberSpec](https://www.cyberspec.dev/components/sidebar/toast)

## Component

Toast belongs to the Overlays group in the CyberSpec catalog. It uses @ui-sdk/react/toast.

## Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/toast.json
```

## Example

```tsx
"use client"

import { ToastKeys } from "@/components/ui/toast"
import { Toasts } from "@/components/ui/toaster"

export default function ToastDemo() {
  return (
    <>
      <ToastKeys />
      {/* An app mounts this once, at its root. Only the first one mounted
          shows toasts, so this one stands down wherever the page already
          has its own. */}
      <Toasts />
    </>
  )
}
```

## Install this example

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/toast-demo.json
```

## Resources

- [Interactive Toast preview](https://www.cyberspec.dev/preview/toast)
- [Component catalog](https://www.cyberspec.dev/components.md)
- [Toast source code](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/ui/toast.tsx)
- [Shadcn registry item](https://www.cyberspec.dev/r/toast.json)
