📄 radixui/themes/docs/components/link

File: link.md | Updated: 11/15/2025

Source: https://www.radix-ui.com/themes/docs/components/link

Radix Homepage

Made by WorkOS

Radix Homepage

Made by WorkOS

ThemesThemes PrimitivesPrimitives IconsIcons ColorsColors

Documentation Playground Blog

Overview

Getting started Styling Layout Releases Resources

Theme

Overview Color Dark mode Typography Spacing Breakpoints Radius Shadows Cursors

Layout

Box Flex Grid Container Section

Typography

Text Heading Blockquote Code Em Kbd Link Quote Strong

Components

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

Utilities

Accessible Icon Portal Reset Slot Theme Visually Hidden

Components

Link

Semantic element for navigation between pages.

View source Report an issue View in Playground

Sign up

<Link href="#">Sign up</Link>

API Reference


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 |

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.

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>

Weight

Use the weight prop to set the text weight.

Sign up Sign up Sign up

<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>

Truncate

Use the truncate prop to truncate text with an ellipsis when it overflows its container.

Sign up to the newsletter

<Flex maxWidth="150px">
	<Link href="#" truncate>
		Sign up to the newsletter
	</Link>
</Flex>

Color

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>

High-contrast

Use the highContrast prop to increase color contrast with the background.

Sign up Sign up

<Flex direction="column">
	<Link href="#" color="gray">
		Sign up
	</Link>
	<Link href="#" color="gray" highContrast>
		Sign up
	</Link>
</Flex>

Underline

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

Sign up Sign up

<Flex direction="column">
	<Link href="#" underline="hover">
		Sign up
	</Link>
	<Link href="#" underline="always">
		Sign up
	</Link>
</Flex>

PreviousKbd

NextQuote

Edit this page on GitHub.