On this page

Actions

Link

A styled link for navigation.

Link navigates to another URL or route. Use Button for an action such as saving, submitting, or opening a dialog.

Link: Basic
Loading Link: Basic example

Appearance

text is the default. Text Links use the theme's label weight, 500 by default, to stand out from the surrounding text. Use them only inline within text that has a lighter weight, such as body text. Set appearance="button" when the destination needs a button-shaped call to action. A button-shaped Link remains a link and keeps its native navigation behaviour.

Link: Appearance
Loading Link: Appearance example

Prominence

standard is the default. Choose low for a secondary destination. Text Links have low and standard prominence only, because high would look the same as standard. Text Links use the accent text colour at both, so prominence changes the underline and not the hue. Hover and press toggle the underline. Low text Links have no underline at rest and gain one, and standard text Links are underlined at rest and lose it. Keyboard focus shows the focus ring, and low text Links also underline. Press also shifts the text colour. On a solid background, both take the background's readable text colour.

Button-shaped Links keep high, which uses the theme's primary accent treatment.

Link: Prominence
Loading Link: Prominence example

Presentation reference

Link: Presentation reference
Loading Link: Presentation reference example

Disabled

Set isDisabled only when a destination is temporarily unavailable. Disabled links cannot receive focus or respond to activation. Explain why nearby when someone needs that information.

Link: Disabled
Loading Link: Disabled example

Accessibility

Write link text that names the destination and makes sense outside its surrounding sentence. Avoid generic labels such as “Click here”.

API

LinkProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.

NameTypeDefault
appearance
"button" |⁠ "text"text

Sets whether the control uses button or text-link styling.

download
boolean |⁠ string—

Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN.

endContent
ReactNode—
href*
NonNullable<RacLinkProps['href']>—

URL the Link points to.

hrefLang
string—

Hints at the human language of the linked URL. SeeMDN.

inlineSize
'auto' |⁠ 'full'auto

Use full to fill the available inline size.

ping
string—

A space-separated list of URLs to ping when the link is followed. See MDN.

prominence
standard

Controls the strength of the control's visual treatment, from low to standard. Controls the strength of the control's visual treatment, from low to high.

referrerPolicy
HTMLAttributeReferrerPolicy—

How much of the referrer to send when following the link. See MDN.

rel
string—

The relationship between the linked resource and the current page. See MDN.

size
'small' |⁠ 'medium'medium

Sets the size of the control.

startContent
ReactNode—
target
HTMLAttributeAnchorTarget—

The target window for the link. See MDN.