Component packs › Herald › Undo Snackbar
A countdown ring drains round Undo and stops while you hover it; when time is up the bar drops away under its own weight.
Undo Snackbar is a snackbar from Herald, a component pack with 6 notification components: Notifications with weight: toasts that land and get thrown, and a bell that really rings. Price: $2 for the whole pack.
Built with: countdown ring, pause on hover, falls away.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | "Conversation archived" | Message. Default "Conversation archived". |
seconds | number | 6 | Seconds before it goes. Default 6. |
shown | boolean | true | Show at mount. Default true. |
onUndo | () => void | ||
onTimeout | () => void |
readonly shown: booleanshow(text?: string): voidhide(): voiddestroy(): voidimport UndoSnackbar from './UndoSnackbar';
<UndoSnackbar />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Notifications and toasts.