GhostToast reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Plain container (div, no live-region role) for one visible toast. Pauses its auto-dismiss timer while hovered or while focus is inside. Escape with focus inside dismisses only this toast, stops propagation so a dialog behind stays open, and returns focus to the element focused before focus entered the region.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
toast | GhostToastRecord | — | Yes | Record to render, usually one item of the viewport's `toasts`. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Primary content. |
Slot props: default
| Name | Type | Description |
|---|---|---|
dismiss | () => void | Dismisses this toast. |
toast | GhostToastRecord | The rendered record. |
Exposed members
| Name | Type | Description |
|---|---|---|
element | HTMLElement | null | Toast root after mount. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | Toast root, also marked data-ghost-toast. |
CSS variables
None declared.
Accessibility
Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/alert/.
Required ARIA attributes: none.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
Escape | Dismisses only the focused toast and returns focus to where it was before it entered the region. | Not reviewed |
Verification
Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Not reviewed | No declared key is mapped to a browser test yet. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
toast/basic
Provider, viewport, and an informational toast that auto-dismisses after eight seconds.
toast/persist-error
An urgent error toast with a retry action that stays until dismissed.
toast/queue-overflow
Five toasts with a limit of three: two wait and appear as visible toasts are dismissed.