Check component

The <Check> component provides users the ability to choose between two distinct values. You can use this to supply a way for the user to toggle an option.

Check

Simple card
<Check TValue="bool">Check me out</Check>

Usage

With bind attribute

<Check TValue="bool" @bind-Checked="@rememberMe">Remember Me</Check>
@code{
    bool rememberMe;
}

With event

<Check TValue="bool" Checked="@rememberMe" CheckedChanged="@OnRememberMeChanged">Remember Me</Check>
@code{
    bool rememberMe;

    void OnRememberMeChanged( bool value )
    {
        rememberMe = value;
    }
}

Attributes

Name Description Type Default
TValue Data type of Checked value. Support types are bool and bool?. generic
Checked Gets or sets the checked flag. TValue default
CheckedChanged Occurs when the check state is changed. EventCallback<TValue>
Indeterminate The indeterminate property can help you to achieve a ‘check all’ effect. bool? null
Inline Group checkboxes on the same horizontal row. bool false
Cursor Defines the mouse cursor based on the behavior by the current CSS framework. Cursor Default