Plans from $25/month
This lesson is for members. Join us?
Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!
Dynamic Variants for Robust Theme Switching in Nuxt UI
In this lesson, learn how to dynamically set the ui in app config to support robust theme switching. The strategy is quite simple:
- Define the tailwind classes for slots, variants, and component variants for a theme in a central location
- Dynamically import that configuration with
@importand call Nuxt’s built-inupdateAppConfigfunction to set the new ui config. - That’s it 🎉
Links
Styling with Nuxt UI
7 lessons • 23 min7:37
NEXT CHAPTER
Expanding the Nuxt UI Dashboard16 lessons • 29 min
