CheckBox
Description
The CheckBox component is a UI element used for binary selection, allowing users to toggle between two states: checked and unchecked. It provides a simple, clickable interface with an associated label, making it ideal for scenarios where a user chooses one or more items or settings (e.g., "Remember me" options or multi-selection lists).
Usage
Instantiate a CheckBox component using the static helper method from Tesserae.UI. In the sample below, a basic CheckBox is created, with fluent methods to set text, checked state, and disabled state.
API reference
public class CheckBox : ComponentBase<CheckBox, HTMLInputElement>, IObservableComponent<bool>, IRoundedStyle, ITextFormatingA two-state form control (checked / unchecked) used for boolean values.
Constructors
Properties
public bool IsEnabled { get ; set ; }Gets or sets whenever CheckBox is enabled
public bool IsChecked { get ; set ; }Gets or sets whenever CheckBox is checked
Methods
Samples
Basic Usage
The following example demonstrates creating a few CheckBox instances with different configurations: unchecked, checked, disabled, and disabled when checked.