screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.x/css/materialdesignicons.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> </head> <body> <div id="app"> <v-app> <v-main> <v-container> <h3>Vuetify Change color of v-chip on click </h3> <v-chip :color="isClicked1 ? 'primary' : 'secondary'" @click="isClicked1 = !isClicked1"> <v-icon> mdi-check</v-icon> Click me! </v-chip> <v-chip :color="isClicked2 ? 'red' : 'dark'" @click="isClicked2 = !isClicked2"> <v-icon>mdi-heart</v-icon> Love </v-chip> <v-chip :color="isClicked3 ? 'green' : 'yellow'" @click="isClicked3 = !isClicked3"> <v-icon>mdi-tree</v-icon> Nature </v-chip> <v-chip :color="isClicked4 ? 'blue' : 'pink'" @click="isClicked4 = !isClicked4"> <v-icon>mdi-water</v-icon> Water </v-chip> <v-chip :color="isClicked5 ? 'red' : 'orange'" @click="isClicked5 = !isClicked5"> <v-icon>mdi-flower</v-icon> Flower </v-chip> </v-container> </v-main> </v-app> </div> <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script> <script> new Vue({ el: '#app', vuetify: new Vuetify(), data: () => ({ isClicked1: false, isClicked2: false, isClicked3: false, isClicked4: false, isClicked5: false, }), }) </script> </body> </html>