GitHub

Toast

A toast is a component that displays a message to the user.

Installation

pnpm dlx shadcn@latest add https://shark-ui.vercel.app/r/toast.json

Usage

import { Toaster } from "@/components/ui/toast";
const toaster = useToast();

// add the toaster to the layout
<Toaster toaster={toaster} />

// show a toast
toaster.create({
  title: "Show Info Toast",
  description: "This is a info toast",
  type: "error",
});