GitHub

Checkbox

Binary toggle with indeterminate state, model binding, and size variants.

<rhx-checkbox>

Examples

Basic

Pre-checked

With Hint

We'll only send relevant updates

Indeterminate

Sizes

States

Model Binding

htmx Integration

We'll send you product news and updates
Toggle the checkbox...

Properties

Property Type Default Description
rhx-for ModelExpression - ASP.NET Core model expression for two-way binding
name string - The form field name
rhx-label string - Label text displayed next to the checkbox
rhx-hint string - Hint text displayed below the label
rhx-checked bool false Whether the checkbox is checked
rhx-indeterminate bool false Shows an indeterminate (mixed) state
rhx-size string medium Checkbox size: small, medium, large
rhx-disabled bool false Whether the checkbox is disabled

Accessibility

  • Renders a native <input type="checkbox"> with associated label.
  • Indeterminate state sets aria-checked="mixed".
  • Hint text linked via aria-describedby.
  • Keyboard: Space toggles the checkbox.