Actions

Link
v0.4.2
Documentation Under Review

An accessible anchor component with configurable underline behavior, text wrapping, disabled state, and polymorphic rendering via asChild. Built on standard HTML with Catalyst design tokens.

Prefer AI-assisted development?

This documentation is available via the Catalyst MCP Server. Learn how to connect →

Catalyst Link wraps the standard HTML <a> element with built-in design tokens, CVA variants for underline and wrap control, and a disabled state — giving you a production-ready link with zero configuration.

Preview

Installation

npm install @pmi/catalyst-link
import { Link } from '@pmi/catalyst-link';

Variants

Underline Auto

The default. Underline appears on hover, providing a clean appearance at rest.

Preview

auto

Test

always

Test

hover

Test

none

Test

Underline Always

Permanently underlined — best for body text where link affordance must be clear without hover.

Underline Hover

Underline appears on hover only, identical to auto in most contexts.

Underline None

No underline — use when the link's context or styling already communicates its interactive nature.

Sizes

Common Patterns

Disabled

Preview

Truncated Text

Wrap Options

API Reference

Prop

Type

The product variant accepts the same props as the marketing variant. The size values (xs, sm, md, lg) are identical, but they map to different internal scale values — the product variant uses denser spacing and smaller type sizes suited for application UIs.

Accessibility

Link is designed to meet WCAG 2.2 AA standards.

ARIA attributes

  • Uses the native <a> element, providing built-in link semantics for assistive technologies.
  • When disabled is set, href is removed and pointer-events-none is applied — the element remains in the DOM but is inert. Consider removing disabled links from the DOM when appropriate, as screen readers may still announce them.
  • For external links, always pair target="_blank" with rel="noopener noreferrer" to prevent reverse tabnapping and avoid leaking the opener reference.
  • Use asChild with <NextLink> or React Router's <Link> to preserve native link semantics while enabling client-side navigation.

WCAG 2.2 AA criteria addressed:

  • 1.4.3 Contrast (Minimum) — default text colors (pmi-off-black-800 / white) meet the 4.5:1 minimum. Verify contrast when applying custom className overrides.
  • 2.4.4 Link Purpose (In Context) — provide descriptive link text; avoid generic labels like "click here".
  • 2.4.7 Focus Visible — a focus-visible ring is applied automatically; visible focus indicators satisfy this criterion.
  • 3.2.4 Consistent Identification — use underline values consistently across your site so links are predictably identified by visual style.

Choosing the Right Component

Use Link when you need to navigate to a URL. Reach for a different primitive when:

If you need…Use instead
An action that doesn't navigate (submit, open modal, toggle state)Button

On this page