
Vibe Coding a Collaborative Editor with Comment Support with Nuxt UI and Jazz
VueSchool
A new Chart component built on TanStack Charts renders line, area, bar and donut charts as an SVG on the server. Series colors follow your theme and color mode through the new --ui-chart-* CSS variables:
<script setup lang="ts">
const data = [
{ month: 'January', desktop: 186, mobile: 80 },
{ month: 'February', desktop: 305, mobile: 200 },
{ month: 'March', desktop: 237, mobile: 120 }
]
</script>
<template>
<UChart
type="bar"
:data="data"
index="month"
:categories="[{ key: 'desktop', label: 'Desktop' }, { key: 'mobile', label: 'Mobile' }]"
stacked
/>
</template>
[!NOTE]
@tanstack/chartsis an optional peer dependency, install it to use the component. When the props are not enough, thedefinitionprop takes a full TanStack chart definition.
@nuxtjs/i18nWhen @nuxtjs/i18n is installed, the App component now follows the current i18n locale, and only the Nuxt UI locales matching your i18n.locales are bundled. You can drop the import * as locales pattern, which shipped every locale in the entry chunk:
- <script setup lang="ts">
- import * as locales from '@nuxt/ui/locale'
-
- const { locale } = useI18n()
- </script>
-
<template>
- <UApp :locale="locales[locale]">
+ <UApp>
<NuxtPage />
</UApp>
</template>
[!TIP]
An explicitlocaleprop still wins, see the i18n guide.
Pages now load up to 27% less JavaScript. A page no longer loads the code of components only other pages use, and overlays are lazy loaded: the menu of Header, Sidebar and DashboardSidebar, the command palette of DashboardSearch and ContentSearch, and the toasts of Toaster.
| v4.11.3 | v4.12.0 | |
|---|---|---|
| JS | 871.6 kB | 549.6 kB |
| JS (gzip) | 251.9 kB | 183.9 kB |
[!NOTE]
UButtonalso mounts about 38% faster and each item of an openDropdownMenuabout 30% faster, since link props are now picked without a reactive proxy.
@nuxtjs/i18n locale (#7152) (43ba8a0)yearsPerPage prop (#7138) (cc4acae)autoOpen prop (#7049) (dad748e)max prop (#7145) (63a0c05)loop prop (#7128) (a96f56f)as prop (#7048) (623d6d2)open and pressOpenDelay props (#7148) (73c489b)reject event for dropped files (#7164) (c8f5ffc)v-model (#6927) (a352073)startingValue and allowInvalid props (#7146) (d856ec3)@nuxt/ui/components/prose (#7143) (5c302c3)viewport prop (#7123) (4a3464e)prompt prop (#7172) (8c92e5f)breakpoint prop (#7155) (2113daa)closeOnClick to actions (#7147) (378873a)nonce prop (#7137) (9271533)undefined selection when an item is toggled off (#7170) (14f13af)noBodyStyles (#7150) (04f253e)after:leave and after:enter when the animation ends (#7107) (5cd317b)dropzone prop reactive (#7055) (f4322e7)state type (#7165) (a59a3a3)aria-label of controls and pages (#7151) (d2d3da0)sm breakpoint (#7156) (608a3d3)defaultColumn cell and header (#7198) (da9125c)disabled to tree item (#7139) (db30f7f)reka-ui/namespaced (#7176) (896d609)Full Changelog: https://github.com/nuxt/ui/compare/v4.11.3...v4.12.0
