Skip to content

Toast ​

VToast owns one controlled status message. VToastRegion lays out multiple notifications in a fixed or inline region. The caller still owns queue state, auto-dismiss timers, and request integration.

Demo ​

DeployingDeploying the latest component build.

VToast Props ​

PropTypeDefaultDescription
visiblebooleanfalseWhether the toast is visible
messagestring''Supporting message
titlestring—Optional title
type'text' | 'success' | 'warning' | 'danger' | 'loading''text'Status type
position'top' | 'middle' | 'bottom''middle'Position when used standalone
actionTextstring—Optional action label
actionLabelstringaction textAccessible action name
closeablebooleanfalseShow the close button
closeLabelstring'关闭通知'Accessible close name

VToastRegion Props ​

PropTypeDefaultDescription
position'top' | 'middle' | 'bottom''top'Fixed-region position
inlinebooleanfalseRender in normal document flow

Motion and accessibility

Toast motion resolves through theme tokens: 220ms enter, 160ms exit, and 180ms status changes. Updating type, title, and message on the same instance changes its status in place; product state never depends on animation completion. Under prefers-reduced-motion: reduce, spatial movement is removed. Success and neutral feedback use status; warning and danger use alert.

Events ​

EventPayloadDescription
update:visiblebooleanVisibility update
closevoidDismissed
actionvoidOptional action activated