Skip to content
nexubDesign System
v2.4.0

Components · Form Controls

Switch

StableSince v0.0.1

Toggle control for binary on/off settings. Built on Radix UI Switch.

import { Switch } from '@nexub/react';

Examples

Default

Sizes

Props

Props
PropTypeDefaultDescription
checkedboolean—Controlled checked state.
defaultCheckedbooleanfalseUncontrolled initial state.
onCheckedChange(checked: boolean) => void—Callback when checked state changes.
disabledbooleanfalseDisables interaction.
size'sm' | 'md' | 'lg''md'Switch size.