← Back to all components
Checkboxes & Radios
Custom checkbox and radio components based on Figma design system. Features checked, unchecked, indeterminate, disabled, and error states with light and dark background support.
Live Preview
Checkbox & Radio • Interactive Explorer
Explore all checkbox and radio variants with live preview, code generation, and accessibility information
Component Type
Checked State
Background
Show Label
Inspect Mode
Show design specs
checkbox • unchecked
Option label
♿ Accessibility Spec
Contrast Ratio:5:1 AA
✓ Passes WCAG AA: Suitable for regular UI elements and form controls.
<CheckboxFigma
checked={false}
disabled={false}
error={false}
background="On light"
label="Option label"
onChange={handleChange}
/>Design Tokens
Complete design token definitions for checkbox and radio button components. Export and integrate these tokens into your design system.
{
"light": {
"unchecked": {
"default": {
"background": "transparent",
"checkmark": "transparent",
"border": "#d1d2d4",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
},
"hover": {
"background": "transparent",
"checkmark": "transparent",
"border": "#333333",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
},
"focus": {
"background": "transparent",
"checkmark": "transparent",
"border": "#333333",
"label": "#333333",
"borderRadius": "4px",
"size": "16px",
"outline": "2px solid #141217",
"outlineOffset": "2px"
},
"disabled": {
"background": "#e5e5e5",
"checkmark": "transparent",
"border": "#979797",
"label": "#333333",
"borderRadius": "4px",
"size": "16px",
"cursor": "not-allowed"
},
"error": {
"background": "transparent",
"checkmark": "transparent",
"border": "#aa1d1d",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
}
},
"checked": {
"default": {
"background": "#333333",
"checkmark": "#FFFFFF",
"border": "#333333",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
},
"hover": {
"background": "#1a1a1a",
"checkmark": "#FFFFFF",
"border": "#1a1a1a",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
},
"focus": {
"background": "#333333",
"checkmark": "#FFFFFF",
"border": "#333333",
"label": "#333333",
"borderRadius": "4px",
"size": "16px",
"outline": "2px solid #141217",
"outlineOffset": "2px"
},
"disabled": {
"background": "#e5e5e5",
"checkmark": "#979797",
"border": "#979797",
"label": "#333333",
"borderRadius": "4px",
"size": "16px",
"cursor": "not-allowed"
},
"error": {
"background": "#333333",
"checkmark": "#FFFFFF",
"border": "#aa1d1d",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
}
},
"indeterminate": {
"default": {
"background": "#333333",
"checkmark": "#FFFFFF",
"border": "#333333",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
},
"hover": {
"background": "#1a1a1a",
"checkmark": "#FFFFFF",
"border": "#1a1a1a",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
},
"focus": {
"background": "#333333",
"checkmark": "#FFFFFF",
"border": "#333333",
"label": "#333333",
"borderRadius": "4px",
"size": "16px",
"outline": "2px solid #141217",
"outlineOffset": "2px"
},
"disabled": {
"background": "#e5e5e5",
"checkmark": "#979797",
"border": "#979797",
"label": "#333333",
"borderRadius": "4px",
"size": "16px",
"cursor": "not-allowed"
},
"error": {
"background": "#333333",
"checkmark": "#FFFFFF",
"border": "#aa1d1d",
"label": "#333333",
"borderRadius": "4px",
"size": "16px"
}
}
},
"dark": {
"unchecked": {
"default": {
"background": "transparent",
"checkmark": "transparent",
"border": "#d1d2d4",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
},
"hover": {
"background": "transparent",
"checkmark": "transparent",
"border": "#f5f5f5",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
},
"focus": {
"background": "transparent",
"checkmark": "transparent",
"border": "#f5f5f5",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px",
"outline": "2px solid #FFFFFF",
"outlineOffset": "2px"
},
"disabled": {
"background": "#e5e5e5",
"checkmark": "transparent",
"border": "#979797",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px",
"cursor": "not-allowed"
},
"error": {
"background": "transparent",
"checkmark": "transparent",
"border": "#aa1d1d",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
}
},
"checked": {
"default": {
"background": "#d1d2d4",
"checkmark": "#1f1f24",
"border": "#d1d2d4",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
},
"hover": {
"background": "#f5f5f5",
"checkmark": "#1f1f24",
"border": "#f5f5f5",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
},
"focus": {
"background": "#d1d2d4",
"checkmark": "#1f1f24",
"border": "#d1d2d4",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px",
"outline": "2px solid #FFFFFF",
"outlineOffset": "2px"
},
"disabled": {
"background": "#e5e5e5",
"checkmark": "#979797",
"border": "#979797",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px",
"cursor": "not-allowed"
},
"error": {
"background": "#d1d2d4",
"checkmark": "#1f1f24",
"border": "#aa1d1d",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
}
},
"indeterminate": {
"default": {
"background": "#d1d2d4",
"checkmark": "#1f1f24",
"border": "#d1d2d4",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
},
"hover": {
"background": "#f5f5f5",
"checkmark": "#1f1f24",
"border": "#f5f5f5",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
},
"focus": {
"background": "#d1d2d4",
"checkmark": "#1f1f24",
"border": "#d1d2d4",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px",
"outline": "2px solid #FFFFFF",
"outlineOffset": "2px"
},
"disabled": {
"background": "#e5e5e5",
"checkmark": "#979797",
"border": "#979797",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px",
"cursor": "not-allowed"
},
"error": {
"background": "#d1d2d4",
"checkmark": "#1f1f24",
"border": "#aa1d1d",
"label": "#d1d2d4",
"borderRadius": "4px",
"size": "16px"
}
}
}
}Color Semantics & Usage
CHECKED
Meaning:
Selected state, active choice
Common Uses:
- • Checkbox checked
- • Radio selected
- • Toggle on
ERROR
Meaning:
Validation error, required field missing
Common Uses:
- • Required checkbox not checked
- • Invalid selection
AA on light background (4.8:1)
DISABLED
Meaning:
Unavailable action, non-interactive
Common Uses:
- • Locked setting
- • Unavailable option
- • Read-only state
Figma Variants Table
Checkboxes & Radios
State: Default
State: Checked
State: Indeterminate
State: Disabled
State: Error
On Light
Default
Checked
Indeterminate
Disabled
Error
On Dark
Default
Checked
Indeterminate
Disabled
Error
Usage (React)
Basic checkbox usage with controlled state.
import { useState } from 'react';
import Checkbox from '@/components/design-system/Checkboxes-n-Radios/Checkbox';
export function Example() {
const [checked, setChecked] = useState(false);
return (
<Checkbox
checked={checked}
onChange={setChecked}
label="Accept terms"
/>
);
}Figma Variants
The component supports all Figma variants including background themes:
import CheckboxFigma from '@/components/design-system/Checkboxes-n-Radios/Checkbox.Figma';
// Light background
<CheckboxFigma
checked={checked}
onChange={setChecked}
label="Light theme"
background="On light"
/>
// Dark background
<CheckboxFigma
checked={checked}
onChange={setChecked}
label="Dark theme"
background="On dark"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | — | Checked state |
| indeterminate | boolean | false | Indeterminate state |
| disabled | boolean | false | Disable interaction |
| error | boolean | false | Error state |
| label | string | — | Label text |
| onChange | (checked: boolean) => void | — | Change callback |
| background | 'On light' | 'On dark' | 'On light' | Background theme (Figma only) |
| className | string | '' | Extra classes |
Variants
defaultcheckedindeterminatedisablederroron-lighton-dark
Code
Source
/src/components/design-system/Checkboxes-n-Radios/Checkbox.demo.tsx