Skip to main content
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

←
5m
IntermediateGuided

Style the control

See how a switch gets its color and motion from data-state, including the indeterminate state, and when attrs belong on your own element.

You'll learn how to:

  1. 1See that the styling is in the example
  2. 2Watch data-state move the thumb
  3. 3Color the track from data-state
  4. 4Move the thumb from data-state
  5. 5Find the data-state class in the example source
  6. 6Style data-state instead of toggling a class
  7. 7See which part sets which attribute
  8. 8See why data-disabled is true or missing
  9. 9Style the indeterminate state
  10. 10Keep aria-checked and data-state separate
  11. 11Bind slot attrs only on a renderless host
  12. 12Style the next headless control the same way
© 2016-1970 Vuetify, LLC
Services