MiHCM
primitives/@mihcm/ui·v0.21.0·stable

Switch

Controlled on/off toggle. role="switch" with aria-checked driven by checked.

Props

The full prop API for Switch. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.

PropTypeDefaultDescriptionSince
checkedbooleanControlled state. Required.0.3.0
onCheckedChange(checked: boolean) => voidCalled on click. Required.0.3.0
size'sm' | 'md' | 'lg''md'Track height. `md` is 24 px tall.0.3.0
disabledbooleanfalseStandard disabled state.0.3.0

Import

import { Switch } from '@mihcm/ui/Switch';