Switch
Switches are UI elements that let users choose between two states—most commonly on/off.
useSwitch API
Import
import useSwitch from '@mui/base/useSwitch';
// or
import { useSwitch } from '@mui/base';
Parameters
Return value
Resolver for the input slot's props.
Type:
(externalProps?: React.HTMLAttributes<HTMLInputElement>) => UseSwitchInputSlotProps