Skip to content
Hazine

Toasts

1 of 5 shipped. Each take is a different structure, and the note under its title says how.

  • toasts

    One inline action above a countdown it owns: the bar holds while pointer or focus is in the toast region, commit fires once on expiry or dismissal and never after an undo, which is confirmed in place.

    shadcn add @hazine/toast-undo-action

    Depends on button, sonner, lucide-react

Planned 4

  • Severity Toast

    The baseline transient message with no action: timer pauses on hover, focus and when the tab is hidden, and a keyboard shortcut moves focus into the toast region.

  • Progress Toast

    Long-lived and stateful: it stays on screen for the whole task, updates one bar in place, and transforms into a result or failure toast with a different action rather than closing and reopening. Accepts a promise for the simple loading, success, error case.

  • Stacked Toast Queue

    Manages many toasts as one object: depth-scaled collapsed pile, expand to list on hover or focus, an overflow count and a bulk dismiss control, with the stacking transform disabled under reduced motion.

  • Message Toast with Inline Reply

    The only toast that accepts input: identity-led layout (avatar, sender, preview) with an embedded form, a timer that stops for good once the field is focused or holds a draft, and a sent confirmation that replaces the form before the toast closes.