0

So I want users to be able to use a dark theme on my website. So when they click the according button, a .css file should be applied on my website. How would I approach this with Vue.js?

1 Answer 1

1

Vue has the option to change styles dynamically. You can toggle between classes. Just have a main div where you'd toggle between light and dark theme and beneath it keep the same name for the styles in both the css files.

See if this helps (https://v2.vuejs.org/v2/guide/class-and-style.html)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.