Gloss UIv4.4
Architecture
Style Guide
Primitives
Input
TextNumberTextareaSelectCheckboxRadioToggle
Output7
Actions4
Forms2
Dashboard10
Composites
Compositions
Planning
Applications

Prototypes

Gloss UIv4.4
Architecture
Style Guide
Primitives
Input
TextNumberTextareaSelectCheckboxRadioToggle
Output7
Actions4
Forms2
Dashboard10
Composites
Compositions
Planning
Applications

Prototypes

Checkbox

Boolean selection controls for choosing one or multiple options from a set. Supports checked, unchecked, and indeterminate states with convex physics for tactile elevation on interaction. Use checkboxes when users can select zero, one, or multiple items independently.

Checkbox StatesInteractive
Default
Error
Disabled
Unchecked
Checked
Indeterminate

Physics: Checkboxes use convex shadows to create depth. On hover, the checkbox elevates slightly (-1px) with expanded shadow. The check icon scales in with a spring animation on selection.

Size Variants
Small (16px)
Medium (20px)
Large (24px)
Current State: unchecked
Hover
Checkbox lifts -1px with elevated shadow
Check
Fill animates, check icon scales in with spring easing
Focus
Blue focus ring appears for keyboard navigation

Examples

Basic Checkbox

Simple checkbox with a label for basic boolean selection.

Controlled Checkbox

Manage checkbox state with React state for controlled behavior.

Default Checked

Start with the checkbox already selected using uncontrolled mode.

Indeterminate State

Use indeterminate to show a partially-selected parent when some but not all children are selected.

With Helper Text

Add additional context or instructions below the checkbox.

We'll send a verification code to your phone each time you sign in

Required Field

Mark the checkbox as required with a visual indicator.

Error State

Display validation errors with status and helper text.

You must accept the terms to continue

Confirmed Selection

Show a pre-checked checkbox for confirmed settings.

Your preferences have been saved

Disabled States

Disable interaction for readonly or unavailable options.

Variant Styling

Use the variant prop to apply visual emphasis for error states.

All Sizes Comparison

Compare all three sizes for different density requirements.

CheckboxGroup with Options

Use CheckboxGroup to manage multiple selections with an options array.

Select your interests

Horizontal CheckboxGroup

Arrange checkboxes horizontally for compact layouts.

File formats to export

CheckboxGroup with Disabled Options

Disable specific options within a group while keeping others interactive.

Subscription features
Requires phone verification

CheckboxGroup with Error

Show validation errors for the entire group.

Select at least one option *
Please select at least one communication preference

Form Usage Pattern

Common pattern for terms acceptance in forms with validation.

Best Practices

Do

  • Use clear, action-oriented labels
  • Provide helper text for complex options
  • Use indeterminate for parent checkboxes
  • Group related checkboxes together
  • Mark required fields clearly

Don't

  • Don't use checkboxes for mutually exclusive options (use Radio instead)
  • Don't use negative labels ("Don't send emails")
  • Don't hide important options in collapsed groups
  • Don't overload with too many options (consider progressive disclosure)

Checkbox Props

PropTypeDefaultDescription
checkedboolean-Controlled checked state
defaultCheckedbooleanfalseInitial checked state (uncontrolled)
indeterminatebooleanfalseShow indeterminate (minus) state
onChange(e: ChangeEvent) => void-Native change event handler
onCheckedChange(checked: boolean) => void-Convenience handler with boolean value
labelReactNode-Label content
helperTextstring-Helper text below checkbox
variant'default' | 'error''default'Visual variant (error styling)
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Checkbox size
requiredbooleanfalseMark as required field
disabledbooleanfalseDisable the checkbox

Accessibility

  • Keyboard: Space to toggle, Tab to navigate between checkboxes
  • ARIA: Uses native checkbox with aria-checked (including "mixed" for indeterminate)
  • Focus: Visible focus ring for keyboard navigation
  • Labels: Always associate labels with checkboxes via htmlFor
  • Error states: Uses aria-invalid and aria-describedby for helper text