Link
Inline text hyperlink. Mirrors Figma node 140-7864 (light) + 5940-2868 (dark) 1:1. Three colour variants — Default (neutral black / white), Brand (`#9B8B5D` tan), Blue (`#3156DF` / `#4675EB`) — each with its own hover colour. Disabled is shared across variants (one --link-disabled-text token). Four sizes step through Body 1 (16/24) · Body 3 (14/20) · Caption 1 (12/16) · Caption 2 (10/12), all Semi Bold. Inline-flex layout means the link works equally well as a standalone Text Title or wrapped around an icon + label.
When to use
- Use for navigation — linking to another page, section, or external resource
- Use descriptive link text that makes sense out of context ("View case details", not "click here")
- Use
.link-underlinewhen the link must always be visually distinct from surrounding text - Use Blue variant for standard hyperlinks within body text
- Use for actions that change state — use a Button (Ghost or Tertiary) instead
- Use vague link text like "here", "click here", or "read more"
- Use Link for submitting forms — use a Button
- Use the
disabledHTML attribute — usepointer-events:none+aria-disabledinstead
DigiLawyer Patterns
No specific DigiLawyer patterns documented yet — to be added.
Anatomy
A Link is an inline-flex anchor element with an optional leading icon. Underline shows on hover by default.
- 1Anchor —
.link. Inline-flex element. Add colour + size modifier. - 2Colour variant —
.link-default/.link-blue/.link-brand. - 3Size —
.link-xl/.link-lg/.link-md(default) /.link-sm. - 4Icon —
.link-icon. Optional leading icon, scales with size. - 5Underline — Shown on hover.
.link-underlineforces it always visible.
Default
A bare .link on an <a> — neutral Default colour, Body 1 Semi Bold, no underline at rest. Hover swaps to --link-hover-text and adds an underline.
Variants
Three colour modifiers. The base .link is the neutral Default; add .link-brand for the tan accent or .link-blue for the system blue. Each variant ships its own hover colour — Brand stays at the resting tan in light (no hover shift) and lifts to a brighter tan in dark; Blue and Default both step to a deeper / lighter shade on hover.
Sizes
Four size modifiers map 1:1 to Figma's text-style names. Default (no class) is Body 1 (16/24); .link-sm is Body 3 (14/20); .link-xs is Caption 1 (12/16); .link-xxs is Caption 2 (10/12). All sizes ship at Semi Bold so the link reads as an interactive element regardless of typography weight.
States
Three states. Default renders the variant's colour, no underline. Hover swaps to the matching -hover token and adds an underline (use .is-hover in static demos to force this; :hover handles it live). Disabled drops to --link-disabled-text and removes the underline (set aria-disabled="true" or class .is-disabled; use the native disabled attribute when the link sits on a <button>). Add .link-underline to pin the underline at rest — useful when the link is the only interactive on the surface.
With icons
Wrap an inline SVG in .link-icon to add a leading or trailing affordance. Icon size auto-scales per .link-{size}: 16 px on default, 14 / 12 / 10 px on sm / xs / xxs. The icon inherits currentColor, so it flips through every variant + state automatically.
Full matrix
3 variants × 4 sizes × 3 states. Toggle the theme switch in the global header to see every cell under dark tokens — Default text flips white, Default-hover lifts to #D1D1D1, Brand-hover steps from `#9B8B5D` (no change in light) to `#BAB28A` (brighter tan in dark), Blue steps to `#4675EB` resting / `#6999F1` hover.
Accessibility
| Attribute / Behaviour | Value | Notes |
|---|---|---|
| Element | <a href="..."> | Always use a real <a> with a valid href — never a <button> styled as a link for navigation |
| Descriptive text | Meaningful label | Link text must make sense out of context. Screen reader users often navigate by link text alone. |
| External links | target="_blank" + rel="noopener" | Warn users when a link opens in a new tab — add aria-label="...(opens in new tab)" |
| Disabled state | aria-disabled="true" + tabindex="-1" | Remove from tab order and block clicks without using the HTML disabled attribute (which doesn't work on <a>) |
| Keyboard | Enter | Activates the link when focused |
API
| Class / attr | On | Description |
|---|---|---|
| .link | <a> (or <button>) | Base. Inline-flex, Body 1 (16/24) Semi Bold, neutral Default colour, no underline. Hover adds underline + swaps to --link-hover-text. Use <a href> for navigation, <button> for in-page actions styled as links. |
| .link-brand | .link | Brand (tan) variant. Resting + hover both at #9B8B5D in light; dark mode lifts hover to #BAB28A. |
| .link-blue | .link | Blue variant. #3156DF / #4675EB resting; #2739A6 / #6999F1 hover (light / dark). |
| .link-sm | .link | Small. Body 3 (14/20) Semi Bold. Icon scales to 14 × 14. |
| .link-xs | .link | Extra small. Caption 1 (12/16) Semi Bold. Icon scales to 12 × 12. |
| .link-xxs | .link | Smallest. Caption 2 (10/12) Semi Bold. Icon scales to 10 × 10. |
| .link-underline | .link | Pin the underline at rest (no hover required). Use when the link is the only interactive on its surface — saves users a hover-to-confirm beat. |
| .link-icon | <span> inside .link | Wrap an inline SVG to add a leading or trailing icon. Icon inherits currentColor + scales per parent .link-{size}. |
| .is-disabled / disabled / aria-disabled="true" | .link | Disabled state — drops to --link-disabled-text (`#5D5D5D` / `#E7E7E7`), removes underline, cursor: not-allowed. Use the native disabled attribute on a <button>; on an <a> use aria-disabled="true" (or .is-disabled for static demos). |
| .is-hover | .link | Documentation helper — forces the hover visual at rest for the matrix. :hover handles the live state. |
| --link-{variant}-text / -hover | Token | Per-variant colours. --link-default-text + --link-hover-text; --link-brand-text + --link-brand-hover; --link-blue-text + --link-blue-hover. |
| --link-disabled-text | Token | Shared disabled colour across all variants. |