# Shadcn Variant Icons

> Toast variants with colored icons

- Type: example, free and open source (MIT)
- Component: [Sonner](https://reui.io/components/sonner.md)
- Page: https://reui.io/components/sonner/c-sonner-4
- 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-4")`
- Registry item: https://reui.io/r/styles/base-nova/c-sonner-4.json
- Uses: Button

## Best for

Default, success, error, warning, info and loading side by side, with the 4 status icons each tinted its own color

## Agent notes

- `toast.loading` never closes on its own; pass the id it returns to `toast.success` or `toast.error` to settle it

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

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