# Custom invert success toast

> Custom invert success toast

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

- Page, with a live preview: https://shadcn.exchange/r/reui/c-sonner-13
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-sonner-13-light-4d23e57367a2319a.png
- Registry item: https://reui.io/r/new-york-v4/c-sonner-13.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-13.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-13.tsx`

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

import { Button } from "@/components/ui/button"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

export function Pattern() {
  const showToast = () => {
    toast.custom(() => (
      <div className="bg-invert text-invert-foreground rounded-md flex w-[356px] items-start gap-3 border border-transparent p-4 shadow-lg">
        <div className="flex size-6 shrink-0 items-center justify-center rounded-full bg-green-500 text-white">
          <IconPlaceholder
            lucide="CheckIcon"
            tabler="IconCheck"
            hugeicons="Tick02Icon"
            phosphor="CheckIcon"
            remixicon="RiCheckLine"
            className="size-3.5"
          />
        </div>
        <div className="flex flex-1 flex-col gap-1">
          <p className="text-sm font-semibold">Payment Successful</p>
          <p className="text-invert-foreground/70 text-sm">
            Invoice #INV-2025-0042 has been paid. $2,400.00 received.
          </p>
          <div className="mt-2 flex gap-2">
            <Button
              size="xs"
              variant="outline"
              className="bg-background/10 border-border/10 text-invert-foreground"
              onClick={() => toast.dismiss()}
            >
              View Receipt
            </Button>
          </div>
        </div>
      </div>
    ))
  }

  return (
    <div className="flex items-center justify-center">
      <Button onClick={showToast} variant="outline" className="w-fit">
        Invert Success Toast
      </Button>
    </div>
  )
}
```
