Installation & Usage
Basic Usage
import { ToggleSwitch } from 'dotti'
<ToggleSwitch
label="Enable feature"
checked={isEnabled}
onChange={setIsEnabled}
/>Examples
Basic Toggle
Standard toggle switch with label.
Enable notifications
Code
const [enabled, setEnabled] = useState(false)
<ToggleSwitch
label="Enable notifications"
checked={enabled}
onChange={setEnabled}
/>Accent Toggle
Toggle switch with accent color.
Accent toggle
Code
<ToggleSwitch
label="Accent toggle"
checked={enabled}
onChange={setEnabled}
accent
/>Props
TypeScript Support
All components are fully typed with TypeScript. Check your IDE for prop suggestions and documentation.