
Vibe Coding a Collaborative Editor with Comment Support with Nuxt UI and Jazz
VueSchool
New Toggle and ToggleGroup components let you build buttons that can be pressed on or off, alone or as a group where type="multiple" allows several at once:
<script setup lang="ts">
const bold = ref(false)
const align = ref('left')
</script>
<template>
<UToggle v-model="bold" icon="i-lucide-bold" aria-label="Bold" />
<UToggleGroup
v-model="align"
:items="[
{ value: 'left', icon: 'i-lucide-align-left', 'aria-label': 'Left' },
{ value: 'center', icon: 'i-lucide-align-center', 'aria-label': 'Center' },
{ value: 'right', icon: 'i-lucide-align-right', 'aria-label': 'Right' }
]"
/>
</template>
[!TIP]
They take theButtonprops, plusactive-colorandactive-variantfor the pressed state.
The ChatPrompt component now accepts files with v-model:files, pasted or dropped on the prompt and listed with the new ChatAttachment component:
<template>
<UChatPrompt v-model="input" v-model:files="files" @submit="onSubmit">
<UChatPromptSubmit :status="status" />
</UChatPrompt>
</template>
[!TIP]
UsetoFileUIPartsfrom@nuxt/ui/utils/aito send them with the AI SDK, andv-model:queueto queue the messages sent while a response is streaming.
A new promise method on useToast shows a loading toast and updates it when the promise settles:
const toast = useToast()
await toast.promise($fetch('/api/save', { method: 'POST' }), {
loading: 'Saving...',
success: { title: 'Saved', color: 'success' },
error: (error: any) => ({ title: error.message, color: 'error' })
})
Nuxt UI now ships an ESLint config that checks your Tailwind CSS classes against your theme, like text-gray-500 where a semantic token such as text-muted exists:
export default defineNuxtConfig({
modules: ['@nuxt/eslint', '@nuxt/ui'],
css: ['~/assets/css/main.css'],
ui: {
eslint: true
}
})
[!NOTE]
It needseslint-plugin-better-tailwindcssinstalled. Check the Vue guide to use it without Nuxt.
item to trigger slots (#7437)promise method (#7383)@nuxt/ui/eslint config (#7329)v-model:queue (#7301)footer slot (#7268)error prop (#7253)part slot (#7251)ignoreFilter prop (#7224)null with null in compare (#7441)data prop (#7412)__v_raw (#7419)change on uncontrolled deselect (#7402)aria-busy while loading (#7368)scope to footer header cells (#7357)scope="col" to header cells (#7356)active to the menu item slot (#7349)@nuxtjs/i18n locales (#7330)useImage instead of re-exporting it from #imports (#7319)app.baseURL twice with @nuxt/image (#7278)prose is false (#7266)ef6b6934b)FieldGroup inside a form (#7261)as title support (#7260)isToolStreaming on denied approvals (#7243)button type to rail (#7214)spotlight cards (#7418)reactiveOmit (#7384)reactivePick (#7367)tailwindcss/colors lazily when hydrating (#7311)spotlight, once idle (#7310)to or href (#7221)3879d262e)28a332e9f)65bba7241)tagPriority as a literal in theme styles (#7365)tagPriority and add og:image dimensions on theme page (cb0a51f12)366e94845)84a48cb17)status to UChatPrompt in the AI chat guide (#7262)3456d03f7)6902550d6)sections for the release headings (#7442)5122d2d15)getRowId and watch-options to the table recipe (#7320)8471aa71c)