NOCTA UI

Switch

A toggle switch component for binary choices with multiple variants, sizes and dark mode support

Installation

Install the Switch component using the nocta-ui CLI:

npx @nocta-ui/cli add switch

Import the component:

import { Switch } from '@/components/ui/switch';

Examples

Default Switch

Sizes

Small
Medium
Large

API Reference

Prop

Type