Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn Toast for React and Tailwind

Provides feedback on an action.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/toast.json

Anatomy

ToastItem
├── ToastGroup
├── ToastTitle
├── ToastDescription
├── ToastActionTrigger
└── ToastCloseTrigger

Usage

import { Button } from "@/components/ui/button";
import { createToaster, Toaster } from "@/components/ui/toast";
const toast = createToaster({
  overlap: true,
  placement: "bottom-end",
});

const ToastDemo = () => (
  <>
    <Toaster toaster={toast} />
    <Button
      onClick={() => {
        toast.create({
          description: "Tuesday, February 10, 2026 at 10:00 AM.",
          title: "Event has been created.",
        });
      }}
      variant="outline"
    >
      Toast
    </Button>
  </>
);

Accessibility

KeyDescription
Enter
Activate the focused control.
Space
Activate the focused control.

Demos

Action

Closable

Dedupe

Duration

Placement

Promise

Variants

API Reference

ToastItem

div

PropType
AttributeType
CSS variableType

ToastTitle

div

PropType
CSS variableType

ToastDescription

div

PropType
CSS variableType

ToastActionTrigger

button

PropType
CSS variableType

ToastCloseTrigger

button

PropType
CSS variableType

toast

AttributeType

Toaster

div

PropType
AttributeType
CSS variableType

useToast