MudCheckBox<T> API

Pages
Properties
Name Type Default Description
Data
Checked
T
null The state of the component
Validation
Error
bool
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
bool
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.
TriState
bool
False Define if the checkbox can cycle again through indeterminate status.
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
Behavior
ChildContent
RenderFragment
null Child content of component.
Converter
Converter<T, bool?>
The generic converter of the component.
Culture
CultureInfo
The culture of the component.
Disabled
bool
False If true, the input will be disabled.
Label
string
null If applied the text will be added to the component.
ReadOnly
bool
False If true, the input will be read-only.
StopClickPropagation
bool
True If true will prevent the click from bubbling up the event tree.
Appearance
CheckedIcon
string
Custom checked icon, leave null for default.
Color
Color
Color.Default The color of the component. It supports the theme colors.
Dense
bool
False If true, compact padding will be applied.
DisableRipple
bool
False If true, disables ripple effect.
IndeterminateIcon
string
Custom indeterminate icon, leave null for default.
Size
Size
Size.Medium The Size of the component.
UnCheckedColor
Color?
null The base color of the component in its none active/unchecked state. It supports the theme colors.
UncheckedIcon
string
Custom unchecked icon, leave null for default.
Common
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 unhandled error has occurred. Reload 🗙