Link
A styled anchor element with variants for navigation and inline text links.
Installation#
pnpm dlx shadcn@latest add @davinciui/linkUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
variantVisual variant. | "default" | "muted" | "underline" | "default" |
sizeText size. | "default" | "sm" | "lg" | "default" |
hrefLink URL. | string | — |
classNameAdditional CSS classes. | string | — |
Accessibility#
A native anchor, so keyboard activation and link semantics come from the browser. focus-visible adds a ring, but meaningful link text and any external-link icon labeling remain the consumer responsibility.
Motion#
Static link primitive with only a CSS color transition and hover underline; no timing props, keyframes, or animation loop exist. prefers-reduced-motion is not detected because there is no transform or continuous motion.
View source
Click the icon in the preview toolbar to browse source for each variant.
Keep in mind
This component is inspired by various open-source projects and patterns. Please verify licenses and implementation details before using in production.
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

