Label
Basic Usage
Loading...
Installation
pnpm add @corew500/uiUsage
import { Label } from "@corew500/ui/label"
<Label>Content</Label>CMS Integration
Loading...
API Reference
Accessibility
Focus Management
- Screen readers will announce label when input is focused
- Clicking label focuses the associated input
Screen Readers
- For Base UI controls (Checkbox, Switch, RadioGroupItem), use aria-labelledby pointing to the Label's id instead, since their hidden input receives the id prop
Additional
- - Uses native label element for proper form association
- Use htmlFor to connect with input id for standard inputs (Input, Textarea, native Select)
Localization
Translatable Content
- - Pass translated strings as children
- Required indicators and helper text should be localized