Componentsv2.189.1
Iconsv1.19.0
MCPv0.8.62
Tokensv0.34.3

Links are used to navigate to a new location, open or download an asset, or serve as an inline action.

Structure

The Link component may be used as a regular hyperlink or an inline button. As a hyperlink, the Link uses a native HTML <a> element. With an onClick handler and no href, a native HTML <button> will be used instead. Using these elements maintains proper semantic roles and meaning and ensure the Link's purpose is accurately communicated to assistive technology.

External links have the safe HTML attributes target="_blank" and rel="noopener noreferrer" applied automatically to ensure that the original tab cannot be improperly accessed.

ARIA

table
ElementAttributeDescription
Linkaria-disabledSet to true when the link is disabled.

Disabled

The disabled attribute is used to prevent interaction with the form control it's applied to and its descendants. However, it's not supported on the <a> element. To address this, when the Link is disabled, the aria-disabled and tabIndex="-1" attributes are added to remove the element from the tab order, prevent click events, and make the Link's disabled state clear to assistive technology.

Keyboard

table
KeyFunction
EnterActivates the Link.
Enter/SpaceActivates the Link when an onClick handler is present with no href.
Shift+TabMoves focus to the previous focusable element.
TabMoves focus to the next focusable element.

On this page