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"><QLinkendIcon={ChevronRight}href="https://google.com"target="_blank"variant="primary">Primary Link</QLink><QLinkendIcon={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 & Description | Option(s) | Default |
---|---|---|
The component used for the root node. It can be a React component or
element. |
| 'a' |
ReactNode | ||
The className property of the Element
interface gets and sets the value of the
class attribute
of the specified element. |
| |
Class applied to the element that wraps the component's children. |
| |
If true, the component is disabled. |
| false |
lucide-react icon, positioned after the label. |
| |
Icon, positioned before the label. |
| |
The style global attribute
contains CSS styling
declarations to be applied to the element. | CSSProperties | |
The style variant of the link. |
| 'primary' |
Type
| ElementType| ComponentType
Default
'a'
Description
The component used for the root node. It can be a React component or
element.
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.
Type
CSSProperties
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.