github vuetifyjs/vuetify v3.2.0

latest releases: v3.6.11, v3.6.10, v3.6.9...
14 months ago

v3.2.0 Orion

Welcome to the v3.2 release of Vuetify! The team has been hard at work on some exciting new updates and we're excited to finally get it into your hands!

Orion has a huge focus on improving the defaults engine and giving users more tools to customize their application. We started by adding support for global class and style defaults; then hooked it up to virtual components.

For example, you can set the default class for all v-btn components to be my-btn:

import { createVuetify } from 'vuetify'

export default createVuetify({
  defaults: {
    VBtn: {
      class: 'my-btn',
    },
  },
})

The same is possible for virtual components as well. Simply alias a core component and reference it by its name in the config object:

import { createVuetify } from 'vuetify'
import { VBtn } from 'vuetify/components/VBtn'

export default createVuetify({
  aliases: {
    MyBtn: VBtn,
  },

  defaults: {
    MyBtn: {
      color: 'primary',
      class: 'my-btn',
      variant: 'tonal',
    },
  },
})

Whenever you use the MyBtn component in any template it will be rendered as a v-btn with the default props applied:

<template>
  <my-btn>My Button</my-btn>
  <!-- <v-btn color="primary" variant="tonal" class="mt-btn">...</v-btn>-->
</template>

Finally, we made our defaults composable publicly available. Now you can hook your custom components into the defaults engine and configure your entire application from a single source.

<template>
  <div>
    I am {{ props.foo }}
  </div>
</template>

<script setup>
  import { useDefaults } from 'vuetify'

  const _props = defineProps({ foo: String })
  const props = useDefaults(_props)
</script>

defaults

The defaults composable also works with nested configurations. This works in any combination of virtual, custom, and core Vuetify components.

For example, you can create a custom component that modifies the default behavior of its children:

import { createVuetify } from 'vuetify'
import { VBtn } from 'vuetify/components/VBtn'
import { VCard } from 'vuetify/components/VCard'

export default createVuetify({
  aliases: {
    MyBtn: VBtn,
    MyCard: VCard,
  },

  defaults: {
    MyBtn: {
      color: 'primary',
      class: 'my-btn',
      variant: 'tonal',
    },
    MyCard: {
      border: true,
      variant: 'text',

      MyBtn: {
        color: 'secondary',
        variant: 'text',
      },
    },
  },
})

Some other big feature updates in this release include:

With v3.2 complete, the team is preparing for v2.7-lts (Nirvana) and the next v3 release, Icarus. We've recently updated our roadmap to be more transparent about our plans for the future; as well as improve the information about each release. Also, we've drastically improved the performance of the documentation and added new tools, such as ๐ŸŽฎVuetify Play, to all component examples.

image

We hope that you enjoy this release as much as we have enjoyed working on it.

Until next time,

John Leider


๐Ÿ’ช Support Vuetify Development

Vuetify is an open source MIT project that has been made possible due to the generous contributions by our sponsors and backers. If you are interested in supporting this project, please consider:

๐Ÿ“– Table of Contents

  • #Release Introduction
  • #Important Links
  • #Upgrade Guide
  • #Release Notes
  • #I need help

๐Ÿ“‘ Upgrade guide

  • The title prop on v-tab is now text
  • The visible-items prop has been removed

๐Ÿ’ฏ Release notes

๐Ÿš€ Features

๐Ÿ”ง Bug Fixes

  • defaults: remove required default and add chain operator (eb00082)
  • types: change update:focused event type to boolean (#17237) (35b9411), closes #17197
  • types: volar compatible generic types (#17231) (36e3834), closes #17211
  • VRating: keyboard navigation (1c0a0d2)
  • VRating: expose model value in item slot (62b4be7)
  • VVirtualScroll: reuse existing elements (c3f79aa), closes #11951
  • VVirtualScroll: correct midpoint calculation (9f12b0f)

๐Ÿงช Labs

BREAKING CHANGES

  • VTab: The VTab title prop is now text
  • VVirtualScroll: visibleItems has been removed

๐Ÿ†˜ I need help!

If you are stuck and need help, don't fret! We have a very large and dedicated community that is able to provide help 24/7. Come to the #vuetify-3-help channel.

Don't miss a new vuetify release

NewReleases is sending notifications on new releases.