Primitive / Atomstable
Label
Form label primitive with shared glass-aware variants.
@glinui/uiComponent: label
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 labelUsage
TSX
1import { Input, Label } from "@glinui/ui"23export function Demo() {4 return (5 <div className="space-y-2">6 <Label htmlFor="email">Email address</Label>7 <Input id="email" type="email" placeholder="name@example.com" />8 </div>9 )10}
Accessibility
- Uses semantic `<label>` for screen reader form-field association.
ARIA Attributes
- `htmlFor` should match form control `id`
Reduced Motion
No motion-dependent behavior.
API Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
htmlFor | string | - | - | Associates label with a form control id. |
variant | "default" | "glass" | "outline" | "ghost" | No | default | Surface treatment. |
size | "sm" | "md" | "lg" | No | md | Font-size scale. |
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/label.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
LabelProps
LabelProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
size | "sm" | "md" | "lg" | No | "md" | Variant option from labelVariants. |
variant | "default" | "glass" | "outline" | "ghost" | No | "default" | Variant option from labelVariants. |