Components
Link
A styled link component that wraps Next.js Link with variant and size support, and automatic external link handling.
Next.js Only
Link is only compatible with Next.js.
Preview
Installation
bunx shadcn@latest add @sft-ui/linkVariants
Sizes
External Links
External URLs automatically open in a new tab with rel="noopener noreferrer".
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "muted" | "block" | "default" | The visual style of the link. |
size | "default" | "sm" | "lg" | "default" | The text size of the link. |
href | string | UrlObject | — | The link destination. External URLs render as <a> tags. |
className | string | — | Additional CSS classes to apply. |
All Next.js Link props are supported for internal links.