Skip to main content

Toast

Notification messages with auto-dismiss.

Usage

<w-toast>
<w-slot msg><div>Operation completed successfully!</div></w-slot>
</w-toast>

Props

PropTypeDefaultDescription
openbooleanfalseWhether toast is visible
durationnumber5000Auto-dismiss time (ms), 0 to disable
positionstring"bottom-right"Screen position

Slots

SlotElementDescription
messageAnyToast content
closeButtonOptional close button

Events

EventDescription
openToast shown
closeToast dismissed

Methods

MethodDescription
show(message?)Show the toast
hide()Dismiss the toast

Positions

  • top-left, top-center, top-right
  • bottom-left, bottom-center, bottom-right

Accessibility

  • Uses role="status" for polite announcements
  • Auto-announces to screen readers via live region