Feedback
Toast
A note that steps in from the edge with a status lamp.
npx shadcn@latest add https://ui.netm8.com/r/toast.json@base-ui/reactlucide-react
Feedback
A note that steps in from the edge with a status lamp.
npx shadcn@latest add https://ui.netm8.com/r/toast.jsonimport { Button } from "@/components/ui/button"
import { toast } from "@/components/ui/toast"
export default function ToastDemo() {
return (
<div className="flex flex-wrap justify-center gap-3">
<Button
variant="outline"
onClick={() => toast.add({ title: "Saved", description: "The garden, 21:04." })}
>
Save
</Button>
<Button
variant="outline"
onClick={() =>
toast.add({ type: "ok", title: "Sent", description: "The studio has your note." })
}
>
Send
</Button>
<Button
variant="outline"
onClick={() =>
toast.add({ type: "bad", title: "Offline", description: "Nothing was sent." })
}
>
Fail
</Button>
</div>
)
}