To change the theme for the app, you need to add/remove the .my-app-dark
class to the HTML tag of the page. To do this, we have to create a button and on click toggle the class .my-app-dark
by running following code - document.documentElement.classList.toggle('my-app-dark')
Reference - https://primevue.org/theming/styled/#darkmode