Animated Toast Stack

Preview

Open a real toast

Toasts render fixed on the screen. Change position to open a toast from that edge.

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/animated-toast-stack

API Reference

useAnimatedToastStack

initialToasts?
ToastInput[]
Default[]
defaultDuration?
number
Default4200
limit?
number
Default—

AnimatedToastStack

toasts
AnimatedToast[]
Default—
onDismiss?
((id: string) => void)
Default—
position?
"top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right"
Defaultbottom-right
placement?
"fixed" | "static" | "absolute"
Default—
fixed?
boolean
Defaultfalse
portal?
boolean
Default—
portalRoot?
Element | null
Default—
maxVisible?
number
Default4
className?
string
Default—
classNames?
ToastClassNames
Default—
icons?
Partial<Record<ToastStatus, ReactNode>>
Default—
renderToast?
((toast: AnimatedToast) => ReactNode)
Default—

Updated