QUI React

Link

Links allow users to navigate to a different location. They can be presented inside a paragraph or as standalone text.

import {QLink} from "@qui/react"

Examples

Showcase

import {ReactNode} from "react"
import {ChevronRight} from "lucide-react"
import {QLink} from "@qui/react"
export default function Showcase(): ReactNode {
return (
<div className="grid justify-center gap-4">
<QLink
endIcon={ChevronRight}
href="https://google.com"
target="_blank"
variant="primary"
>
Primary Link
</QLink>
<QLink
endIcon={ChevronRight}
href="https://bing.com"
target="_blank"
variant="secondary"
>
Secondary Link
</QLink>
</div>
)
}

Disabled

The disabled property applies the disabled style to the link and prevents pointer and keyboard events.

import {ReactNode} from "react"
import {ChevronRight} from "lucide-react"
import {QLink} from "@qui/react"
export default function Disabled(): ReactNode {
return (
<div className="grid justify-center gap-4">
<QLink disabled endIcon={ChevronRight} variant="primary">
Primary Link
</QLink>
<QLink disabled endIcon={ChevronRight} variant="secondary">
Secondary Link
</QLink>
</div>
)
}

API

Props

Name & DescriptionOption(s)Default
The component used for the root node. It can be a React component or element.
| ElementType
| ComponentType
'a'
React children prop. The content of the component.
ReactNode
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
string
Class applied to the element that wraps the component's children.
string
If true, the component is disabled.
boolean
false
lucide-react icon, positioned after the label.
| LucideIcon
| ReactNode
Icon, positioned before the label.
| LucideIcon
| ReactNode
The style global attribute contains CSS styling declarations to be applied to the element.
CSSProperties
The style variant of the link.
| 'primary'
| 'secondary'
'primary'
Type
| ElementType
| ComponentType
Default
'a'
Description
The component used for the root node. It can be a React component or element.
Description
React children prop. The content of the component.
Type
string
Description
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
Type
string
Description
Class applied to the element that wraps the component's children.
Type
boolean
Default
false
Description
If true, the component is disabled.
Type
| LucideIcon
| ReactNode
Description
lucide-react icon, positioned after the label.
Type
| LucideIcon
| ReactNode
Description
Icon, positioned before the label.
Description
The style global attribute contains CSS styling declarations to be applied to the element.
Type
| 'primary'
| 'secondary'
Default
'primary'
Description
The style variant of the link.