Link

A styled anchor for navigation in running text, lists and footers. It marks external links, secures new-tab links and tells screen-reader users when a link opens a new tab; use vig-button with an href when navigation should look like an action.

  • vig-link
Import
import { Link } from '@vigdx/ui/link';

Basic

Wrap the link text in 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 refund policy or contact support if a payment is missing.

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.

Billing settings — default, in the link color.

Terms of service — muted, for secondary navigation such as footers.

Your card was declined. Update payment method

Underline

underline is always (default), hover or none . Keep links in running text underlined so they do not rely on color alone.

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.

Download Q3 report — available once the quarter is closed.

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"]

Link styling hooks
Part Element data-state
anchor The native <a> . —
icon The external-link icon ( external ). —
new-tab Screen-reader text for links that open a 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 linkNewTabLabel label, or newTabAriaLabel per instance) so the change of context is announced.
  • A disabled link keeps role="link" with aria-disabled="true" but has no href, so the Tab key skips it.
  • Focus shows the --shadow-focus-ring halo; the default and muted colors meet WCAG AA against the page background in light and dark mode.

API

vig-link component

Styled 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.

Link props
Name Type Default Description
disabledbooleanfalse

Renders a non-interactive link (aria-disabled, no href).

externalbooleanfalse

Marks an off-site link: appends an icon and opens in a new tab unless target is set.

hrefstring | undefinedundefined
—
newTabAriaLabelstring | undefinedundefined

Screen-reader note for new-tab links; defaults to the linkNewTabLabel label.

newTabLabelstring | undefinedundefined

Deprecated: Use `newTabAriaLabel`; still honored when `newTabAriaLabel` is unset.

—
relstring | undefinedundefined

Extra rel tokens, merged with noopener noreferrer for _blank.

targetstring | undefinedundefined

Browsing context; external links default to _blank.

underlineLinkUnderline'always'
—
variantLinkVariant'default'
—

Are you sure?