primitives/@mihcm/ui·v0.21.0·stable
Toggle
Pressable toggle between on/off states. Also exports ToggleGroup for single/multi-select groups.
Live preview
Adjust the controls on the right; the preview and code update in real time.
example.tsxtsx
import { Toggle } from '@mihcm/ui/Toggle';
export function Example() {
return (
<Toggle
variant="default"
size="md"
></Toggle>
);
}Install
Both paths are valid. CLI ships the source into your repo (you own it). Install pins via npm.
npx @mihcm/cli add ToggleCopies the source into
components/ds/Toggle.tsx. You own the file. Use --out to override the directory or --force to overwrite.