ClassTelerikCheckBox<TValue>
Provides a native checkbox input control with enhanced styling, accessibility features, and data binding capabilities. Enables users to make binary choices like accepting terms, toggling settings, or selecting items from lists. Supports three visual states: checked, unchecked, and indeterminate for complex selection scenarios. Includes built-in validation integration, customizable appearance through theme settings, and full keyboard accessibility. Use for single selections, multi-item selection in lists, or hierarchical selection with parent-child relationships.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Type Parameters:
TValue
The data type for the checkbox value, restricted to boolean types for proper checkbox behavior. Use bool for simple true/false selections where a value is always required. Use nullable boolean to support three-state behavior with checked, unchecked, and null (indeterminate) values.
Syntax:
public class TelerikCheckBox<TValue> : TelerikInputBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikInputBase<TValue>TelerikCheckBox<TValue>
Implements:
Inherited Members
Constructors
TelerikCheckBox()
Declaration
public TelerikCheckBox()
Properties
Indeterminate
Controls whether the checkbox shows the indeterminate state (mixed state) when the value is null. Only works when Value is null for nullable boolean types. Default value is false.
Declaration
[Parameter]
public bool Indeterminate { get; set; }
Property Value
IndeterminateChanged
Fires when the indeterminate state changes, enabling two-way binding for the Indeterminate property. Use with @bind-Indeterminate syntax for automatic state synchronization in parent-child checkbox scenarios.
Declaration
[Parameter]
public EventCallback<bool> IndeterminateChanged { get; set; }
Property Value
Rounded
Controls the corner rounding style of the checkbox. Works with all themes and automatically adapts to the current visual design system. Default value is Medium.
Size
Specifies the size of the checkbox. Default value is Medium.
Declaration
[Parameter]
public string Size { get; set; }
Property Value
Remarks
Small creates compact checkboxes ideal for dense layouts or mobile interfaces. Medium provides standard sizing suitable for most applications and forms. Large creates larger checkboxes for improved accessibility and touch interaction.
Title
Sets the HTML title attribute which appears as a tooltip when users hover over the button. This provides additional context or instructions for the button's purpose. Example: "Accept terms and conditions" or "Enable notifications".
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
Dispose()
Declaration
public override void Dispose()
Overrides
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides
SetParametersAsync(ParameterView)
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
Returns
Overrides