Interface: MuiSwitchProps
Props for the MuiSwitch component.
Extends
Pick<SwitchProps,"checked"|"color"|"disabled"|"size">
Properties
checked?
optionalchecked:boolean
If true, the component is checked.
Inherited from
Pick.checked
color?
optionalcolor:OverridableStringUnion<"error"|"default"|"success"|"primary"|"secondary"|"warning"|"info",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<"small"|"medium",SwitchPropsSizeOverrides>
The size of the component.
small is equivalent to the dense switch styling.
Default
'medium'
Inherited from
Pick.size