MudBlazor

Community Support

Discord

GitHub Discussions

Tools and resources

TryMudBlazor

Templates

Sponsor

Open Collective


Switch to Blazor wasm
Toggle light/dark theme
GitHub repository
Toggle right-to-left/left-to-right

Community Support

Discord

GitHub Discussions

Tools and resources

TryMudBlazor

Templates

Sponsor

Open Collective

MudCheckBox<T>

API documentation.

Check out the Examples for this component.

Properties

Name Type Default Description
Color Color Color.Default The color of the component. It supports the theme colors.
Label String null If applied the text will be added to the component.
DisableRipple Boolean False If true, disables ripple effect.
Dense Boolean False If true, compact padding will be applied.
Size Size Size.Medium The Size of the component.
ChildContent RenderFragment null Child content of component.
CheckedIcon String "<path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>" Custom checked icon, leave null for default.
UncheckedIcon String "<path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>" Custom unchecked icon, leave null for default.
IndeterminateIcon String "<g><rect fill="none" height="24" width="24"/></g><g><g><g><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z"/></g></g></g>" Custom indeterminate icon, leave null for default.
TriState Boolean False Define if the checkbox can cycle again through indeterminate status.
Disabled Boolean False If true, the input will be disabled.
ReadOnly Boolean False If true, the input will be read-only.
Checked T null The state of the component
CheckedChanged EventCallback<T> Fired when Checked changes.
Required Boolean False If true, this form input is required to be filled out.
RequiredError String "Required" Set an error text that will be displayed if the input is not filled out but required!
ErrorText String null The ErrorText that will be displayed if Error true
Error Boolean False If true, the label will be displayed in an error state.
Converter Converter<T, Nullable<Boolean>>
Culture CultureInfo
Validation Object null A validation func or a validation attribute. Supported types are: Func<T, bool> ... will output the standard error message "Invalid" if false Func<T, string> ... outputs the result as error message, no error if null Func<T, IEnumerable< string >> ... outputs all the returned error messages, no error if empty Func<T, Task< bool >> ... will output the standard error message "Invalid" if false Func<T, Task< string >> ... outputs the result as error message, no error if null Func<T, Task<IEnumerable< string >>> ... outputs all the returned error messages, no error if empty System.ComponentModel.DataAnnotations.ValidationAttribute instances
For Expression<Func<T>> null Specify an expression which returns the model's field for which validation messages should be displayed. Currently only string fields are supported.
Class String null User class names, separated by space
Style String null User styles, applied on top of the component's own classes and styles
Tag Object null Use Tag to attach any user data object to the component for your convenience.
UserAttributes Dictionary<String, Object> UserAttributes carries all attributes you add to the component that don't match any of its parameters. They will be splatted onto the underlying HTML tag.
An error has occurred. This application may no longer respond until reloaded. Reload 🗙