Toggle
Flip a single boolean. Not Switch — Switch is a 2–3 option segmented control.
Default
v-model owns the boolean. checked / @change also work if the parent already stores the flag that way.
Sizes
default is 16px track, medium is 20px, large is 24px.
Disabled
Color
On-state track. blue is the default. amber and red are for caution and destructive policies.
Label
Children are the visible name. direction flips the track to the leading edge. labelCasing stays title unless the copy is already sentence case.
Best practices
- Toggle is one immediate on/off. Lists of optional rows use Checkbox. Two or three mutually exclusive views use Switch.
- Label the thing that is true when on:
Password Protection, not "Enable password protection". - Give an accessible name with children,
aria-label, oraria-labelledby. Dev mode warns if all three are missing. - Disable only when the flip is impossible (plan lock, policy). Say why next to the control or in a Tooltip.
- Keep
labelCasing="title"unless the surrounding sentence is already lowercase.