FormsUpdated May 3, 2026

Switch

A tactile boolean control for product settings.

#Default usage

Switch statesUse labels to make the setting explicit.

#Usage

Code
import { Switch } from "@froggdesign/enter-ui";

export function Example() {
  return (
    <>
      <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>
    </>
  );
}

#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.