Components · Links

Action link

An action link is a standalone link for lightweight actions like downloads and “view all” navigation, with a leading icon, a trailing icon or both. It is underlined on hover.

How to add an action link to a page. The file is components/css/action-link.css.

Basic Usage

Link the shared stylesheet once per page. Never copy the rules into a page.

StepWhat to do
1. Link<link rel="stylesheet" href="/components/css/action-link.css">. Both templates already have it. The page needs the Material Symbols Outlined font.
2. MarkupA real <a href> with class="action-link action-link--medium".
3. LabelWrap the text in <span class="action-link__label">, so the icons never get the underline.
4. IconsAdd <span class="action-link__icon" aria-hidden="true">chevron_right</span>, and a leading icon when needed. The link has at least one icon: for a link with no icon in a text use an Inline link (also its reverse underline, inline-link--reverse).
5. VariantAdd action-link--bold, --weight-medium or --inverted (on a dark surface).


API

Classes

ClassUse
action-linkThe link.
action-link--large, --medium, --smallSize.
action-link--bold, --weight-mediumBold or Medium weight. Regular is the default.
action-link--invertedFor a dark surface.
action-link__labelThe text. Carries the hover underline.
action-link__iconAn icon.
action-link-group, --stackedA group in one column, 8px between the links.
action-link-group--dividedA group on one row with a vertical divider between the links, wrapping where the row is full.

Things to know

  • Breakpoint: Large and Medium change at 769px. The CSS does this by itself.
  • Always wrap the text in action-link__label: text-decoration on the link itself would also underline the icons.
  • A link with no action-link__icon is not styled: the CSS reverts it to the browser’s default link on purpose. Use an Inline link (inline-link--reverse for underline on hover only) when no icon is wanted.
  • The divided group draws its dividers as pseudo-elements in the gap before each link and clips what sits outside its left edge, so a divider never sits at the start or the end of a line. It has overflow: hidden with 4px of padding (and the same negative margin) so the focus ring is not cut off. The links must be direct children of the group (or wrapped one level, such as li).
  • The hit area is at least 24px high: .action-link::after is an invisible layer that grows the clickable area of a Small link (20px) and of a Medium link on mobile (22px) without changing the drawn size. Keep 8px between stacked links.
  • The focus ring needs body.keyboard-nav, which the templates set on the first Tab press.
  • The [data-state] selectors do nothing outside the documentation pages.

CSS / Tailwind

The component is one CSS file, shared by every page. Link it, never copy it. The CSS below is read from the file the page links, so it is always what you see.

CSS (components/css/action-link.css)