GhostLink reference
Package: @ghostvue/themes. Status: experimental (stability policy).
Themed wrapper around headless GhostLink. Same navigation contract plus variant and tone. Importing it loads the default stylesheet and scopes link styles to this instance.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
as | GhostLinkElement | "a" | No | Host element or router component forwarded to the unstyled GhostLink. |
disabled | boolean | false | No | Disables navigation on the inner host. |
external | boolean | false | No | Shows the external indicator for same-tab outbound links. |
newTabLabel | string | "Opens in new tab" | No | Visually hidden hint when target is _blank. |
appearance | 'link' | 'button' | "link" | No | Visual presentation mode. Use button for GhostButton-styled navigation links. |
variant | 'inline' | 'subtle' | 'solid' | 'soft' | 'outline' | 'ghost' | "inline" | No | Visual treatment. Defaults to inline for link appearance and solid for button appearance. |
tone | 'accent' | 'neutral' | 'danger' | "accent" | No | Color intent. Danger applies when appearance is button. The default omits data-tone. |
size | 'sm' | 'md' | 'lg' | "md" | No | Control size when appearance is button. The default omits data-size. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Link text forwarded to the unstyled GhostLink. |
externalIndicator | Optional external icon content inside data-part=external-icon. |
Slot props: default
None declared.
Slot props: externalIndicator
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
element | HTMLElement | null | The inner navigable host after mount. |
focus | (options?: FocusOptions) => void | Focuses the inner host when enabled. |
blur | () => void | Blurs the inner host. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | The navigable host inside the display:contents themed scope. |
data-part | external-icon | Decorative external navigation icon. |
data-state | disabled | Navigation is unavailable. |
CSS variables
| Name | Description |
|---|---|
--ghost-action-primary-bg | Default accent link color. |
--ghost-action-primary-bg-hover | Hover link color. |
--ghost-action-primary-bg-active | Active link color. |
--ghost-action-disabled-fg | Disabled link color. |
--ghost-surface-fg | Neutral tone link color. |
--ghost-action-icon-size | External icon size. |
--ghost-focus-ring-color | Focus outline color. |
--ghost-focus-ring-width | Focus outline width. |
--ghost-focus-ring-offset | Focus outline offset. |
--ghost-border-hairline-width | Underline thickness. |
--ghost-space-gap-xs | Gap between text and icon; underline offset. |
--ghost-state-mix-border | Inline variant resting underline mix. |
--ghost-radius-sm | Focus ring corner radius. |
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 | Enabled links participate in tab order. | Not reviewed |
Enter | Activates the focused link. | 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/documentation-footer
Resource card with in-app routes, a new-tab link with rel and hint, a same-tab external link, and a disabled link.
link/themed
Default inline link visuals from @ghostvue/themes.
link/button
Navigation link rendered with the GhostButton visual recipe.
link/external
New-tab safety, indicator, and accessible hint.
link/disabled
No href, not focusable, and activation cancelled.
link/router
Themed link rendered through an app router component passed to as, without importing vue-router.