Skip to content

Conversation

@twjeffery
Copy link
Collaborator

@twjeffery twjeffery commented Oct 20, 2025

Summary

Adds V2 design tokens for the Link component, introducing size variants (xsmall, small, medium, large), gap spacing for icons, and color tokens for three color variants (interactive, dark, light) across all states (default, hover, visited).

Changes

New Component Tokens

Link Component (21 tokens total)

Typography Tokens (4 tokens)

  • link-typography-xsmall: body.xs (14px/20px) for caption-sized links
  • link-typography-small: body.s (16px/22px) for small text links
  • link-typography-medium: body.m (18px/24px) for standard body text links
  • link-typography-large: body.l (24px/36px) for prominent heading links

Gap Tokens (5 tokens)

  • link-gap: 4px - V1 default spacing between text and icons
  • link-gap-xsmall: 2px - Tight spacing for xsmall links
  • link-gap-small: 3px - Spacing for small links
  • link-gap-medium: 4px - Standard spacing for medium links
  • link-gap-large: 5px - Generous spacing for large links

Color Tokens - Interactive (Blue) (3 tokens)

  • link-color-interactive-default: Interactive blue (#006dcc)
  • link-color-interactive-hover: Darker blue (#045092)
  • link-color-interactive-visited: Purple (#756693)

Color Tokens - Dark (Black) (3 tokens)

  • link-color-dark-default: Black (#000000)
  • link-color-dark-hover: Grey (#4d4d4d)
  • link-color-dark-visited: Purple (#756693)

Color Tokens - Light (White) (3 tokens)

  • link-color-light-default: White (#ffffff)
  • link-color-light-hover: Light grey (#e9e9e9)
  • link-color-light-visited: Medium grey (#b1b1b1)

Icon Size Tokens (4 tokens - for reference/documentation)

  • link-icon-size-xsmall: 12px (2xsmall icon)
  • link-icon-size-small: 16px (xsmall icon)
  • link-icon-size-medium: 18px (small icon)
  • link-icon-size-large: 20px (medium icon)

Key Decisions

Size-Specific Typography & Gap

  • Each size variant has matching typography and gap spacing tokens
  • Gap values increase with link size (2px → 3px → 4px → 5px)
  • Typography scales appropriately for each context (captions to headings)

Base Gap Token for V1 Compatibility

  • link-gap (4px) provides V1 fallback for links without explicit size
  • Size-specific gaps override for V2 size variants
  • Maintains consistent spacing in V1 environment

Comprehensive Color System

  • Three color variants: interactive (blue), dark (black), light (white)
  • Each variant has default, hover, and visited states
  • Dark and light variants both use purple for visited state
  • Light variant designed for dark backgrounds

Icon Size Documentation

  • Icon sizes scale with link typography
  • Component uses icon size strings (2xsmall, xsmall, small, medium) directly
  • Tokens serve as reference documentation for sizing relationships

Related

@twjeffery twjeffery linked an issue Oct 20, 2025 that may be closed by this pull request
8 tasks
@twjeffery twjeffery marked this pull request as ready for review October 20, 2025 20:19
@twjeffery twjeffery requested a review from bdfranck November 4, 2025 21:31
Copy link
Collaborator

@bdfranck bdfranck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ✅ The tokens use global values, where applicable
  • ✅ The tokens build successfully

Looks good to me! 👍

@twjeffery
Copy link
Collaborator Author

@bdfranck I added focus tokens as per your suggestion in GovAlta/ui-components#3125

@twjeffery twjeffery requested a review from bdfranck November 7, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link 2.0 update

2 participants