$npx -y skills add skilld-dev/vue-ecosystem-skills --skill vuetify-skilldVue Material Component Framework. ALWAYS use when writing code importing \"vuetify\". Consult for debugging, best practices, or modifying vuetify.
| 1 | # vuetifyjs/vuetify `vuetify@4.0.1` |
| 2 | **Tags:** v1-stable: 1.5.24, v2-stable: 2.7.2, dev: 4.0.1 |
| 3 | |
| 4 | **References:** [Docs](./references/docs/_INDEX.md) |
| 5 | ## API Changes |
| 6 | |
| 7 | This section documents version-specific API changes — prioritize recent major/minor releases. |
| 8 | |
| 9 | - BREAKING: `VRow` / `VCol` Grid — complete overhaul using CSS `gap` instead of negative margins. `dense` prop removed (use `density="compact"`), `align`/`justify` on `VRow` and `order`/`align-self` on `VCol` removed in favor of utility classes [source](./references/docs/src/pages/en/getting-started/upgrade-guide.md) |
| 10 | |
| 11 | - BREAKING: MD3 Typography — variant names renamed for Material Design 3 compliance: `h1`-`h3` -> `display-*`, `h4`-`h6` -> `headline-*`, `subtitle-1`/`body-1` -> `body-large`, `button`/`subtitle-2` -> `label-large` [source](./references/docs/src/pages/en/getting-started/upgrade-guide.md) |
| 12 | |
| 13 | - BREAKING: MD3 Elevation — elevation levels reduced from 25 (0-24) to 6 (0-5) to align with MD3 density-independent pixel levels [source](./references/docs/src/pages/en/getting-started/upgrade-guide.md) |
| 14 | |
| 15 | - BREAKING: `VBtn` Defaults — `text-transform: uppercase` removed by default. `$button-stacked-icon-margin` Sass variable replaced by `$button-stacked-gap` [source](./references/docs/src/pages/en/getting-started/upgrade-guide.md) |
| 16 | |
| 17 | - BREAKING: `VSelect` / `VAutocomplete` / `VCombobox` — `item` slot prop renamed to `internalItem`. The `item` prop is now an alias for `internalItem.raw` [source](./references/docs/src/pages/en/getting-started/upgrade-guide.md) |
| 18 | |
| 19 | - BREAKING: `VForm` Slot — `isValid`, `errors`, and `isDisabled` slot variables are now unwrapped values instead of `Ref` objects [source](./references/docs/src/pages/en/getting-started/upgrade-guide.md) |
| 20 | |
| 21 | - NEW: `VSnackbarQueue` — rewritten in v4 to support showing multiple snackbars simultaneously; `default` slot renamed to `item` [source](./references/releases/v4.0.0-beta.2.md) |
| 22 | |
| 23 | - NEW: `VRow` `gap` prop — provides fine-grained control over grid spacing, accepting numbers, strings, or `[x, y]` arrays [source](./references/docs/src/pages/en/getting-started/upgrade-guide.md) |
| 24 | |
| 25 | - NEW: `VAvatarGroup` (experimental) — new labs component for grouping multiple avatars with overlapping support [source](./references/releases/v4.0.0-beta.2.md) |
| 26 | |
| 27 | - NEW: `VCommandPalette` (experimental) — new labs component providing a search and action interface for application commands [source](./references/releases/v4.0.0-beta.0.md) |
| 28 | |
| 29 | **Also changed:** `VCalendar` promoted from labs · `VHotkey` promoted from labs · `VToolbar` `location` prop new · `VAvatar` `badge` prop new · `VProgressCircular` `reveal` prop new · `VTreeview` `indent-lines` props new · `vuetify/styles/core` new entry point · `system` default theme · `VSnackbar` `multi-line` removed · `VContainer` `fill-height` behavior changed |
| 30 | |
| 31 | ## Best Practices |
| 32 | |
| 33 | - Use the `cmd` modifier in the `useHotkey` composable for cross-platform compatibility — automatically resolves to Command on Mac and Control on PC [source](./references/docs/src/pages/en/features/hotkey.md) |
| 34 | |
| 35 | ```ts |
| 36 | // Preferred: works on both Mac and PC |
| 37 | useHotkey('cmd+s', (e) => saveDocument(e)) |
| 38 | |
| 39 | // Avoid: hardcoding 'ctrl' may cause conflicts or feel non-idiomatic on Mac |
| 40 | useHotkey('ctrl+s', (e) => saveDocument(e)) |
| 41 | ``` |
| 42 | |
| 43 | - Apply `class` and `style` to specific component keys in the `defaults` configuration — these are not supported in the `global` defaults key [source](./references/docs/src/pages/en/features/global-configuration.md) |
| 44 | |
| 45 | ```ts |
| 46 | // Preferred |
| 47 | createVuetify({ |
| 48 | defaults: { |
| 49 | VBtn: { |
| 50 | class: 'text-none', |
| 51 | style: { textTransform: 'none' } |
| 52 | } |
| 53 | } |
| 54 | }) |
| 55 | |
| 56 | // Avoid: class and style are ignored in global |
| 57 | createVuetify({ |
| 58 | defaults: { |
| 59 | global: { class: 'text-none' } |
| 60 | } |
| 61 | }) |
| 62 | ``` |
| 63 | |
| 64 | - Resolve style conflicts between Vuetify and TailwindCSS by redefining CSS layer order — place Vuetify's styles in a dedicated layer with lower precedence than Tailwind's base layer [source](./references/discussions/discussion-21241.md) |
| 65 | |
| 66 | ```css |
| 67 | /* main.css */ |
| 68 | @layer theme, base, vuetify, components, utilities; |
| 69 | @import 'vuetify/styles' layer(vuetify); |
| 70 | @import 'tailwindcss'; |
| 71 | ``` |
| 72 | |
| 73 | - Use `v-text-field` with `decimal.js` for high-precision decimal arithmetic — `VNumberInput` uses `toFixed()` internally and may suffer from standard JavaScript floating-point inaccuracies [source](./references/docs/src/pages/en/components/number-inputs.md) |
| 74 | |
| 75 | - Centralize snackbar messages using global state (e.g., Pinia) with `v-snackbar-queue` — allows triggering notifications from any part of the application by pushing to a shared array [source](./references/docs/src/pages/en/components/snackbar-queue.md) |
| 76 | |
| 77 | ```vue |
| 78 | |
| 79 | <template> |
| 80 | <v-app> |
| 81 | <v-snackbar-queue v-model="messages.que |