Skip to main content
PimentCSS v1.0.1, what's new
Home

Links & breadcrumb

Inline links, external trail icons, and breadcrumb navigation.

Overview

.link styles standalone action links (pill padding, hover surface). Add .link--inline inside body copy for underlined text links. .breadcrumb wraps an <ol class="breadcrumb__list">: each ancestor is a .breadcrumb__link followed by a .breadcrumb__separator chevron.

PartClassRole
Link.linkAction link (anchor; can pair with .link__label)
Inline.link--inlineUnderlined link in paragraphs
Icon.link__icon20px mask icon beside label
Label.link__labelVisible link text
Breadcrumb.breadcrumbNavigation landmark wrapper
List.breadcrumb__listOrdered trail (<ol>)
Segment.breadcrumb__linkAncestor link + separator icon
Current.breadcrumb__currentCurrent page label (no link)

Prerequisites

  • PimentCSS installed, Installation.
  • Icons, optional link__icon slot with your library (this doc uses Phosphor via ph()).
  • Typography, inline links sit in Typography body utilities (.body-medium).

Each state is an <a href="…"> except disabled (non-focusable <span>). Doc-only .link--hover shows the spec surface; live pages use :hover and :focus-visible. The default cell shows optional link-04 and an outbound trail icon.

Structure

Use a real href on anchors. For disabled links, prefer removing the anchor or use aria-disabled="true" with tabindex="-1" on a span styled as .link--disabled.

Inline link

Inside paragraphs, add .link--inline for underline and the same action color tokens.

Read the installation guide before you customize tokens.

Link with icons

Optional pattern: link-04 before the label, outbound arrow after (16px). Use when the design calls for both link affordance and an external destination cue.

The trail arrow uses an inline SVG (ICON.linkForwardTrail()) for a clearer external-link cue at 16px.

Each ancestor is a .breadcrumb__link ending with .breadcrumb__separator. The last item is .breadcrumb__current with aria-current="page".

Class reference

ClassDescription
.linkAction link: flex row, action color, hover surface
.link--inlineUnderlined variant for body text
.link--hoverDoc-only hover preview
.link--disabledDisabled look (pair with aria-disabled)
.link__icon20px icon slot
.link__labelLink text
.breadcrumbBreadcrumb nav wrapper
.breadcrumb__listOrdered list, flex wrap
.breadcrumb__itemList item, inline flex
.breadcrumb__linkAncestor link + separator icon
.breadcrumb__separatorChevron between segments
.breadcrumb__currentCurrent page label

Customize (Sass)

  1. Link and breadcrumb spacing

    Override gap, padding, and icon size before importing components.
    @use "pimentcss-design-system" with (
      $link-gap: 0.5rem,
      $link-padding: 0.25rem,
      $link-icon-size: 1.25rem,
      $breadcrumb-gap: 0.25rem
    );
  2. Rebuild CSS

    Run after editing _link.scss or _breadcrumb.scss.
    npm run build:css

Accessibility (RGAA / WCAG)

Links and breadcrumbs

  • Link purpose, link text describes the destination; avoid generic labels like "click here".
  • Decorative icons, aria-hidden="true" on icons beside visible link text.
  • Focus, do not remove :focus-visible; contrast meets AA on action tokens.
  • Disabled, do not leave a focusable href on disabled items; use aria-disabled and remove from tab order.
  • Breadcrumb nav, aria-label="Breadcrumb" on <nav>; use <ol> for order.
  • Current page, aria-current="page" on the last item only; ancestors stay links.
  • Separators, decorative chevrons use aria-hidden="true".

Next steps