Skip to content
↑↓ to navigate↵ to openesc to close

Menu

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 your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/animated-toast-stack

Import the shared styles once in your application.

TSUsage
import AnimatedToastStack from '@/components/beui/AnimatedToastStack.vue'
import '@/components/beui/styles.css'

API Reference

toasts
readonly AnimatedToast[]
Default—
onDismiss?
(id: string) => void
Default—
position?
ToastPosition
Defaultbottom-right
placement?
"static" | "fixed" | "absolute"
Defaultundefined
fixed?
boolean
Defaultfalse
portal?
boolean
Defaultundefined
portalRoot?
string | Element | null

A selector or an element; defaults to `document.body`.

Defaultundefined
maxVisible?
number
Default4
className?
string
Default—
classNames?
ToastClassNames
Default—
icons?
Partial<Record<ToastStatus, VNodeChild>>

Replace the glyph shown for a status.

Default—
#renderToast?
{ toast: AnimatedToast }

Alias of `toast`, named after the React `renderToast` prop.

Default—
labels?
Partial<typeof animatedToastStackMessages>

Override any built-in string.

Defaultundefined
#toast?
{ toast: AnimatedToast }

Replace a toast's whole inner content (the React `renderToast`).

Default—
#icon?
{ toast: AnimatedToast; status: ToastStatus }

Replace the status glyph inside the built-in layout.

Default—

Updated