44 lines
2.0 KiB
JSON
44 lines
2.0 KiB
JSON
|
|
{
|
||
|
|
"componentDescription": "The foundation for building custom-styled switches.",
|
||
|
|
"propDescriptions": {
|
||
|
|
"checked": { "description": "If <code>true</code>, the component is checked." },
|
||
|
|
"className": { "description": "Class name applied to the root element." },
|
||
|
|
"defaultChecked": {
|
||
|
|
"description": "The default checked state. Use when the component is not controlled."
|
||
|
|
},
|
||
|
|
"disabled": { "description": "If <code>true</code>, the component is disabled." },
|
||
|
|
"onChange": {
|
||
|
|
"description": "Callback fired when the state is changed.",
|
||
|
|
"typeDescriptions": {
|
||
|
|
"event": "The event source of the callback. You can pull out the new value by accessing <code>event.target.value</code> (string). You can pull out the new checked state by accessing <code>event.target.checked</code> (boolean)."
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"readOnly": { "description": "If <code>true</code>, the component is read only." },
|
||
|
|
"required": {
|
||
|
|
"description": "If <code>true</code>, the <code>input</code> element is required."
|
||
|
|
},
|
||
|
|
"slotProps": { "description": "The props used for each slot inside the Switch." },
|
||
|
|
"slots": {
|
||
|
|
"description": "The components used for each slot inside the Switch. Either a string to use a HTML element or a component."
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"classDescriptions": {
|
||
|
|
"checked": {
|
||
|
|
"description": "State class applied to the root element if the switch is checked"
|
||
|
|
},
|
||
|
|
"disabled": {
|
||
|
|
"description": "State class applied to the root element if the switch is disabled"
|
||
|
|
},
|
||
|
|
"focusVisible": {
|
||
|
|
"description": "State class applied to the root element if the switch has visible focus"
|
||
|
|
},
|
||
|
|
"readOnly": { "description": "Class applied to the root element if the switch is read-only" }
|
||
|
|
},
|
||
|
|
"slotDescriptions": {
|
||
|
|
"input": "The component that renders the input.",
|
||
|
|
"root": "The component that renders the root.",
|
||
|
|
"thumb": "The component that renders the thumb.",
|
||
|
|
"track": "The component that renders the track."
|
||
|
|
}
|
||
|
|
}
|