Components

Link

A semantic element for navigation between pages.

<Link>The quick brown fox jumps over the lazy dog.</Link>

API Reference

This component is based on the a element and supports common margin props.

PropTypeDefault
asChildbooleanfalse
sizeenumNo default value
weightResponsive<"light" | "regular" | "medium" | "bold">No default value
trimResponsive<"normal" | "start" | "end" | "both">No default value
underline"auto" | "hover" | "always""auto"
colorenumNo default value
highContrastbooleanNo default value

Examples

Size

Use the size prop to control the size of the link. The prop also provides correct line height and corrective letter spacing—as text size increases, the relative line height and letter spacing decrease.

<Flex direction="column" gap="3">
<Link size="9">The quick brown fox jumps over the lazy dog.</Link>
<Link size="8">The quick brown fox jumps over the lazy dog.</Link>
<Link size="7">The quick brown fox jumps over the lazy dog.</Link>
<Link size="6">The quick brown fox jumps over the lazy dog.</Link>
<Link size="5">The quick brown fox jumps over the lazy dog.</Link>
<Link size="4">The quick brown fox jumps over the lazy dog.</Link>
<Link size="3">The quick brown fox jumps over the lazy dog.</Link>
<Link size="2">The quick brown fox jumps over the lazy dog.</Link>
<Link size="1">The quick brown fox jumps over the lazy dog.</Link>
</Flex>

Weight

Use the weight prop to set the text weight.

<Flex direction="column">
<Link weight="regular">The quick brown fox jumps over the lazy dog.</Link>
<Link weight="medium">The quick brown fox jumps over the lazy dog.</Link>
<Link weight="bold">The quick brown fox jumps over the lazy dog.</Link>
</Flex>

Color

Use the color prop to assign a specific color, ignoring the global theme.

<Flex direction="column">
<Link color="indigo">The quick brown fox jumps over the lazy dog.</Link>
<Link color="cyan">The quick brown fox jumps over the lazy dog.</Link>
<Link color="orange">The quick brown fox jumps over the lazy dog.</Link>
<Link color="crimson">The quick brown fox jumps over the lazy dog.</Link>
</Flex>

Underline

Use the underline prop to manage the visibility of the underline affordance.

<Flex direction="column">
<Link underline="hover">The quick brown fox jumps over the lazy dog.</Link>
<Link underline="always">The quick brown fox jumps over the lazy dog.</Link>
</Flex>

High-contrast

Use the highContrast prop to add additional contrast.

<Flex direction="column">
<Link>The quick brown fox jumps over the lazy dog.</Link>
<Link highContrast>The quick brown fox jumps over the lazy dog.</Link>
</Flex>
PreviousKbd
NextQuote