Switch Component

A powerful, customizable switch component with icons, animations, and advanced features.

Basic Switch

Simple switches with different sizes and variants.

Sizes

Variants

Icon Switches

Switches with custom icons for better visual communication.

Thumb Icons

Track Icons

Advanced Features

Loading states, animations, and special effects.

Special States

Label Positions

Settings Panel Example

A comprehensive settings panel using various switch configurations.

Appearance

Privacy & Security

Connectivity

API Reference

Complete list of props and their descriptions.

Switch Props

PropDescriptionTypeDefault
sizeSize of the switch"sm" | "md" | "lg" | "xl""md"
variantVisual style variant"default" | "success" | "warning" | "danger" | "info" | "gradient""default"
labelLabel text for the switchstring-
descriptionDescription text below the labelstring-
loadingShow loading spinner in thumbbooleanfalse
glowingAdd glowing effect when checkedbooleanfalse
animateEnable smooth animationsbooleantrue
thumbIconIcon to display in the thumbReactNode-
checkedThumbIconIcon in thumb when checkedReactNode-
uncheckedThumbIconIcon in thumb when uncheckedReactNode-
checkedIconIcon in track when checkedReactNode-
uncheckedIconIcon in track when uncheckedReactNode-
labelPositionPosition of the label relative to switch"left" | "right" | "top" | "bottom""right"
showIconsWhether to show track iconsbooleantrue
checkedControlled checked stateboolean-
defaultCheckedDefault checked statebooleanfalse
onCheckedChangeCallback when checked state changes(checked: boolean) => void-