MudBlazor

MudCheckBox<T> API

Pages

Properties

Name Type Default Description
CheckedIcon
String
Custom checked icon, leave null for default.
ChildContent
RenderFragment

null

Child content of component.
Color
Color

Color.Default

The color of the component. It supports the theme colors.
Dense
Boolean

False

If true, compact padding will be applied.
DisableRipple
Boolean

False

If true, disables ripple effect.
IndeterminateIcon
String
Custom indeterminate icon, leave null for default.
Label
String

null

If applied the text will be added to the component.
Size
Size

Size.Medium

The Size of the component.
TriState
Boolean

False

Define if the checkbox can cycle again through indeterminate status.
UncheckedIcon
String
Custom unchecked icon, leave null for default.
Inherited from MudBooleanInput<T>
Checked
T

null

The state of the component
Disabled
Boolean

False

If true, the input will be disabled.
ReadOnly
Boolean

False

If true, the input will be read-only.
StopClickPropagation
Boolean

True

If true will prevent the click from bubbling up the event tree.
Inherited from MudFormComponent<T, Nullable<Boolean>>
Converter
Converter<T, Nullable<Boolean>>

The generic converter of the component.
Culture
CultureInfo

The culture of the component.
Error
Boolean

False

If true, the label will be displayed in an error state.
ErrorText
String

null

The ErrorText that will be displayed if Error true.
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.
Required
Boolean

False

If true, this form input is required to be filled out.
RequiredError
String

"Required"

The error text that will be displayed if the input is not filled out but required.
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<object, string, IEnumerable< string >> input Form.Model, Full Path of Member ... 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 Func<object, string, Task<IEnumerable< string >>> input Form.Model, Full Path of Member ... outputs all the returned error messages, no error if empty System.ComponentModel.DataAnnotations.ValidationAttribute instances
Inherited from MudComponentBase
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.

EventCallbacks

Name Type Description
CheckedChanged
EventCallback<T>
Fired when Checked changes.

Methods

Name Parameters Return Description
string GetErrorText()
string : Error text/message
Return the validation error text or the conversion error message.
Reset() Reset the value and the validation.
ResetValidation() Reset the validation.
Task Validate()
Task
Cause this component to validate its value.
An error has occurred. This application may no longer respond until reloaded. Reload 🗙