Nuxt UI: Build a Dashboard Template

Watch this course for FREE this weekend only.
Create an account to start watching.

or

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:

  1. Define the tailwind classes for slots, variants, and component variants for a theme in a central location
  2. Dynamically import that configuration with @import and call Nuxt’s built-in updateAppConfig function to set the new ui config.
  3. That’s it 🎉

Links