Skip to content

What it is

Vuetify is a Material Design component framework for Vue.js, providing a comprehensive suite of reusable, accessible, and responsive UI components.

Vuetify provides a large number of pre-styled Vue components such as buttons, cards, forms, tables, navigation drawers, dialogs, and grids. Components are designed to be customizable and responsive.

Installation

npm install vuetify@next

Getting started

The smallest useful thing you can do with it, and what each part means.

Button usage
<template>
  <v-btn color="primary">Click Me</v-btn>
</template>

<script setup>
// Vuetify must be installed and imported in your project
</script>
A basic Vuetify button with a primary color style.
Card component
<template>
  <v-card>
    <v-card-title>Card Title</v-card-title>
    <v-card-text>This is a simple Vuetify card.</v-card-text>
  </v-card>
</template>
Displays a card component with a title and text content.

Advanced usage

Where the library earns its place over a simpler alternative.

Navigation drawer
<template>
  <v-navigation-drawer v-model="drawer" app>
    <v-list>
      <v-list-item link>Home</v-list-item>
      <v-list-item link>About</v-list-item>
    </v-list>
  </v-navigation-drawer>
</template>

<script setup>
import { ref } from 'vue'
const drawer = ref(true)
</script>
Creates a responsive navigation drawer with a list of links.
Data table
<template>
  <v-data-table :headers="headers" :items="items"></v-data-table>
</template>

<script setup>
import { ref } from 'vue'
const headers = [
  { text: 'Name', value: 'name' },
  { text: 'Age', value: 'age' }
]
const items = [
  { name: 'Alice', age: 25 },
  { name: 'Bob', age: 30 }
]
</script>
Displays a simple Vuetify data table with header and row items.
Dialog component
<template>
  <v-dialog v-model="dialog">
    <v-card>
      <v-card-title>Dialog Title</v-card-title>
      <v-card-text>Dialog content goes here.</v-card-text>
      <v-card-actions>
        <v-btn @click="dialog = false">Close</v-btn>
      </v-card-actions>
    </v-card>
  </v-dialog>
  <v-btn @click="dialog = true">Open Dialog</v-btn>
</template>

<script setup>
import { ref } from 'vue'
const dialog = ref(false)
</script>
Creates a modal dialog that can be opened and closed with a button.

Errors and fixes

The failures you are most likely to hit, and what actually resolves them.

Component not styled
Ensure Vuetify CSS is imported and the plugin is properly initialized in your Vue app.
v-model not working
Check that you are using a reactive `ref` or `reactive` object for v-model bindings.
Components not rendering
Verify that the Vuetify plugin is installed and registered in your Vue application.

Best practices

  • Use Vuetify's grid system for responsive layouts.
  • Customize themes to maintain consistent branding.
  • Import only the components you need to reduce bundle size.
  • Use Vuetify directives and props to leverage built-in functionality.
  • Follow Material Design guidelines for a consistent UX.

Background

Why it exists, and what it was reacting to.

Vuetify was created by John Leider to bring Google’s Material Design specification to Vue.js. It allows developers to build aesthetically consistent and responsive applications quickly while adhering to Material Design guidelines.