Components
A toggle control for enabling or disabling settings.
Installation
npm install @mijn-ui/react-switchUsage
import { Switch } from "@mijn-ui/react-switch"<Switch />API Reference
Built on Radix UI — all underlying primitive props are forwarded in addition to the props below.
| Prop | Type | Default | Description |
|---|---|---|---|
unstyled | boolean | false | Opt out of the default styles to fully customize the component. |
classNames | object | — | Override classes per slot (see Style Slots below). |
className | string | — | Additional classes for the root element. |
Switch Style Slots
| Slot Name | Targeted Component | Purpose |
|---|---|---|
base | Switch | Styles the root switch component. |
thumb | Switch | Styles the thumb of the switch. |