Interface: MuiSwitchProps
Props for the MuiSwitch component.
Extends
Pick<SwitchProps,"checked"|"color"|"disabled"|"size">ControlAriaProps
Properties
aria-describedby?
optionalaria-describedby?:string
The id of the element that describes the control.
Inherited from
ControlAriaProps.aria-describedby
aria-errormessage?
optionalaria-errormessage?:string
The id of the element that describes the validation error.
Inherited from
ControlAriaProps.aria-errormessage
aria-invalid?
optionalaria-invalid?:boolean
Whether the control value is invalid.
Inherited from
ControlAriaProps.aria-invalid
checked?
optionalchecked?:boolean
If true, the component is checked.
Inherited from
Pick.checked
color?
optionalcolor?:OverridableStringUnion<"default"|"error"|"info"|"primary"|"secondary"|"success"|"warning",SwitchPropsColorOverrides>
The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide.
Default
'primary'
Inherited from
Pick.color
disabled?
optionaldisabled?:boolean
If true, the component is disabled.
Inherited from
Pick.disabled
label?
optionallabel?:string
The label for the radio checkbox.
onChange
onChange: (
checked?) =>void
Callback fired when the checkbox state changes.
Parameters
checked?
boolean
Returns
void
size?
optionalsize?:OverridableStringUnion<"medium"|"small",SwitchPropsSizeOverrides>
The size of the component.
small is equivalent to the dense switch styling.
Default
'medium'
Inherited from
Pick.size