Link
Displays a hyperlink component with multiple styles and states.
'use client'; import { Link } from 'sdaia-ui';export default function LinkRealWorld() { return (Installation
npx sdaia-ui@latest add link
Usage
import { Link } from "@/components/ui/link"<Link href="#">Link text</Link>Examples
Size
Use the `size` prop to change the size of the link.
<Link size="Large" | "Medium" | "Small"/>Default
The default Primary link style.
<Link href="#">Link text</Link>Neutral
Use `style="Neutral"` for a subdued link that blends with surrounding text.
<Link variant="Neutral"/>Inline
Use `inline={true}` for a link embedded within a line of body text.
<Link inline={true}/>Visited
The visited state is applied automatically when the user has already navigated to the link target.
<Link state="Visited"/>Disabled
Use `state="Disabled"` to prevent interaction with the link.
<Link state="Disabled"/>API Reference
Link Props
Props for the Link component.
Prop | Type | Default | Required |
|---|---|---|---|
size? | LinkSize | 'sm' | 'md' | 'lg' | optional |
variant? | LinkStyle | 'primary' | 'neutral' | optional |
inline? | boolean | false | required |
disabled? | boolean | false | optional |
visited? | boolean | false | optional |
leadingIcon? | ReactNode | false | optional |
trailingIcon? | ReactNode | false | optional |
children? | ReactNode | false | optional |