EEnterUI
DocsComponentsThemesDonation
Get Started
      • Checkbox
      • RadioGroup
      • Switch
EnterUIDocsInputsForm ControlsChoice ControlsSwitch
InputsUpdated 6 May 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
<div className="docs-preview-stack">
  <label className="docs-preview-option"><Switch defaultChecked /> Enable refined defaults</label>
  <label className="docs-preview-option"><Switch /> Show experimental UI</label>
  <label className="docs-preview-option"><Switch disabled /> Locked setting</label>
</div>

#Import

Code
import { Switch } 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
NextSelect

On this page

  1. Default usage
  2. Import
  3. Accessibility
  4. API
  5. Styling