DocsComponentsToggle

Toggle

Primitive

Accessible switch toggle with 3 sizes, label and description support, keyboard navigation, and focus-visible ring. Built as a semantic button with role=switch.

#ff7b72">import { FqToggle } from '@/components/harlowui/primitives/fq-misc'
#ff7b72">export default function Settings() {
#ff7b72">const [enabled, setEnabled] = useState(false)
#ff7b72">return (
<#7ee787">FqToggle
label=#a5d6ff">"Dark Mode"
description=#a5d6ff">"Use dark theme across the app"
checked={enabled}
onCheckedChange={setEnabled}
/>
)
}

Interactive Demo

Sizes

Three sizes for different density requirements -- compact sidebars to spacious settings panels.

Disabled State

Settings Panel Patterns

Production-ready settings compositions with dividers and grouped toggles.

Preferences

Manage your account settings and preferences

API Reference

PropTypeDefaultDescription
label*string-Toggle label text
descriptionstring-Help text rendered below the label
checked*boolean-Controlled checked state
onCheckedChange(checked: boolean) => void-State change callback
size"sm" | "md" | "lg""md"Track and thumb size
disabledbooleanfalseDisables the toggle