Ping
Issue 03
A quiet confirm. One line, then it leaves.
Reports a brief status in the bottom-right corner. Polite live region; pauses on hover and closes on demand.
Issue 03
A quiet confirm. One line, then it leaves.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { Toaster, toast } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/toast.
npx @noorddev/vlak-cli add toast
The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/toast.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { Toaster, toast } from "@noorddev/vlak-react";
// once, in your layout
<Toaster duration={4000} closeLabel="Dismiss" />
// from anywhere
toast("Saved", { description: "Your changes are live." });Fire a toast from anywhere; a mounted <Toaster /> renders it.
| Prop | Type | Default | Description |
|---|---|---|---|
duration | number | 4000 | The shortest a toast stays, in milliseconds. Longer text stays longer. |
closeLabel | string | "Dismiss" | Accessible name of the close button on every toast. |
Also accepts HTMLAttributes<HTMLDivElement>.
| Keys | Does |
|---|---|
| Tab | Reaches the close button of each toast |
| Enter, Space | Dismisses the toast |
<div class="rs-toasts" role="status" aria-live="polite"><div class="rs-toast"><div><span class="rs-toast-title">Saved</span><p class="rs-toast-body">Your changes are live.</p></div><button class="rs-toast-close" type="button" aria-label="Dismiss">×</button></div></div>