# Shadcn Rich Content

> Toast with custom rich content

- Type: example, free and open source (MIT)
- Component: [Sonner](https://reui.io/components/sonner.md)
- Page: https://reui.io/components/sonner/c-sonner-9
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/toast.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/sonner.md
- MCP: `get_example("c-sonner-9")`
- Registry item: https://reui.io/r/styles/base-nova/c-sonner-9.json
- Uses: Avatar, Button

## Best for

A teammate chat message with avatar, sender, time ago and Reply and Dismiss buttons on the popover surface

## Agent notes

- Reply and Dismiss both call `toast.dismiss` with no id, which closes every open toast; open your reply view from Reply

## Third-party libraries

- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/c-sonner-9
```

## About Shadcn Sonner

### When to use

- Brief feedback after an action, such as a created event or an archived message with Undo
- Progress of async work in one toast that updates in place, from loading to success or failure
- Rich notifications for messages, invites, deploys, builds and integrations, with their own buttons

### When not to use

- A status or warning that must stay on the page until the problem is fixed: use [Alert](https://reui.io/components/alert.md) (`get_component("alert")`)
- A choice the user has to make before the page can carry on: use [Alert Dialog](https://reui.io/components/alert-dialog.md) (`get_component("alert-dialog")`)
- An inbox panel that lists past activity for the user to review on demand: use the [Sheet blocks](https://reui.io/blocks/application/sheet.md)

### Agent notes

- The examples ship only the sonner package and never render `Toaster`; mount the shadcn sonner `Toaster` once near your app root or no `toast` shows

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
