GhostToastViewport reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Notification region (role=region, data-ghost-live) that renders the visible stack and two visually hidden announcers: polite (role=status) for ordinary toasts and assertive (role=alert) for urgency: urgent. A toast is announced once when it becomes visible, never while it waits. The provider label names the region unless the consumer passes aria-labelledby or aria-label. Teleported to document.body by default. Creating, updating, promoting, or expiring a toast never moves focus.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
as | GhostToastViewportElement | "div" | No | Host element. Use `section` when the region should be a landmark. |
portal | boolean | true | No | Teleport the region and both announcers to `document.body` after mount. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Replaces the whole stack. Render one `GhostToast` per item, keyed by `id`. |
toast | Content of one toast, rendered per visible record (keyed by `id`). |
Slot props: default
| Name | Type | Description |
|---|---|---|
dismiss | (id: string) => void | Dismisses a toast by id. |
toasts | readonly GhostToastRecord[] | Visible toasts, oldest first. |
Slot props: toast
| Name | Type | Description |
|---|---|---|
dismiss | (id: string) => void | Dismisses a toast by id. |
toast | GhostToastRecord | One visible toast record. |
Exposed members
| Name | Type | Description |
|---|---|---|
element | HTMLElement | null | Region host after mount. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | viewport | Notification region host. |
data-part | announcer-polite | Visually hidden polite live region (role=status). Not a styling hook for visible UI. |
data-part | announcer-assertive | Visually hidden assertive live region (role=alert). Not a styling hook for visible UI. |
CSS variables
None declared.
Accessibility
Role: region. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/alert/.
Required ARIA attributes: aria-label.
Keyboard
None declared.
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
None declared.