Checkbox
Add accessible checkbox controls with Radix UI in Webstudio.
Based on Radix Checkbox
The Radix Checkbox component provides a fully customizable checkbox with complete styling control while maintaining accessibility features.
When to Use Radix Checkbox
Use Radix Checkbox when you need:
Custom checkbox styling beyond native browser limits
Animated check indicators
Complex checkbox designs (custom icons, sizes, colors)
Indeterminate state support
For simple forms where native styling is acceptable, the native Checkbox component works well.
Structure
Checkbox
The main checkbox container
Checkbox Indicator
Contains the check mark or icon
How to Use
Drag a Checkbox component from Components > Radix onto your canvas
The component includes a pre-configured indicator
Add a Label and associate it with the checkbox
Style all states (unchecked, checked, disabled)
Properties
Checkbox
id
Unique identifier for label association
name
Form field name for submission
value
Value sent when checked
checked
Control checked state
required
Whether checking is required
disabled
Disable the checkbox
Checkbox Indicator
forceMount
Keep indicator in DOM when unchecked
Basic Setup
Styling States
Data Attributes
Unchecked
[data-state=unchecked]
Default state
Checked
[data-state=checked]
Selected state
Indeterminate
[data-state=indeterminate]
Partial selection
Disabled
[data-disabled]
Cannot interact
Example Styles
Checkbox container:
Default: border, background, size
Checked: different background/border
Focus: visible ring for accessibility
Indicator:
Hidden when unchecked (opacity: 0 or display: none)
Visible when checked (opacity: 1)
Animate with transitions
Indeterminate State
The indeterminate state is useful for "select all" checkboxes:
This indicates partial selection of child items.
Custom Check Icons
Replace the default indicator content:
Add an SVG or icon component inside Checkbox Indicator
Style the icon size and color
Animate on check/uncheck
Animation Tips
Add smooth check animations:
Accessibility
Radix Checkbox provides:
Full keyboard support (Space to toggle)
ARIA attributes automatically applied
Focus management
Screen reader announcements
Ensure you:
Always provide a visible label
Maintain sufficient color contrast
Include focus indicators
Form Integration
Radix Checkbox works with Webstudio forms:
The checkbox value is submitted with the form when checked.
Comparison
Styling
Limited
Full control
Custom icons
No
Yes
Animations
No
Yes
Indeterminate
JavaScript only
Built-in
Accessibility
Browser default
WAI-ARIA
Size
13-16px typically
Any size
Related Components
Native Checkbox - Simple HTML checkbox
Switch - Toggle on/off control
Radio Group - Single selection
Last updated
Was this helpful?
