Skip to Content
🎉Introducing Pumki UI

Switch

Pumki UIPumki UI

Installation

Usage


import { Switch } from '@/components/pumki-ui/switch.tsx';

<Switch />

Props

PropTypeDefaultDescription
childrenReactNodeLabel or content to display next to the switch.
classNamestringCustom CSS classes for the switch container.
isSelectedbooleanfalseWhether the switch is on (controlled).
defaultSelectedbooleanfalseInitial selected state (uncontrolled).
isDisabledbooleanfalseWhether the switch is disabled.
isReadOnlybooleanfalseWhether the switch is read-only.
onChange(isSelected: boolean) => voidCallback when the switch value changes.
Last updated on