Link
Links are foundational navigation elements that connect users to related content, external resources, or different sections within your application.
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>
<Link emphasis="brand">brand</Link>
<div className="bg-persistent-black p-4">
<Link emphasis="white-persistent">white-persistent</Link>
</div>
Icons
Links can include icons to provide additional visual context. QUI links support lucide-react icons.
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
<Link>
| Prop | Type | Default |
|---|---|---|
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' | 'default' |
| LucideIcon | ||
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement | |
The size of the link and its elements. Governs properties like font size,
item padding, and icon sizes. | | 'xs' | 'sm' |
| LucideIcon |
'ltr' | 'rtl'
booleantrue, pointer/focus
events are blocked, and the link is visually dimmed.| 'default'
| 'neutral'
| 'brand'
| 'white-persistent'
| LucideIcon
| ReactNode
LucideIcon, the size will automatically match the size prop.
Supply as a ReactElement for additional customization.| ReactElement
| ((
props: object,
) => ReactElement)
| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| 'xxl'
| Attribute / Property | Value |
|---|---|
className | 'qui-link__root' |
data-disabled | |
data-emphasis | | 'default' |
data-part | 'root' |
data-scope | 'link' |
data-size | | 'xs' |
className'qui-link__root'data-disableddata-emphasis| 'default'
| 'neutral'
| 'brand'
| 'white-persistent'
data-part'root'data-scope'link'data-size| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| 'xxl'
Start Icon
Provided via the startIcon prop.
| Attribute / Property | Value |
|---|---|
className | 'qui-link__icon' |
data-part | 'icon' |
data-placement | 'start' |
data-scope | 'link' |
data-size | | 'xs' |
className'qui-link__icon'data-part'icon'data-placement'start'data-scope'link'data-size| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| 'xxl'
End Icon
Provided via the endIcon prop.
| Attribute / Property | Value |
|---|---|
className | 'qui-link__icon' |
data-part | 'icon' |
data-placement | 'end' |
data-scope | 'link' |
data-size | | 'xs' |
className'qui-link__icon'data-part'icon'data-placement'end'data-scope'link'data-size| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| 'xxl'
<a>element by default.