Primitive / Atomstable
Link
Tokenized anchor primitive with focus ring and variant surfaces.
@glinui/uiComponent: link
Installation
Install from the package for shared ownership or from the registry for copy-paste control.
Package Manager
pnpm add @glinui/ui @glinui/tokensRegistry
pnpm dlx @glinui/cli@latest add linkUsage
TSX
1import { Link } from "@glinui/ui"23export function Demo() {4 return (5 <div className="flex flex-wrap gap-2">6 <Link href="#">Default</Link>7 <Link href="#" variant="glass">Glass</Link>8 <Link href="#" variant="outline">Outline</Link>9 <Link href="#" variant="ghost">Ghost</Link>10 </div>11 )12}
Accessibility
- Uses semantic anchor element with keyboard navigation.
- Focus-visible ring is applied for keyboard users.
Keyboard Interactions
| Key | Action |
|---|---|
| Enter | Open the link destination. |
ARIA Attributes
- `role="link"` native
- `aria-current` for active navigation states
Reduced Motion
Hover/focus styles are color-only and respect reduced motion settings.
Affected properties
colorbackground-colorborder-colorAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
href | string | - | - | Destination URL. |
variant | "default" | "glass" | "outline" | "ghost" | No | default | Surface treatment. |
size | "sm" | "md" | "lg" | No | md | Text scale. |
underline | "true" | "false" | No | true | Enable underline decoration. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Generated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/link.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-02-19T17:59:28.468Z · Full index: /docs/api-metadata
Primary Props Type
LinkProps
LinkProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
size | "sm" | "md" | "lg" | No | "md" | Variant option from linkVariants. |
underline | "true" | "false" | No | true | Variant option from linkVariants. |
variant | "default" | "glass" | "outline" | "ghost" | No | "default" | Variant option from linkVariants. |