Skip to content

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.

All component references

Props ​

NameTypeDefaultRequiredDescription
asGhostToastViewportElement"div"NoHost element. Use `section` when the region should be a landmark.
portalbooleantrueNoTeleport the region and both announcers to `document.body` after mount.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultReplaces the whole stack. Render one `GhostToast` per item, keyed by `id`.
toastContent of one toast, rendered per visible record (keyed by `id`).

Slot props: default ​

NameTypeDescription
dismiss(id: string) => voidDismisses a toast by id.
toastsreadonly GhostToastRecord[]Visible toasts, oldest first.

Slot props: toast ​

NameTypeDescription
dismiss(id: string) => voidDismisses a toast by id.
toastGhostToastRecordOne visible toast record.

Exposed members ​

NameTypeDescription
elementHTMLElement | nullRegion host after mount.

Parts and data attributes ​

AttributeValueDescription
data-partviewportNotification region host.
data-partannouncer-politeVisually hidden polite live region (role=status). Not a styling hook for visible UI.
data-partannouncer-assertiveVisually 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.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

None declared.