BOBInputCheckbox
Boolean input checkbox with label, helper text, and custom icons for checked/unchecked states. Optionally tri-state
API reference ↗Basic usage
You must accept to continue.
RAZOR
<BOBInputCheckbox @bind-Value="_basic" Label="Accept terms" HelperText="You must accept to continue." />Indeterminate
Nullability activates tri-state
RAZOR
<BOBInputCheckbox TValue="bool?" @bind-Value="_indeterminateValue" Label="Tristate Checkbox"
HelperText="Nullability activates tri-state" />Sizes
RAZOR
<BOBInputCheckbox @bind-Value="_small" Size="BOBSize.Small" Label="Small" />
<BOBInputCheckbox @bind-Value="_medium" Size="BOBSize.Medium" Label="Medium" />
<BOBInputCheckbox @bind-Value="_large" Size="BOBSize.Large" Label="Large" />Color
RAZOR
<BOBInputCheckbox @bind-Value="_primary" Color="@PaletteColor.Primary" Label="Primary" />
<BOBInputCheckbox @bind-Value="_success" Color="@PaletteColor.Success" Label="Success" />
<BOBInputCheckbox @bind-Value="_warning" Color="@PaletteColor.Warning" Label="Warning" />
<BOBInputCheckbox @bind-Value="_custom1" Color="#DDAAAA" Label="CustomHEX" />
<BOBInputCheckbox @bind-Value="_custom2" Color="rgb(25,45,65)" Label="CustomRGB" />Density
RAZOR
<BOBInputCheckbox @bind-Value="_compactValue" Label="Compact" Density="BOBDensity.Compact" />
<br>
<BOBInputCheckbox @bind-Value="_standardValue" Label="Standard" Density="BOBDensity.Standard" />
<br>
<BOBInputCheckbox @bind-Value="_comfortableValue" Label="Comfortable" Density="BOBDensity.Comfortable" />Custom Icons
RAZOR
<BOBInputCheckbox @bind-Value="_heart" CheckedIcon="@BOBIconKeys.MaterialIconsOutlined.i_favorite"
UncheckedIcon="@BOBIconKeys.MaterialIconsOutlined.i_favorite_border" Color="@PaletteColor.Error" Label="Favorite" />
<BOBInputCheckbox @bind-Value="_star" CheckedIcon="@BOBIconKeys.MaterialIconsOutlined.i_star"
UncheckedIcon="@BOBIconKeys.MaterialIconsOutlined.i_star_border" Color="@PaletteColor.Warning" Label="Starred" />States
RAZOR
<BOBInputCheckbox @bind-Value="_required" Required="true" Label="Required" />
<BOBInputCheckbox @bind-Value="_readonly" ReadOnly="true" Label="ReadOnly" />
<BOBInputCheckbox @bind-Value="_disabled" Disabled="true" Label="Disabled" />Properties
8 rows.
| Property | Type | Default | Description |
|---|---|---|---|
Size | BOBSize | BOBSize.Medium | Visual size of the component. |
Color | string? | | Text or foreground color. Accepts any valid CSS color value. |
Label | string? | | Floating label displayed above the component. |
HelperText | string? | | Helper text displayed below the component for additional context. |
CheckedIcon | IconKey? | | Material icon name for the Checked. |
UncheckedIcon | IconKey? | | Material icon name for the Unchecked. |
IndeterminateIcon | IconKey? | | Material icon name for the Indeterminate. |
Density | BOBDensity | | Vertical density (gap) of the component. |