Link
vig-button with an href when navigation should look like an action.
vig-link
import { Link } from '@vigdx/ui/link';Basic
vig-link and pass an href . The link takes the font size of the surrounding text.
Refunds are processed within five working days. Read the
Variants
variant is default (link color), muted (soft until hovered) or inherit , which takes the color of its context, e.g. inside an error message.
Your card was declined.
Underline
underline is always (default), hover or none . Keep links in running text underlined so they do not rely on color alone.
External links
external appends an icon and opens in a new tab unless target is set. Every target="_blank" link gets rel="noopener noreferrer" and a screen-reader note, translatable with newTabAriaLabel .
Disabled
disabled removes the href , so the link cannot be followed and leaves the tab order, and greys it out.
Styling hooks
Internal elements carry a stable data-part and the component's data-scope; both are public API, so removing one is a breaking change. Select a part by both, e.g. [data-scope="link"][data-part="anchor"] { … }: the pair stays within this component when kit components nest, and also reaches parts in overlay panels, which render outside the host. State is exposed through aria-* and, where listed, a data-state; literal values are checked by the API gate, values computed from the component's state follow its documented types. Other data-* attributes listed below (such as data-opening while an overlay animates) are API too. See Customizing.
Scope: [data-scope="link"]
| Part | Element | data-state |
|---|---|---|
anchor | <a> . | — |
icon | external ). | — |
new-tab | — |
Accessibility
- Renders a native
<a href>, announced as a link and followed with Enter. The projected text is its accessible name, so make it meaningful out of context and avoid “click here”. - Links opening a new tab carry visually hidden text (the
linkNewTabLabellabel, ornewTabAriaLabelper instance) so the change of context is announced. - A disabled link keeps
role="link"witharia-disabled="true"but has nohref, so the Tab key skips it. - Focus shows the
--shadow-focus-ringhalo; the default and muted colors meet WCAG AA against the page background in light and dark mode.
API
Link
vig-linkStyled anchor. target="_blank" gets rel="noopener noreferrer"
automatically; external opens in a new tab by default and appends an
icon plus screen-reader text saying so. disabled removes the href.
| Name | Type | Default | Description |
|---|---|---|---|
disabled | boolean | false | Renders a non-interactive link ( |
external | boolean | false | Marks an off-site link: appends an icon and opens in a new tab unless |
href | string | undefined | undefined | — |
newTabAriaLabel | string | undefined | undefined | Screen-reader note for new-tab links; defaults to the |
newTabLabel | string | undefined | undefined | Deprecated: Use `newTabAriaLabel`; still honored when `newTabAriaLabel` is unset. — |
rel | string | undefined | undefined | Extra |
target | string | undefined | undefined | Browsing context; |
underline | LinkUnderline | 'always' | — |
variant | LinkVariant | 'default' | — |