Skip to content
Uxelith
Sign in
Prov1.0.0Data

Toaster

Toast notifications that slide in and stack: repeats count up instead of piling, loading morphs into success, a bar shows time left, flick to dismiss, and timers pause on hover and hidden tabs.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
9 Oct 2026
Live

Installation

Usage

example.tsx
"use client"

import { toast, Toaster } from "@/components/toaster"

export function SaveButton() {
  return (
    <>
      <button onClick={() => toast.success("Saved", { description: "All changes are live." })}>Save</button>
      <Toaster position="bottom-right" />
    </>
  )
}

Props

PropTypeDefaultDescription
toast(title, options?)function—Show a toast; returns its id. Options: description, variant, duration (ms, Infinity to stay), action and cancel { label, onClick }, id (update in place), onDismiss, onAutoClose.
toast.success / .info / .warning / .error / .loadingfunction—Shortcuts for each variant.
toast.promise(promise, messages)function—Loading, then success or error, in one toast.
toast.dismiss(id?)function—Dismiss one toast, or all.
position"top-left" … "bottom-right""bottom-right"Where the stack sits (Toaster prop).
visiblenumber3Toasts shown in the collapsed stack.
gapnumber12Space between expanded toasts, in px.
progressbooleantrueA thin bar showing each toast's time left; it pauses with the timer.
richColorsbooleanfalseTint each toast with its status colour, not just its icon.
hotkeystring"alt+t"Moves focus to the toasts.

Accessibility

  • Announced through dedicated live regions: errors assertively, everything else politely.
  • The visible list is a labelled region you can reach with Alt+T; every toast has a Dismiss button and Escape dismisses the focused one.
  • The same message sent again is announced again with its count ("(2 times)"), not stacked.
  • Timers pause while you hover or focus the stack and while the tab is hidden.
  • Stacked toasts out of view are inert; slides, pops and the time bar are removed under prefers-reduced-motion.

Changelog

  1. v1.0.0Latest

    First release.

More in Data

All 9 in Data
  • DataPro

    Area Chart

    Trends over time: lines draw themselves in, the crosshair glides between points, the area you've scrubbed stays bright, and the tooltip shows the change from the point before.

  • DataFree

    Avatar Stack

    Overlapping avatars that spread on hover, with a name tooltip that swings with the pointer, status dots and a +N list of everyone else. Photos or initials.

  • DataPro

    Bar Chart

    A responsive bar chart, grouped or stacked: bars rise in one after another, the hovered column lights up and the tooltip glides, with keyboard navigation and a hidden data table.