zen
DocumentationPlayground
Getting started
IntroductionInstallationUsage Guide
ColorsFontsSpacingBordersShadowsBreakpointsThemesCustomization
BoxFlexboxGridContainer
TextHeadingCodeBlockquote
Page headerAspect ratioResizableScroll areaSeparator
Overview
AutocompleteCheckboxCheckbox groupComboboxDate pickerInput groupNumber fieldOTP FieldPassword fieldRadio groupSearch fieldSelectSliderSwitchText fieldToggleToggle group
BreadcrumbsButtonButton groupCommandContext menuHover triggerLoading buttonMenuMenubarNavbarPaginationTabsToolbarTheme buttonTheme switcher
AlertAlert dialogConfirmation dialogDialogDrawerEmptyLoadingMeterModalPopoverPreview cardProgress barProgress circleSheetSkeletonStatus lightToastTooltip
AccordionAvatarBadgeCalendarCarouselCollapsibleData cardData tableIconImageKbdListTableTag group
Form Inputs

Switch

A switch allows a user to turn a setting on or off.

Low power mode

Disabled#

Disabled off

Disabled on

Component props#

NameTypeDescription
labelstringLabel text displayed above the switch
isSelectedbooleanControlled selected state
defaultSelectedbooleanDefault selected state
isDisabledbooleanDisables the switch
onChange(isSelected: boolean) => voidCalled when state changes
PreviousSliderNextText field
On this page
DisabledComponent props
Powered by shiso