Theme switch on site

UI Components for Vue
Post Reply
Posts: 3
Joined: 08 Feb 2021, 13:54

11 Feb 2021, 14:40


on the main PrimeVue-site ( ) there is a Theme-switch that dynamically switches the themes if wanted (like from Blue Dark to Indigo Dark). How is this done technically with PrimeVue? Are the CSS-Imports simply switched? If so, is there an example how this done with vue?

Best regards

Posts: 14
Joined: 09 Nov 2020, 07:03

11 Feb 2021, 18:14

I also thought that was cool and wondered how it was done. Fortunately PrimeVue is open source and the reference site is actually the contents of the repository so you can clone it and see how everything works yourself.

The short answer is yes, the theme css file import is switched. It is done so by locating the link in the head in the site static index.html file and replacing the value - the browser does the rest. The technical details are there for you to examine (I may have misunderstood something) :)

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests