screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vuetify@3.1.11/dist/vuetify.min.css"> </head> <body> <div id="app"> <!-- Create Vuetify App --> <v-app> <v-main> <v-container> <h3>Vuetify Change Color Button on Click</h3> <v-btn block :color="(isClicked ? 'primary' : 'grey darken-4')" @click="isClicked = !isClicked"> Click me! </v-btn> </v-container> </v-main> </v-app> </div> <!-- Load Vue.js and Vuetify script --> <script src="https://unpkg.com/vue@3.2.21/dist/vue.global.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuetify@3.1.11/dist/vuetify.min.js"></script> <!-- Create Vue.js and Vuetify app --> <script type="module"> const { createApp } = Vue const { createVuetify } = Vuetify const vuetify = createVuetify() const app = createApp({ data() { return { isClicked: false, }; }, }).use(vuetify).mount('#app'); // Mount the app to the #app element </script> </body> </html>