Foundations
Icons
Actions
Buttons
Form Controls
Input
Text Area
Select Dropdown
Filter Dropdown
Checkbox
Radio Button
Switch
File Uploader
Color Picker
Multi Select
Search Input
Slider
OTP Input
Date Picker
Time Picker
Date Range Picker
Data Display
Table
Pagination
Progress Bar
Stat Card
Circular Progress
Navigation
Side Menu
Menu Bar
Tabs
Breadcrumb
Ellipsis
Content & Layout
Card
Divider
Banner
Carousel
Accordion
Timeline
Stepper
List
Overlays
Modal
Drawer
Popover
Command Palette
Dropdown Menu
Context Menu
Indicators
Tags
Chips
Badge
Avatar
Avatar Group
Tooltip
Skeleton
Spinner
Feedback
Snackbar
Alert
Callout
State
Switch
booleanWhether the switch is on. Controlled: update it from onChange.
—stringText next to the switch. Also names it for screen readers.
—stringSecondary text under the label, linked as the switch's description.
—SWITCH_SIZETrack and thumb size.
SWITCH_SIZE.MEDIUMbooleanBlocks toggling and dims the switch.
false(checked: boolean) => voidCalled with the new state.
—stringExtra classes on the wrapper.
""import { useState } from "react";
import { Switch } from "gwan-design-system";
const Example = () => {
const [checked, setChecked] = useState(true);
return (
<Switch
checked={checked}
label="Email notifications"
description="Get a summary every morning."
onChange={setChecked}
/>
);
};