File: link.md | Updated: 11/15/2025
ThemesThemes PrimitivesPrimitives IconsIcons ColorsColors
Getting started Styling Layout Releases Resources
Overview Color Dark mode Typography Spacing Breakpoints Radius Shadows Cursors
Box Flex Grid Container Section
Text Heading Blockquote Code Em Kbd Link Quote Strong
Alert Dialog Aspect Ratio Avatar Badge Button Callout Card Checkbox Checkbox Group Checkbox Cards Context Menu Data List Dialog Dropdown Menu Hover Card Icon Button Inset Popover Progress Radio Radio Group Radio Cards Scroll Area Segmented Control Select Separator Skeleton Slider Spinner Switch Table Tabs Tab Nav Text Area Text Field Tooltip
Accessible Icon Portal Reset Slot Theme Visually Hidden
Components
Semantic element for navigation between pages.
View source Report an issue View in Playground
<Link href="#">Sign up</Link>
This component is based on the a element and supports common margin props
.
| Prop | Type | Default |
| --- | --- | --- |
| asChild<br><br>Prop description | boolean | No default value |
| size | Responsive<enum><br><br>See full type | No default value |
| weight | Responsive<"light" \| "regular" \| "medium" \| "bold"> | No default value |
| trim<br><br>Prop description | Responsive<"normal" \| "start" \| "end" \| "both"> | No default value |
| truncate<br><br>Prop description | boolean | No default value |
| wrap<br><br>Prop description | Responsive<"wrap" \| "nowrap" \| "pretty" \| "balance"> | No default value |
| underline<br><br>Prop description | "auto" \| "always" \| "hover" \| "none" | "auto" |
| color<br><br>Prop description | enum<br><br>See full type | No default value |
| highContrast<br><br>Prop description | boolean | No default value |
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.
Sign up Sign up Sign up Sign up Sign up Sign up Sign up Sign up Sign up
<Flex direction="column" gap="3">
<Link href="#" size="1">
Sign up
</Link>
<Link href="#" size="2">
Sign up
</Link>
<Link href="#" size="3">
Sign up
</Link>
<Link href="#" size="4">
Sign up
</Link>
<Link href="#" size="5">
Sign up
</Link>
<Link href="#" size="6">
Sign up
</Link>
<Link href="#" size="7">
Sign up
</Link>
<Link href="#" size="8">
Sign up
</Link>
<Link href="#" size="9">
Sign up
</Link>
</Flex>
Use the weight prop to set the text weight.
<Flex direction="column">
<Link href="#" weight="regular">
Sign up
</Link>
<Link href="#" weight="medium">
Sign up
</Link>
<Link href="#" weight="bold">
Sign up
</Link>
</Flex>
Use the truncate prop to truncate text with an ellipsis when it overflows its container.
<Flex maxWidth="150px">
<Link href="#" truncate>
Sign up to the newsletter
</Link>
</Flex>
Use the color prop to assign a specific color
.
Sign up Sign up Sign up Sign up
<Flex direction="column">
<Link href="#" color="indigo">
Sign up
</Link>
<Link href="#" color="cyan">
Sign up
</Link>
<Link href="#" color="orange">
Sign up
</Link>
<Link href="#" color="crimson">
Sign up
</Link>
</Flex>
Use the highContrast prop to increase color contrast with the background.
<Flex direction="column">
<Link href="#" color="gray">
Sign up
</Link>
<Link href="#" color="gray" highContrast>
Sign up
</Link>
</Flex>
Use the underline prop to manage the visibility of the underline affordance.
<Flex direction="column">
<Link href="#" underline="hover">
Sign up
</Link>
<Link href="#" underline="always">
Sign up
</Link>
</Flex>
PreviousKbd
NextQuote