Skip to main content

Link

A link: burnt sienna in prose, quiet ink in rows, muted for chrome.

orders Marmot documentation Members orders
<mm-link href="/discover/mrn://postgresql/table/shop.public.orders">orders</mm-link>
<mm-link href="https://marmotdata.io/docs" external>Marmot documentation</mm-link>
<mm-link href="/settings/members" muted>Members</mm-link>
<mm-link href="/discover/mrn://postgresql/table/shop.public.orders" quiet>orders</mm-link>

Guidance​

Links take the reader somewhere: another asset, a run, the documentation. In running prose they are burnt sienna with a 1px underline that thickens to 2px on hover. In lists, tables, rows and cards use quiet: ink with no underline until hover or focus, so burnt sienna is left for the primary button, the current tab and real links in text. Chrome links in toolbars and footers use muted (ink-2). External links open in a new tab, carry an open-in-new icon and say so to screen readers, in every variant. Focus shows the ink ring, never burnt sienna.

Follows the WAI-ARIA link pattern: https://www.w3.org/WAI/ARIA/apg/patterns/link/

Properties​

PropertyAttributeTypeDefaultDescription
hrefhrefstring''Destination URL.
externalexternalbooleanfalseOpens in a new tab with rel="noopener noreferrer", shows an open-in-new icon and announces it.
mutedmutedbooleanfalseInk-2 for chrome links (footers, toolbars, breadcrumbs) instead of burnt sienna.
quietquietbooleanfalseInk with no underline until hover or focus, for links in lists, tables, rows and cards. Prose links stay burnt sienna.
downloaddownloadstring | undefinedSuggests a file name and downloads the target.
currentcurrent'page' | 'step' | 'location' | undefinedMarks the link as the current page, for example in a breadcrumb trail.

Slots​

SlotDescription
DefaultThe link text.

CSS parts​

PartDescription
linkThe native anchor.
iconThe open-in-new icon on external links.

Examples​

Every state of mm-link in Storybook, with keyboard and screen reader tests.