# Toast positions

> Toast positions

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-sonner-3).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-sonner-3
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-sonner-3-light-cca43e64cbea23e2.png
- Registry item: https://reui.io/r/new-york-v4/c-sonner-3.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-sonner-3.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `sonner`
- Registry items: `button`

## Files

### `c-sonner-3.tsx`

```tsx
import { toast } from "sonner"

import { Button } from "@/components/ui/button"

export function Pattern() {
  return (
    <div className="grid grid-cols-3 gap-2">
      <Button
        size="sm"
        variant="outline"
        className="w-full"
        onClick={() =>
          toast("Top Left", {
            description: "Notification appears in the top left.",
            position: "top-left",
          })
        }
      >
        Top Left
      </Button>
      <Button
        size="sm"
        variant="outline"
        className="w-full"
        onClick={() =>
          toast("Top Center", {
            description: "Notification appears in the top center.",
            position: "top-center",
          })
        }
      >
        Top Center
      </Button>
      <Button
        size="sm"
        variant="outline"
        className="w-full"
        onClick={() =>
          toast("Top Right", {
            description: "Notification appears in the top right.",
            position: "top-right",
          })
        }
      >
        Top Right
      </Button>
      <Button
        size="sm"
        variant="outline"
        className="w-full"
        onClick={() =>
          toast("Bottom Left", {
            description: "Notification appears in the bottom left.",
            position: "bottom-left",
          })
        }
      >
        Bottom Left
      </Button>
      <Button
        size="sm"
        variant="outline"
        className="w-full"
        onClick={() =>
          toast("Bottom Center", {
            description: "Notification appears in the bottom center.",
            position: "bottom-center",
          })
        }
      >
        Bottom Center
      </Button>
      <Button
        size="sm"
        variant="outline"
        className="w-full"
        onClick={() =>
          toast("Bottom Right", {
            description: "Notification appears in the bottom right.",
            position: "bottom-right",
          })
        }
      >
        Bottom Right
      </Button>
    </div>
  )
}
```
