# Soft Badge Toasts

> A soft, tinted toast notification stack. Each toast wears a pale tinted fill, a matching border, a square icon badge, a title/message pair, and a countdown progress track. Four variants — success, error, warning, info — auto-dismiss with hover and focus pause, plus a replay trigger.

- Category: Toast
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Tensor
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Tags: notification, badge
- Page: https://builder.atheros.ai/components/soft-badge
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_soft_badge/preview-d815a660cc85.webp

## Features

- Four semantic variants — success, error, warning, info — each with a square Tabler icon badge and tinted card
- Title/message hierarchy — a 600-weight variant-inked title over a softer supporting message
- Pale tinted fill with a matching accent-mixed border and a variant-tinted layered shadow per variant
- Variant accents prefer the host shell's readable success/error/warning/primary ink variables with alert-palette fallbacks, so the stack retones under any injected design system in light and dark
- Ink-deepened badge fill keeps the icon glyph above the 3:1 WCAG graphics ratio in both themes
- Bottom countdown progress bar on a faint accent track that empties over the lifetime via `transform: scaleX()`; it dims and holds while paused
- Auto-dismiss after a timeout; pause the timer and progress on hover and keyboard focus
- Stable opacity-only entrance and exit animations keep every toast in place throughout the transition
- Close button with accent-tinted hover, active, and focus-visible states
- Replay trigger re-spawns the full demo set after clearing the visible stack
- Programmatic `showToast({ variant, title, message })` API
- Stack capped at five visible toasts; the oldest fades out when the cap is exceeded

## Accessibility

- **Live region** — `aria-live="polite"` `role="status"` `aria-atomic="false"` on the toast stack, with `aria-atomic="true"` per toast so only the new toast is announced
- **Badge icon** — `aria-hidden="true"` decorative square icon badge
- **Replay trigger** — `<button>` with an explicit `aria-label` and visible text label
- **Focus indicators** — `:focus-visible` with `--ring` outline on interactive elements
- **Pause on focus** — Auto-dismiss timer pauses while a toast holds keyboard focus
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations
- **Viewport** — `100dvh` for mobile-safe viewport height

## Keyboard shortcuts

- `Escape` — Dismiss the most recent toast
- `Enter` — Activate the replay trigger while focused
- `Space` — Activate the replay trigger while focused

## Common questions

**Which frameworks is Soft Badge Toasts available in?**

Soft Badge Toasts ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is Soft Badge Toasts free?**

Soft Badge Toasts is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Soft Badge Toasts support dark mode?**

Yes. Soft Badge Toasts ships light and dark themes, both drawn from the Tensor design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Soft Badge Toasts live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/soft-badge

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
