Toast

Brief, non-blocking notifications triggered imperatively with `toast()`.
Stable
Web
iOS
Android
@advui/core
Source

Types

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { toast } from '@advui/core'

toast.success('Profile saved', { description: 'Your changes are live.' })

Examples

With action

API reference

toast(title, options?)

Also `toast.success / error / warning / info / loading / promise / dismiss`.
PropTypeDefaultDescription
descriptionReactNode—Secondary text.
durationnumber4000Milliseconds before auto-dismiss.
action{ label: string; onClick: () => void }—Inline action button (e.g. Undo).
dismissiblebooleantrueShows the close button and allows swipe.

Toaster

Rendered automatically by UniversalProvider; configure with its `toaster` prop.
PropTypeDefaultDescription
position'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right''bottom-right'Screen corner.
durationnumber4000Default duration.
visibleToastsnumber4Maximum stacked toasts.

Accessibility

  • Toasts live in a labelled “Notifications” region and are announced politely.
  • Pause-on-hover/focus prevents toasts from disappearing while being read; Alt+T focuses the region.
  • Don’t put the only path to an action in a toast — it disappears.
  • Swipe to dismiss on touch; reduced motion disables slide animations.
Keyboard interactions
KeyAction
Alt + TMoves focus to the notifications region.
TabMoves through toast actions.

Platform notes

Web
Stacked in the chosen corner; hover expands the stack.
iOS
Rendered in-app with swipe-to-dismiss.
Android
Rendered in-app with swipe-to-dismiss. With androidRipple (on in material()), presses show the native ripple.
Since v0.1.0Last updated Nov 2, 2026Edit this page on GitHub