Plans from $25/month
This lesson is for members. Join us?
Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.
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 Dashboard21 lessons • 2 hrs
