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/tokens

Registry

pnpm dlx @glinui/cli@latest add label

Usage

TSX
1import { Input, Label } from "@glinui/ui"
2
3export 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

PropTypeRequiredDefaultDescription
htmlForstring--Associates label with a form control id.
variant"default" | "glass" | "outline" | "ghost"NodefaultSurface treatment.
size"sm" | "md" | "lg"NomdFont-size scale.

Source

Import directly from the package or browse the source on GitHub. Click any file to view it.

Import

import { Label } from "@glinui/ui"

Source Files

Dependencies

@glinui/ui

Generated API Snapshot

Beta

Auto-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

PropTypeRequiredDefaultDescription
size"sm" | "md" | "lg"No"md"Variant option from labelVariants.
variant"default" | "glass" | "outline" | "ghost"No"default"Variant option from labelVariants.