Link

Links allow users to navigate to different pages or resources. They support various colors, sizes, and can open in new tabs.

Overview

color
info · error · warning · success
size
h1 · h2 · h3 · h4 · h5 · h6 · subtitle1 · subtitle2 · body1 · body2 · caption
Toggles
openInNewTab

All options

Color

Defaults to info.

size \ colorinfosuccesswarningerror
body1info linksuccess linkwarning linkerror link

Size

Defaults to body1.

Examples

Open in new tab

Links with an http:// or https:// href open in a new tab even without openInNewTab.

External link (opens in new tab)

Accessibility

Focus and contrast

Links are always underlined and show a focus ring when reached with Tab. In light mode the text uses the dark shade of each color so it keeps 4.5:1 contrast on light backgrounds. Links that open in a new tab get rel="noopener noreferrer".

Props

PropTypeRequiredDescription
hrefstringYes—
childrenReact.ReactNodeYes—
color'info' | 'error' | 'warning' | 'success'No—
size'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption'No—
openInNewTabbooleanNo—
classNamestringNo—