# Checkbox > Boolean input with checkbox styling and two-way binding. Source: https://shellui.dev/docs/v0.4/components/form/checkbox The Checkbox component provides a styled checkbox input for boolean selections. ## Installation ```bash shellui add checkbox ``` ## Usage ### Basic ```razor @code { private bool isChecked = false; private void HandleChanged(bool value) { isChecked = value; } } ``` ### Two-way Binding ```razor @code { private bool isChecked = false; } ``` ### With Label ```razor
@code { private bool acceptTerms = false; } ``` ### Disabled ```razor
``` ### Form Integration ```razor
@code { private FormModel model = new(); private void HandleSubmit() { } private class FormModel { public bool AcceptTerms { get; set; } public bool Subscribe { get; set; } } } ``` ## API Reference | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `Checked` | `bool` | `false` | Checked state | | `CheckedChanged` | `EventCallback` | — | Fires when checked state changes | | `Disabled` | `bool` | `false` | Disables the checkbox | | `Class` | `string?` | `null` | Additional CSS classes | ## Accessibility - Proper ARIA attributes (`role="checkbox"`, `aria-checked`) - Keyboard navigation support (Space to toggle) - Screen reader compatible