Label
Add accessible form labels with Radix UI in Webstudio.
Last updated
Was this helpful?
Add accessible form labels with Radix UI in Webstudio.
Based on Radix Label
The Radix Label component provides an accessible label for form controls with built-in association handling.
While the native HTML <label> element works for most cases, the Radix Label provides:
Automatic ID generation and association
Better focus behavior
Consistent cross-browser behavior
Integration with other Radix components
Use Radix Label when:
Working with other Radix form components (Checkbox, Switch, Radio Group)
You need consistent styling across all form labels
Building custom form controls
For native HTML form elements, the native Label component works well.
for
ID of the associated form control
id
Unique identifier
When the label wraps the control, clicking anywhere on the label toggles the checkbox.
Style the Label like any text element:
Font size and weight
Color and spacing
Cursor (pointer for clickable areas)
Always label form controls: Every input needs a label
Keep labels visible: Don't rely only on placeholders
Be concise: Clear, short label text
Position consistently: Above or beside controls
Native Label - HTML label element
Checkbox - Radix checkbox
Switch - Toggle switch
Radio Group - Radio buttons
Last updated
Was this helpful?
Was this helpful?
Label
βββ Radix Checkbox
β βββ Checkbox Indicator β β
βββ "Enable notifications"Label (for: email-input)
βββ "Email Address"
Input (id: email-input)