Checkbox
Boolean input component with tri-state support (checked, unchecked, indeterminate),
labels, descriptions, and form validation integration.
Hide code
<FodCheckbox Label="Accept terms and conditions" @bind-Value="_acceptTerms" />
<FodCheckbox Label="Subscribe to newsletter"
Description="We will send you weekly updates"
@bind-Value="_subscribe" />
Hide code
<FodCheckbox Label="Small" CheckboxSize="CheckboxSize.Small" @bind-Value="_value" />
<FodCheckbox Label="Medium" CheckboxSize="CheckboxSize.Medium" @bind-Value="_value" />
<FodCheckbox Label="Large" CheckboxSize="CheckboxSize.Large" @bind-Value="_value" />
Hide code
<FodCheckbox Label="Unchecked" @bind-Value="_unchecked" />
<FodCheckbox Label="Checked" @bind-Value="_checked" />
<FodCheckbox Label="Select all" Indeterminate="true" @bind-Value="_value" />
<FodCheckbox Label="Disabled" Disabled="true" Value="false" />
<FodCheckbox Label="Error" Error="true" ErrorText="Required" @bind-Value="_value" />
Hide code
<FodCheckbox Label="I agree to the terms" Required="true" @bind-Value="_value" />
<FodCheckbox Label="Read-only" ReadOnly="true" Value="true" />
Hide code
<EditForm Model="@_form" OnSubmit="HandleSubmit">
<FodCheckbox Label="I agree" @bind-Value="_form.AcceptTerms" />
<FodCheckbox Label="Subscribe" @bind-Value="_form.Marketing" />
<FodButton HtmlType="submit"
Disabled="@(_form.AcceptTerms != true)">Submit</FodButton>
</EditForm>
Hide code
<FodCheckbox Label="Select All"
Indeterminate="GetSelectAllIndeterminate()"
Value="GetSelectAllValue()"
ValueChanged="OnSelectAllChanged" />
<FodDivider Orientation="Orientation.Horizontal" />
<FodCheckbox Label="Option 1" @bind-Value="_option1" />
<FodCheckbox Label="Option 2" @bind-Value="_option2" />
Hide code
<div dir="rtl">
<FodCheckbox Label="אני מסכים לתנאי השירות" @bind-Value="_rtlAccept" />
<FodCheckbox Label="הירשם לניוזלטר"
Description="נשלח לך עדכונים שבועיים"
@bind-Value="_rtlNewsletter" />
<FodCheckbox Label="שדה נדרש"
Error="true"
ErrorText="שדה זה נדרש"
@bind-Value="_rtlError" />
</div>
Native <input type="checkbox"> is used for full screen reader support.
Labels are always associated with inputs via wrapping <label> element.
aria-invalid is set when validation errors occur.
aria-describedby links error messages for screen readers.
Indeterminate state uses aria-checked="mixed" for proper announcement.
Space key toggles the checkbox when focused.
Touch targets are at least 44x44px for mobile accessibility.