{ "props": { "checked": { "type": { "name": "bool" } }, "checkedIcon": { "type": { "name": "node" } }, "classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } }, "color": { "type": { "name": "union", "description": "'default'
| 'primary'
| 'secondary'
| 'error'
| 'info'
| 'success'
| 'warning'
| string" }, "default": "'primary'" }, "defaultChecked": { "type": { "name": "bool" } }, "disabled": { "type": { "name": "bool" } }, "disableRipple": { "type": { "name": "bool" }, "default": "false" }, "edge": { "type": { "name": "enum", "description": "'end'
| 'start'
| false" }, "default": "false" }, "icon": { "type": { "name": "node" } }, "id": { "type": { "name": "string" } }, "inputProps": { "type": { "name": "object" }, "deprecated": true, "deprecationInfo": "Use slotProps.input instead. This prop will be removed in a future major release. See Migrating from deprecated APIs for more details." }, "inputRef": { "type": { "name": "custom", "description": "ref" }, "deprecated": true, "deprecationInfo": "Use slotProps.input.ref instead. This prop will be removed in a future major release. See Migrating from deprecated APIs for more details." }, "onChange": { "type": { "name": "func" }, "signature": { "type": "function(event: React.ChangeEvent) => void", "describedArgs": ["event"] } }, "required": { "type": { "name": "bool" }, "default": "false" }, "size": { "type": { "name": "union", "description": "'medium'
| 'small'
| string" }, "default": "'medium'" }, "slotProps": { "type": { "name": "shape", "description": "{ input?: func
| object, root?: func
| object, switchBase?: func
| object, thumb?: func
| object, track?: func
| object }" }, "default": "{}" }, "slots": { "type": { "name": "shape", "description": "{ input?: elementType, root?: elementType, switchBase?: elementType, thumb?: elementType, track?: elementType }" }, "default": "{}" }, "sx": { "type": { "name": "union", "description": "Array<func
| object
| bool>
| func
| object" }, "additionalInfo": { "sx": true } }, "value": { "type": { "name": "any" } } }, "name": "Switch", "imports": [ "import Switch from '@mui/material/Switch';", "import { Switch } from '@mui/material';" ], "slots": [ { "name": "root", "description": "The component that renders the root slot.", "default": "'span'", "class": "MuiSwitch-root" }, { "name": "track", "description": "The component that renders the track slot.", "default": "'span'", "class": "MuiSwitch-track" }, { "name": "thumb", "description": "The component that renders the thumb slot.", "default": "'span'", "class": "MuiSwitch-thumb" }, { "name": "switchBase", "description": "The component that renders the switchBase slot.", "default": "SwitchBase", "class": "MuiSwitch-switchBase" }, { "name": "input", "description": "The component that renders the switchBase's input slot.", "default": "SwitchBaseInput", "class": "MuiSwitch-input" } ], "classes": [ { "key": "checked", "className": "Mui-checked", "description": "State class applied to the internal `SwitchBase` component's `checked` class.", "isGlobal": true }, { "key": "colorPrimary", "className": "MuiSwitch-colorPrimary", "description": "Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`.", "isGlobal": false }, { "key": "colorSecondary", "className": "MuiSwitch-colorSecondary", "description": "Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`.", "isGlobal": false }, { "key": "disabled", "className": "Mui-disabled", "description": "State class applied to the internal SwitchBase component's disabled class.", "isGlobal": true }, { "key": "edgeEnd", "className": "MuiSwitch-edgeEnd", "description": "Styles applied to the root element if `edge=\"end\"`.", "isGlobal": false }, { "key": "edgeStart", "className": "MuiSwitch-edgeStart", "description": "Styles applied to the root element if `edge=\"start\"`.", "isGlobal": false }, { "key": "sizeMedium", "className": "MuiSwitch-sizeMedium", "description": "Styles applied to the root element if `size=\"medium\"`.", "isGlobal": false }, { "key": "sizeSmall", "className": "MuiSwitch-sizeSmall", "description": "Styles applied to the root element if `size=\"small\"`.", "isGlobal": false } ], "spread": true, "themeDefaultProps": false, "muiName": "MuiSwitch", "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-material/src/Switch/Switch.js", "inheritance": { "component": "IconButton", "pathname": "/material-ui/api/icon-button/" }, "demos": "", "cssComponent": false }