EF
EF Design System

Toggle

Toggles switch between two states (on/off). They use a gradient animation when active and come in two sizes.

On / Off

tsx
<Toggle checked={enabled} onChange={setEnabled} label="Notifications" />

Sizes

tsx
<Toggle size="sm" checked={val} onChange={setVal} />
<Toggle size="md" checked={val} onChange={setVal} />

Disabled

tsx
<Toggle disabled checked={true} onChange={() => {}} />

Props

PropTypeDefaultDescriptionRequired
checkedboolean-Current toggle stateNo
onChange(value: boolean) => void-Callback when toggledNo
size"sm" | "md""md"Toggle sizeNo
disabledbooleanfalsePrevents interactionNo
labelstring-Text label next to the toggleNo

Usage Guidelines

  • Use toggles for binary settings that take effect immediately.
  • Always pair with a text label describing what the toggle controls.
  • Use the sm size in compact UIs like table rows or settings lists.
  • Do not use toggles in forms that require explicit submission; use checkboxes instead.