Import
Basic Usage
Props
If
true, the component is checked.The default checked state. Use when the component is not controlled.
color
'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'default'
default:"'primary'"
The color of the component. Supports both default and custom theme colors.
The size of the component.
small is equivalent to the dense switch styling.If
true, the component is disabled.The icon to display when the component is checked.
The icon to display when the component is unchecked.
The value of the component. The DOM API casts this to a string. The browser uses “on” as the default value.
The system prop that allows defining system overrides as well as additional CSS styles.
API Reference
- Switch API
- Inherits IconButton API