Link

import {Link} from "@qualcomm-ui/react/link"

Examples

Emphasis (color)

Links support different emphasis (colors) to match your design needs. Customize these with the emphasis property.

<Link>Default</Link>
<Link emphasis="neutral">Neutral</Link>

Icons

Links can include icons to provide additional visual context. QUI links support lucide-react icons.

<Link endIcon={ChevronRight}>Next Page</Link>
<Link startIcon={ChevronLeft}>Go Back</Link>

Sizes

Adjust the font and icon size of the link using the size prop. The default size is sm.

<Link endIcon={ExternalLink} size="xs">
  Link
</Link>
<Link endIcon={ExternalLink} size="sm">
  Link
</Link>
<Link endIcon={ExternalLink} size="md">
  Link
</Link>
<Link endIcon={ExternalLink} size="lg">
  Link
</Link>
<Link endIcon={ExternalLink} size="xl">
  Link
</Link>
<Link endIcon={ExternalLink} size="xxl">
  Link
</Link>

Disabled

When disabled is true, the link becomes non-interactive and is rendered with reduced opacity to indicate its unavailable state.

<Link disabled endIcon={ExternalLink}>
  Disabled
</Link>

Render Prop

Use the render prop to render the link component as a different element, such as a React Router Link for client-side navigation. Refer to our Polymorphic Components guide to learn more.

<Link render={<ReactRouterLink to="/components/link#as-prop" />}>Link</Link>

API

A link to another page or resource. Renders an <a> element by default.
PropTypeDefault
React children prop.
The document's text/writing direction.
'ltr' | 'rtl'
'ltr'
Controls whether the link is interactive. When true, pointer/focus events are blocked, and the link is visually dimmed.
boolean
The color of the link.
| 'default'
| 'neutral'
'default'
Icon positioned after the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.
| LucideIcon
| ReactNode
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
The size of the link and its elements. Governs properties like font size, item padding, and icon sizes.
| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| 'xxl'
'sm'
Icon positioned before the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.
| LucideIcon
| ReactNode
Description
React children prop.
Type
'ltr' | 'rtl'
Description
The document's text/writing direction.
Type
boolean
Description
Controls whether the link is interactive. When true, pointer/focus events are blocked, and the link is visually dimmed.
Type
| 'default'
| 'neutral'
Description
The color of the link.
Type
| LucideIcon
| ReactNode
Description
Icon positioned after the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
Type
| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| 'xxl'
Description
The size of the link and its elements. Governs properties like font size, item padding, and icon sizes.
Type
| LucideIcon
| ReactNode
Description
Icon positioned before the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.

Start Icon

Provided via the startIcon prop.

End Icon

Provided via the endIcon prop.