screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <!-- Load Vuetify Icon and Styles --> <link href="https://cdn.jsdelivr.net/npm/@mdi/font@5.9.55/css/materialdesignicons.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vuetify@3.1.11/dist/vuetify.min.css"> </head> <body> <div id="app"> <v-app> <v-container> <h3>Vuetify Show Toast for 10 Seconds</h3> <v-snackbar v-model="snackbar" :timeout="10000"> {{ snackbarText }} <template v-slot:actions> <v-btn color="blue" variant="text" @click="snackbar = false"> Close </v-btn> </template> </v-snackbar> <v-btn @click="showSnackbar" color="success">Show Toast for 10 Seconds</v-btn> </v-container> </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 { snackbar: false, snackbarText: 'My timeout is set to 10000', }; }, methods: { showSnackbar() { this.snackbar = true; }, }, }).use(vuetify).mount('#app'); // Mount the app to the #app element </script> </body> </html>