Rebar UI

1.0

synthetic

Toast

A brief message that confirms what just happened.

FeedbackBottom right, auto-dismiss in 4 s, pause on hover
Success
Error
In progress
Info

In context

After an actionMove a task on the phone; the toast confirms it

Projects

Harbour rebrandOn track · Maya Chen
Tideline mobileReview · Jonas Weber
Crew interviewsLate · Priya Nair
Rota exportDone · Leo Santos

Imperative toast()

toast()Call from anywhere; the provider above hosts the stack (max 3 per position)
success
Saved to Library
error
loading
Generating recording…
info
Added to Topic: Confession
with action
Discussion deleted
quota (action)
center (loading)
Generating
stacked (older, smaller)
Added to Topic: Confession
Saved to Library
Saved, offline, quotaIn context

Your Profile

Static, as drawn by the provider.

Reminder set for 8:00 AM

Ask

Static, as drawn by the provider.

Ask

Static, as drawn by the provider.

Toast props

PropTypeRequiredDefault
openboolean | undefinedNo—
onOpenChange((open: boolean) => void) | undefinedNo—
titleReactNodeYes—
descriptionReactNodeNo—
type"info" | "success" | "warning" | "error" | undefinedNoinfo
durationnumber | undefinedNo—
bionicboolean | undefinedNo—
bionicOptionsBionicOptions | undefinedNo—

Accessibility

Radix toast: the viewport is a role="region" labelled with a hotkey (F8 moves focus to it), each toast a role="status" live region that pauses its timer on hover and focus. A visible close button is always rendered; swipe to dismiss works on touch.

data-rebar-* attributes

data-rebar-component="toast-viewport" on the provider's viewport; data-rebar-component="toast" with data-rebar-type on each toast; parts title, description, close.

Migrating to Ant Design

AntD's message and notification are imperative calls rather than a mounted, controlled component: a structural difference, not a prop rename.

appearance="classic"

toast(msg, { appearance: "classic" }) (and the success / error / info / loading shortcuts) draws the plain centred dark pill: text only, 204px max, one at a time, 2s. confirm({ appearance: "classic", closeOnMaskClick: false }) draws the compact alert with two split text buttons.