Back to Docs
Recipe

Toast Notification Design

A lightweight, accessible toast system built with pure Tailwind CSS and zero JavaScript dependencies. Slide in, auto-dismiss, stack gracefully.

Preview

Settings saved successfully

just now
!

Failed to upload file. Retry?

2s ago
i

New update available — v2.4.1

5s ago

Anatomy

Icon

Semantic indicator — success, error, info, warning

Message

Single-line body text, max 120 characters

Timestamp

Relative time label, right-aligned, muted

Stacking

Toasts stack from the bottom-right with 12px gap. New toasts push older ones upward. Max 5 visible — oldest auto-dismiss after 4s.

<div class="fixed bottom-6 right-6 flex flex-col gap-3 z-50">
  <!-- Toasts rendered here -->
</div>

Variants

VariantBorderIcon
successborder-emerald-500/30
errorborder-red-500/30!
infoborder-[#8B5CF6]/30i
warningborder-amber-500/30