Vuetify Fundamentals: Cheat Sheet
Vuetify Fundamentals: Cheat Sheet
CHEAT SHEET
GET STARTED BASIC FORM
Install @vue/cli by running the following command:
<v-form @submit.prevent="onSubmit">
yarn global add @vue/cli <v-text-field
v-model="name"
Then create a new Vue application: label="Name"
vue create vuetify --preset vuetifyjs/vue- />
cli-preset-vuetify <v-text-field
v-model="email"
label="Email"
DEFAULT APP MARKUP
/>
<v-app> <v-btn type="submit">Submit</v-btn>
<v-navigation-drawer app> </v-form>
...
</v-navigation-drawer>
<v-app-bar app>...</v-app-bar>
PROGRAMMATIC BREAKPOINTS
When the window is resized, the $vuetify object will update:
<v-content>
<v-btn :block="$vuetify.breakpoint.smAndDown">...
<v-container fluid>
<!-- If using vue-router -->
<router-view /> MODIFYING SASS VARIABLES
</v-container> The Vuetify CLI plugin will automatically search for a variables file
</v-content> and apply it during compilation:
<nav class="v-toolbar">...
sets html tag
<v-btn @click="$vuetify.goTo('#loc')">...
INTERSECT DIRECTIVE
Under the hood, v-intersect uses the Intersection Observer API to
call a method when an element enters or leaves the viewport: ECOSYSTEM
Join and/or follow us on one of our social platforms:
<v-card v-intersect="onIntersect">...
Github
Whenever <v-card> is observed, onIntersect will be invoked: View the repository @ https://github.com/vuetifyjs
onIntersect: function (
Discord Community
entries,
Join us on Discord @ https://community.vuetifyjs.com
observer,
isIntersecting Twitter
) { Follow us on twitter @vuetifyjs
// Logic boolean value
} Reddit
Join us on Reddit @ https://reddit.com/r/vuetifyjs