Component packs › Herald › Undo Snackbar

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.

Undo Snackbar props

PropTypeDefaultDescription
textstring"Conversation archived"Message. Default "Conversation archived".
secondsnumber6Seconds before it goes. Default 6.
shownbooleantrueShow at mount. Default true.
onUndo() => void
onTimeout() => void

Methods on the ref

Use it in React

import UndoSnackbar from './UndoSnackbar';

<UndoSnackbar />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Herald

Good for: Notifications and toasts.