GhostLink reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Headless styled anchor with external and disabled contracts. useGhostLink owns behavior; GhostLink is the thin host. Themed visual props live on @ghostvue/themes.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
as | GhostLinkElement | TTarget | "a" | No | Host element or router component (`RouterLink`, `NuxtLink`, …). The type parameter `TTarget` types a component target's props. |
disabled | boolean | false | No | Removes `href`, sets `aria-disabled`, and cancels activation. |
external | boolean | false | No | Shows the external icon for same-tab outbound links. |
newTabLabel | string | "Opens in new tab" | No | Visually hidden hint when `target="_blank"`. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Visible link text. Provide aria-label or aria-labelledby when the slot is empty. |
externalIndicator | Decorative external icon inside data-part=external-icon. Hidden from assistive technology. |
Slot props: default
None declared.
Slot props: externalIndicator
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
blur | () => void | Removes focus from the host when mounted. |
element | HTMLElement | null | The navigable host element after mount, or `null` before mount. |
focus | (options?: FocusOptions) => void | Moves focus to the host when mounted and not disabled. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | The navigable host element. |
data-part | external-icon | Decorative external navigation icon. |
data-state | disabled | Navigation is unavailable; href is removed on native anchors. |
CSS variables
None declared.
Accessibility
Role: link. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/link/.
Required ARIA attributes: none.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
Tab | Moves focus to enabled links in document order. | Not reviewed |
Enter | Activates the native link when focused. | 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
link/basic
Native anchor with headless styling hooks.
link/composable
Same contract as GhostLink, applied to a native host.
link/themed
Default inline link visuals from @ghostvue/themes.
link/external
New-tab safety, indicator, and accessible hint.
link/disabled
No href, not focusable, and activation cancelled.