Skip to content
Storybook

Link

Inline or standalone text link. Brand for navigation, Neutral for meta links, Danger for destructive links.

Preview

React · live from the Storybook
Link preview

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

Usage

  • Use links to navigate; use buttons to act.
  • Underline appears on hover; inline links in body text should stay underlined.

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

Examples

Sizes

Small, Medium and Large.

Disabled

aria-disabled removes it from pointer events.

API reference

Class / attributeTypeDescription
px-linkclassBrand tone.
px-link--neutral · --dangerclassTone.
px-link--sm · --lgclassSize.
aria-disabled="true"attributeDisabled state.

Figma properties

Link45 variants · page “Buttons”Open

Inline or standalone text link. Brand for navigation, Neutral for secondary/meta links, Danger for destructive links. Underline appears on hover and press; visited colour is --px-link-content-visited.

PropertyTypeValues
LabelText“Link text”
Trailing iconBoolean—
Trailing icon swapInstance swap—
ToneVariantBrand Neutral Danger
SizeVariantSmall Medium Large
StateVariantActive Hover Pressed Focused Disabled

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-link-gapspacing-xs4px

Accessibility

  • Links that open a new tab need text or an icon label that says so.
  • Visited color uses --px-link-content-visited.