Label
An accessible label for a form control. Field renders one for you.
Status: stable. Category: Forms.
import { Label } from '@glyphui/ui'
Exports: Label, labelStyles.
Notes
- Prefer Field, which also wires descriptions, errors and aria attributes.
Label props
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean |
Example: With a control
import { Checkbox, Label } from '@glyphui/ui'
export default function Example() {
return (
<div className="flex items-center gap-2">
<Checkbox id="remember" />
<Label htmlFor="remember">Remember this device</Label>
</div>
)
}
Live page: https://glyphui.xyz/components/label