# Custom invert info toast with avatar

> Custom invert info toast with avatar

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

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

## Files

### `c-sonner-15.tsx`

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

import {
  Avatar,
  AvatarFallback,
  AvatarImage,
} from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"

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">
        <Avatar className="border-border/10 size-9 shrink-0 border">
          <AvatarImage
            src="https://images.unsplash.com/photo-1519699047748-de8e457a634e?w=96&h=96&dpr=2&q=80"
            alt="Sarah Chen"
          />
          <AvatarFallback>SC</AvatarFallback>
        </Avatar>
        <div className="flex flex-1 flex-col gap-1">
          <div className="flex items-center justify-between">
            <p className="text-sm font-semibold">Sarah Chen</p>
            <span className="text-invert-foreground/40 text-xs">Just now</span>
          </div>
          <p className="text-invert-foreground/70 text-sm">
            Invited you to collaborate on &quot;Design System v2&quot;
          </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()}
            >
              Decline
            </Button>
            <Button
              size="xs"
              className="border-blue-800 bg-blue-500 text-white hover:border-blue-900 hover:bg-blue-600"
              onClick={() => toast.dismiss()}
            >
              Accept
            </Button>
          </div>
        </div>
      </div>
    ))
  }

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