EnterUI
DocsComponentsThemesExamplesDonation
Get Started
      • Checkbox
      • RadioGroup
      • Switch

Default usage

  1. EnterUI
  2. /Docs
  3. /Inputs
  4. /Form Controls
  5. /Choice Controls
  6. /Switch
Updated 3 October 2026

Switch

A tactile boolean control for product settings.

Switch defines how EnterUI handles a tactile boolean control for product settings, including default structure, accessible states, and token-driven styling.

#Default usage

Switch states

Use labels to make the setting explicit.

Code
<VStack align="stretch" gap={12} fullWidth>
  <HStack gap={8}><Switch id="switch-option-1" defaultChecked /><Label htmlFor="switch-option-1">Enable refined defaults</Label></HStack>
  <HStack gap={8}><Switch id="switch-option-2" /><Label htmlFor="switch-option-2">Show experimental UI</Label></HStack>
  <HStack gap={8}><Switch id="switch-option-3" disabled /><Label htmlFor="switch-option-3">Locked setting</Label></HStack>
</VStack>

#Import

Code
import { HStack, Label, Switch, VStack } from "@froggdesign/enter-ui-react";

#Accessibility

Switch renders a native checkbox input with role="switch". Provide visible label text or aria-label.

#API

  • Supports native checkbox props except type.
  • Can be controlled with checked or uncontrolled with defaultChecked.
  • Supports disabled state.

#Styling

Every exported component accepts className when it renders an element. EnterUI styles use .eui-* classes and --eui-* variables mapped from FroggDesign theme tokens.

PreviousRadioGroup
NextCurrencyInput
On this page
  • Default usage
  • Import
  • Accessibility
  • API
  • Styling