Toggle
Toggle is a checkbox that is styled to look like a switch button.
Installation
npx jsx-daisyui add toggleDefault
toggle-default
With fieldset and label
toggle-fieldset
Sizes
toggle-sizes
Colors
toggle-colors
Disabled
toggle-disabled
Indeterminate
toggle-indeterminate
With icons inside
toggle-icons
Custom colors
toggle-custom-colors
Controlled
toggle-controlled
State: off
Props
Toggle
| Prop | Type | Default | Description |
|---|---|---|---|
color | 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | - | The color of the toggle switch. |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | The size of the toggle switch. |