Ray Tien 0d2b646cb6
feat(nuxt-ui): refresh guidance for v4.11 (#502)
Reverify the full stack catalog against Nuxt UI 4.11.1 and correct stale API examples. Add Splitter, ProgressGroup, motion, Vite detection, and CommandPalette security guidance.

Co-authored-by: Ray <ray.tien@cloudeep.com.tw>
2026-09-21 12:28:06 +07:00

28 KiB

1NoCategoryGuidelineDescriptionDoDon'tCode GoodCode BadSeverityDocs URLApplies ToStatusVerified At
21InstallationAdd Nuxt UI moduleInstall Nuxt UI and Tailwind CSS, then register the Nuxt modulepnpm add @nuxt/ui tailwindcss and add @nuxt/ui to modulesManual component importsmodules: ['@nuxt/ui'] // after pnpm add @nuxt/ui tailwindcssimport { UButton } from '@nuxt/ui'Highhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
32InstallationImport Tailwind and Nuxt UI CSSRequired CSS imports in main.css file@import tailwindcss and @import @nuxt/uiSkip CSS imports@import "tailwindcss"; @import "@nuxt/ui";No CSS importsHighhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
43InstallationWrap app with UApp componentUApp provides toast, tooltip, overlay, and locale contextWrap NuxtPage or RouterView once at the app rootMount pages outside UApp<UApp><NuxtPage/></UApp><NuxtPage/> without wrapperHighhttps://ui.nuxt.com/docs/components/appnuxt-ui 4.11.1active2026-09-21
54ComponentsUse U prefix for componentsAll Nuxt UI components use U prefix by defaultUButton UInput UModalButton Input Modal<UButton>Click</UButton><Button>Click</Button>Mediumhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
65ComponentsUse semantic color propsStyle Nuxt UI components with meaning-based colors such as primary, success, and errorUse color props such as color="primary" or color="error"Hardcoded palette colors<UButton color="primary"><UButton class="bg-green-500">Mediumhttps://ui.nuxt.com/docs/getting-started/theme/design-systemnuxt-ui 4.11.1active2026-09-21
76ComponentsUse variant prop for stylingNuxt UI provides solid outline soft subtle ghost link variantsChoose a built-in variant before adding custom classesRecreate a built-in variant with custom classes<UButton variant="soft"><UButton class="border bg-transparent">Mediumhttps://ui.nuxt.com/docs/components/buttonnuxt-ui 4.11.1active2026-09-21
87ComponentsUse size prop consistentlyComponents support xs sm md lg xl sizessize="sm" size="lg"Arbitrary sizing classes<UButton size="lg"><UButton class="text-xl px-6">Lowhttps://ui.nuxt.com/docs/components/buttonnuxt-ui 4.11.1active2026-09-21
98IconsUse i-{collection}-{name} format for iconsNuxt UI v4 uses Iconify i-prefix format — lucide:home is v3 legacyi-lucide-home i-heroicons-user formatlucide:home format (v3 syntax)<UButton icon="i-lucide-home"><UButton icon="lucide:home">Highhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
109IconsUse leadingIcon and trailingIcon propsPosition icons with dedicated props for clarityUse leadingIcon or trailingIcon for standard button iconsBuild a custom icon slot when a standard icon prop is enough<UButton leadingIcon="i-lucide-plus" label="Add"><UButton><UIcon name="i-lucide-plus"/>Add</UButton>Lowhttps://ui.nuxt.com/docs/components/buttonnuxt-ui 4.11.1active2026-09-21
1110ThemingConfigure colors in app.config.tsRuntime color configuration without restartui.colors.primary in app.config.tsHardcoded colors in componentsdefineAppConfig({ ui: { colors: { primary: 'blue' } } })<UButton class="bg-blue-500">Highhttps://ui.nuxt.com/docs/getting-started/theme/design-systemnuxt-ui 4.11.1active2026-09-21
1211ThemingDefine complete custom palettes with @theme staticNuxt UI custom colors require shades 50 through 950Define every --color-brand-* shade in @theme staticDefine only one shade for a custom palette@theme static { --color-brand-50: #fff1f2; ... --color-brand-950: #4c0519; }@theme { --color-brand-500: #ef4444; }Mediumhttps://ui.nuxt.com/docs/getting-started/theme/design-systemnuxt-ui 4.11.1active2026-09-21
1312ThemingRegister and map semantic colorsRegister extra semantic color names at build time then map them to a palette in app.confignuxt.config ui.theme.colors plus app.config ui.colorsUse an unregistered semantic colorui: { theme: { colors: ['primary', 'tertiary'] } } then ui.colors.tertiary = 'violet'<UButton color="tertiary"> without configMediumhttps://ui.nuxt.com/docs/getting-started/theme/design-systemnuxt-ui 4.11.1active2026-09-21
1413FormsUse UForm with schema validationUForm accepts Standard Schema libraries such as Zod, Valibot, Yup, and JoiPass a Standard Schema with :schema and reactive state with :stateManual form validation<UForm :schema="schema" :state="state">Manual @blur validationHighhttps://ui.nuxt.com/docs/components/formnuxt-ui 4.11.1active2026-09-21
1514FormsUse UFormField for field wrapperProvides label error message and validation displayUFormField with name propManual error handling<UFormField name="email" label="Email"><div><label>Email</label><UInput/><span>error</span></div>Mediumhttps://ui.nuxt.com/docs/components/form-fieldnuxt-ui 4.11.1active2026-09-21
1615FormsHandle form submit with @submitUForm emits submit event with validated data@submit handler on UForm@click on submit button<UForm @submit="onSubmit"><UButton @click="onSubmit">Mediumhttps://ui.nuxt.com/docs/components/formnuxt-ui 4.11.1active2026-09-21
1716FormsChoose validation timing deliberatelyUForm validates on input blur and change by default; input is delayed and begins after blur unless eagerSet validateOn and eager to match the interactionAssume the default validates every keystroke immediately<UForm :validateOn="['blur', 'change']">Describe default UForm as eager input-only validationLowhttps://ui.nuxt.com/docs/components/formnuxt-ui 4.11.1active2026-09-21
1817OverlaysUse v-model:open for overlay controlModal Slideover Drawer use v-model:openv-model:open for controlled stateManual show/hide logic<UModal v-model:open="isOpen"><UModal v-if="isOpen">Mediumhttps://ui.nuxt.com/docs/components/modalnuxt-ui 4.11.1active2026-09-21
1918OverlaysUse useOverlay composable for programmatic overlaysOpen overlays programmatically — v4 API is create().open() not open(Component)Create the overlay once, then pass component props directly to open()v3 overlay.open(Component) pattern (removed in v4)const modal = overlay.create(MyModal); const { result } = modal.open({ title: 'Confirm' })overlay.open(MyModal, { props: { title: 'Confirm' } })Highhttps://ui.nuxt.com/docs/composables/use-overlaynuxt-ui 4.11.1active2026-09-21
2019OverlaysUse title and description propsBuilt-in header support for overlaysUse title and description props for a standard overlay headerRebuild a simple title and description with a custom header slot<UModal title="Confirm" description="Are you sure?"><UModal><template #header><h2>Confirm</h2></template>Lowhttps://ui.nuxt.com/docs/components/modalnuxt-ui 4.11.1active2026-09-21
2120DashboardUse UDashboardSidebar for navigationProvides collapsible resizable sidebar with mobile supportUDashboardSidebar with header default footer slotsCustom sidebar implementation<UDashboardSidebar><template #header>...</template></UDashboardSidebar><aside class="w-64 border-r">Mediumhttps://ui.nuxt.com/docs/components/dashboard-sidebarnuxt-ui 4.11.1active2026-09-21
2221DashboardUse UDashboardGroup for layoutWraps dashboard components with sidebar state managementUDashboardGroup > UDashboardSidebar + UDashboardPanelManual layout flex containers<UDashboardGroup><UDashboardSidebar/><UDashboardPanel/></UDashboardGroup><div class="flex"><aside/><main/></div>Mediumhttps://ui.nuxt.com/docs/components/dashboard-groupnuxt-ui 4.11.1active2026-09-21
2322DashboardUse UDashboardNavbar for top navigationResponsive dashboard header with sidebar toggle and layout slotsPlace UDashboardNavbar in a UDashboardPanel header and use its slots for actionsPass unsupported links props or rebuild the responsive toggle<UDashboardNavbar title="Dashboard"><template #right><UButton label="Add"/></template></UDashboardNavbar><UDashboardNavbar :links="navLinks"/>Lowhttps://ui.nuxt.com/docs/components/dashboard-navbarnuxt-ui 4.11.1active2026-09-21
2423TablesUse UTable with data and columns propsPowered by TanStack Table with built-in features:data and :columns propsManual table markup<UTable :data="users" :columns="columns"/><table><tr v-for="user in users">Highhttps://ui.nuxt.com/docs/components/tablenuxt-ui 4.11.1active2026-09-21
2524TablesDefine columns with accessorKeyColumn definitions use accessorKey for data bindingaccessorKey: 'email' in column defString column names only{ accessorKey: 'email', header: 'Email' }['name', 'email']Mediumhttps://ui.nuxt.com/docs/components/tablenuxt-ui 4.11.1active2026-09-21
2625TablesUse column cell slotsCustomize cell content with the documented column-id slot pattern#status-cell for a status columnUse the obsolete #cell-status name<template #status-cell="{ row }"><template #cell-status="{ row }">Mediumhttps://ui.nuxt.com/docs/components/tablenuxt-ui 4.11.1active2026-09-21
2726TablesEnable sorting with TanStack column APIsRender a header control that calls column.toggleSortingUse getCanSort and toggleSortingInvent a sortable property not in the column contractheader: ({ column }) => h(UButton, { onClick: () => column.toggleSorting() }){ accessorKey: 'name', sortable: true }Lowhttps://ui.nuxt.com/docs/components/tablenuxt-ui 4.11.1active2026-09-21
2827NavigationUse UNavigationMenu for nav linksHorizontal or vertical navigation with dropdown supportUNavigationMenu with items arrayManual nav with v-for<UNavigationMenu :items="navItems"/><nav><a v-for="item in items">Mediumhttps://ui.nuxt.com/docs/components/navigation-menunuxt-ui 4.11.1active2026-09-21
2928NavigationUse UBreadcrumb for page hierarchyRender accessible page hierarchy from an items array with NuxtLink support:items array with label and toManual breadcrumb links<UBreadcrumb :items="breadcrumbs"/><nav><span v-for="crumb in crumbs">Lowhttps://ui.nuxt.com/docs/components/breadcrumbnuxt-ui 4.11.1active2026-09-21
3029NavigationUse UTabs for tabbed contentTab navigation with content panelsUTabs with items containing slot contentManual tab state<UTabs :items="tabs"/><div><button @click="tab=1">Mediumhttps://ui.nuxt.com/docs/components/tabsnuxt-ui 4.11.1active2026-09-21
3130FeedbackUse useToast for notificationsComposable notifications rendered by the UApp toast providerWrap the app in UApp and call useToast().add()Alert components for toastsconst toast = useToast(); toast.add({ title: 'Saved' })<UAlert v-if="showSuccess">Highhttps://ui.nuxt.com/docs/components/toastnuxt-ui 4.11.1active2026-09-21
3231FeedbackUse UAlert for inline messagesStatic alert messages with icon and actionsUAlert with title description colorToast for static messages<UAlert title="Warning" color="warning"/>useToast for inline alertsMediumhttps://ui.nuxt.com/docs/components/alertnuxt-ui 4.11.1active2026-09-21
3332FeedbackUse USkeleton for loading statesPlaceholder content during data loadingUSkeleton with appropriate sizeSpinner for content loading<USkeleton class="h-4 w-32"/><UIcon name="i-lucide-loader-circle" class="animate-spin"/>Lowhttps://ui.nuxt.com/docs/components/skeletonnuxt-ui 4.11.1active2026-09-21
3433Color ModeUse UColorModeButton for theme toggleBuilt-in light/dark mode toggle buttonUColorModeButton componentManual color mode logic<UColorModeButton/><button @click="toggleColorMode">Lowhttps://ui.nuxt.com/docs/components/color-mode-buttonnuxt-ui 4.11.1active2026-09-21
3534Color ModeUse UColorModeSelect for theme pickerDropdown to select system light or dark modeUColorModeSelect componentCustom select for theme<UColorModeSelect/><USelect v-model="colorMode" :items="modes"/>Lowhttps://ui.nuxt.com/docs/components/color-mode-selectnuxt-ui 4.11.1active2026-09-21
3635CustomizationUse class for the root and ui for named slotsclass customizes the root slot; ui targets component slotsUse class for root-only changes and ui after checking generated slot namesUse !important or guess undocumented slot names<UButton class="rounded-full" :ui="{ trailingIcon: 'size-3' }"/><UButton class="!rounded-full"/>Mediumhttps://ui.nuxt.com/docs/getting-started/theme/componentsnuxt-ui 4.11.1active2026-09-21
3736CustomizationConfigure default variants in app.configSet component default variants under ui component keysapp.config ui.button.defaultVariantsPut button-specific defaults under global ui.theme.defaultVariantsdefineAppConfig({ ui: { button: { defaultVariants: { color: 'neutral' } } } })ui: { theme: { defaultVariants: { variant: 'outline' } } } // affects every componentMediumhttps://ui.nuxt.com/docs/getting-started/theme/componentsnuxt-ui 4.11.1active2026-09-21
3837CustomizationUse app.config.ts for theme overridesRuntime theme customizationdefineAppConfig with ui keynuxt.config for runtime valuesdefineAppConfig({ ui: { button: { defaultVariants: { size: 'sm' } } } })nuxt.config ui.button.size: 'sm'Mediumhttps://ui.nuxt.com/docs/getting-started/theme/componentsnuxt-ui 4.11.1active2026-09-21
3938PerformanceEnable component detection for NuxtGenerate CSS only for detected Nuxt UI components and their dependenciesUse true for static usage or include dynamic component names in an arrayEnable detection and omit components rendered through dynamic :is valuesui: { experimental: { componentDetection: ['Modal'] } }componentDetection: true with <component :is="name"/> onlyLowhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
4039PerformanceUse UTable virtualize for large dataEnable row virtualization when rendering large datasetsUse the virtualize prop after row rendering becomes a measured bottleneckRender a large dataset without pagination or virtualization<UTable :data="largeData" virtualize/><UTable :data="largeData"/>Mediumhttps://ui.nuxt.com/docs/components/tablenuxt-ui 4.11.1active2026-09-21
4140AccessibilityGive overlays an accessible name and descriptionOverlay title and description props provide dialog labelingProvide title and description unless custom slots supply equivalent semanticsOpen an unlabeled modal<UModal title="Settings" description="Update your preferences"><UModal><template #body>...</template></UModal>Highhttps://ui.nuxt.com/docs/components/modalnuxt-ui 4.11.1active2026-09-21
4241AccessibilityAssociate labels with controlsUse UFormField or correct native id and for attributesUFormField for convenience or explicit label associationUse placeholders as labels<UFormField label="Email"><UInput/></UFormField><UInput placeholder="Email"/>Highhttps://ui.nuxt.com/docs/components/form-fieldnuxt-ui 4.11.1active2026-09-21
4342ContentUse UContentToc for table of contentsAutomatic TOC with active heading highlightUContentToc with :linksManual TOC implementation<UContentToc :links="toc"/><nav><a v-for="heading in headings">Lowhttps://ui.nuxt.com/docs/components/content-tocnuxt-ui 4.11.1active2026-09-21
4443ContentUse UContentSearch for docs searchCommand palette for documentation searchUContentSearch with Nuxt ContentCustom search implementation<UContentSearch/><UCommandPalette :groups="searchResults"/>Lowhttps://ui.nuxt.com/docs/components/content-searchnuxt-ui 4.11.1active2026-09-21
4544AI/ChatUse UChatMessages for chat UIDesigned for Vercel AI SDK integrationUChatMessages with messages arrayCustom chat message list<UChatMessages :messages="messages"/><div v-for="msg in messages">Mediumhttps://ui.nuxt.com/docs/components/chat-messagesnuxt-ui 4.11.1active2026-09-21
4645AI/ChatUse UChatPrompt for inputEnhanced textarea for AI promptsUChatPrompt with v-modelBasic textarea<UChatPrompt v-model="prompt"/><UTextarea v-model="prompt"/>Mediumhttps://ui.nuxt.com/docs/components/chat-promptnuxt-ui 4.11.1active2026-09-21
4746EditorUse UEditor for rich textTipTap-based editor binds its document with v-modelUEditor with v-modelUse the undocumented v-model:content binding<UEditor v-model="content"/><UEditor v-model:content="content"/>Mediumhttps://ui.nuxt.com/docs/components/editornuxt-ui 4.11.1active2026-09-21
4847LinksUse to prop for navigationUButton and ULink support NuxtLink to propto="/dashboard" for internal linkshref for internal navigation<UButton to="/dashboard"><UButton href="/dashboard">Mediumhttps://ui.nuxt.com/docs/components/buttonnuxt-ui 4.11.1active2026-09-21
4948LinksUse to for external URLsULink and link-enabled components detect absolute URLs and support target when a new tab is intendedto="https://example.com" target="_blank"Use href inconsistently or claim an external prop is required<UButton to="https://example.com" target="_blank"><UButton href="https://...">Lowhttps://ui.nuxt.com/docs/components/linknuxt-ui 4.11.1active2026-09-21
5049LoadingUse loadingAuto on buttonsAutomatic loading state from @click promiseloadingAuto prop on UButtonManual loading state<UButton loadingAuto @click="async () => await save()"><UButton :loading="isLoading" @click="save">Lowhttps://ui.nuxt.com/docs/components/buttonnuxt-ui 4.11.1active2026-09-21
5150LoadingUse UForm loadingAutoAuto-disable form during submitloadingAuto on UForm (default true)Manual form disabled state<UForm @submit="handleSubmit"><UForm :disabled="isSubmitting">Lowhttps://ui.nuxt.com/docs/components/formnuxt-ui 4.11.1active2026-09-21
5251InstallationLet Nuxt UI declare module dependenciesNuxt UI uses Nuxt moduleDependencies for Icon Fonts and Color Mode ordering and registrationConfigure dependency options at their root keysAdd duplicate module entries without a documented needicon: { /* opts */ } in nuxt.configmodules: ['@nuxt/ui', '@nuxt/icon']Highhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
5352InstallationUse official templates to bootstrap projectsCreate a Nuxt project from an official Nuxt UI templatenpm create nuxt@latest -- -t ui/dashboardManually reconstruct a templatenpm create nuxt@latest -- -t ui/dashboardpnpm create nuxt app then copy dashboard filesMediumhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
5453IconsInstall required icon collections locallyInstall the Iconify JSON collections used by the app for reliable SSR and bundlingpnpm i @iconify-json/lucide for lucide iconsRely on an unavailable collection at runtimepnpm i @iconify-json/lucideUse i-custom-* without installing its collectionMediumhttps://ui.nuxt.com/docs/getting-started/icons/nuxtnuxt-ui 4.11.1active2026-09-21
5554IconsOverride default component icons centrally when neededappConfig.ui.icons keeps intentional icon overrides consistentSet a global icon key when the product needs a different defaultRepeat the same icon override on every component instancedefineAppConfig({ ui: { icons: { loading: 'i-lucide-refresh-cw', close: 'i-lucide-x' } } })<UModal close-icon="i-lucide-circle-x"/> repeated everywhereLowhttps://ui.nuxt.com/docs/getting-started/installation/nuxtnuxt-ui 4.11.1active2026-09-21
5655FormsUse UFileUpload for file inputBuilt-in drag-drop and preview supportUFileUpload with v-model and accept propCustom input type=file<UFileUpload v-model="files" accept="image/*" multiple/><input type="file" @change="handleFiles">Mediumhttps://ui.nuxt.com/docs/components/file-uploadnuxt-ui 4.11.1active2026-09-21
5756FormsUse UInputDate for date selectionDate input supports single dates and ranges with locale inherited from UAppUse range when needed and configure locale on UAppThird-party date picker libraries<UApp :locale="fr"><UInputDate v-model="range" range/></UApp><UInputDate locale="fr"/>Mediumhttps://ui.nuxt.com/docs/components/input-datenuxt-ui 4.11.1active2026-09-21
5857FormsUse UInputTags for tag inputMulti-value tag input with keyboard supportUInputTags with v-model and max propCustom chip input implementation<UInputTags v-model="tags" :max="5" /><UInput @keydown.enter="addTag">Lowhttps://ui.nuxt.com/docs/components/input-tagsnuxt-ui 4.11.1active2026-09-21
5958FormsUse UColorPicker for color selectionFull-featured color picker with multiple format supportUColorPicker with v-model and format propNative input type=color<UColorPicker v-model="color" format="hex" /><input type="color" v-model="color">Lowhttps://ui.nuxt.com/docs/components/color-pickernuxt-ui 4.11.1active2026-09-21
6059DataUse UTree for hierarchical dataBuilt-in tree component with expand/collapseUTree with items prop containing nested childrenCustom recursive component<UTree :items="treeItems" /><TreeNode v-for="item in items" :key="item.id">Lowhttps://ui.nuxt.com/docs/components/treenuxt-ui 4.11.1active2026-09-21
6160DataUse UMarquee for infinite scroll contentAnimated infinite scroll band for logos or testimonialsUMarquee with repeat and pauseOnHover propsCSS animation keyframes loop<UMarquee :repeat="3" pause-on-hover><div class="animate-marquee">Lowhttps://ui.nuxt.com/docs/components/marqueenuxt-ui 4.11.1active2026-09-21
6261OverlaysUse UContextMenu for right-click menusContext menu triggered by right-click on childrenUContextMenu wrapping target elementBrowser default context menu<UContextMenu :items="menuItems"><div>Right-click me</div></UContextMenu><div @contextmenu.prevent="showMenu">Mediumhttps://ui.nuxt.com/docs/components/context-menunuxt-ui 4.11.1active2026-09-21
6362OverlaysAwait overlay result for confirmation dialogsopen() returns a Promise that resolves when the overlay component emits closeEmit a close value from the overlay component and await modal.open()Expect a result from a component that never emits closeif (await modal.open()) { deleteItem() }modal.open(); deleteItem()Mediumhttps://ui.nuxt.com/docs/composables/use-overlaynuxt-ui 4.11.1active2026-09-21
6463NavigationUse UCommandPalette with identified groupsCommand palette accepts groups with an id, label, and itemsGive every group a stable id and its own itemsPass a flat items prop that is not part of the component API<UCommandPalette :groups="[{ id: 'actions', label: 'Actions', items }]"/><UCommandPalette :items="flatList"/>Mediumhttps://ui.nuxt.com/docs/components/command-palettenuxt-ui 4.11.1active2026-09-21
6564NavigationUse defineShortcuts with extractShortcutsWire keyboard shortcuts from menu item kbds automaticallyextractShortcuts(items) + defineShortcuts to sync keybindingsManually duplicate shortcuts from menu itemsdefineShortcuts(extractShortcuts(items))defineShortcuts({ meta_n: () => newFile() }) // duplicated from itemsLowhttps://ui.nuxt.com/docs/composables/define-shortcutsnuxt-ui 4.11.1active2026-09-21
6665LayoutUse UHeader and UFooter for page layoutResponsive header/footer with built-in mobile menuUHeader with #default slot for nav UFooter with columnsCustom header/footer from scratch<UHeader><template #right><UNavigationMenu/></template></UHeader><header class="sticky top-0">Lowhttps://ui.nuxt.com/docs/components/headernuxt-ui 4.11.1active2026-09-21
6766LayoutUse UPageAside for sidebar contentSidebar that hides below lg breakpoint automaticallyUPageAside for docs and landing page sidebarsManual hidden lg: classes<UPageAside><UNavigationMenu orientation="vertical"/></UPageAside><aside class="hidden lg:block">Lowhttps://ui.nuxt.com/docs/components/page-asidenuxt-ui 4.11.1active2026-09-21
6867Color ModeWrap custom color mode toggles in ClientOnlyPrevents hydration mismatch on server-rendered color modeClientOnly with fallback placeholderDirect useColorMode in template without ClientOnly<ClientOnly><USwitch v-model="isDark"/><template #fallback><div class="size-8"/></template></ClientOnly><USwitch v-model="isDark"/> directly in templateMediumhttps://ui.nuxt.com/docs/getting-started/integrations/color-mode/nuxtnuxt-ui 4.11.1active2026-09-21
6968ThemingRead generated theme file to find slot namesGenerated theme files list current slots, variants, and default classesCheck .nuxt/ui in Nuxt or node_modules/.nuxt-ui/ui in Vue before overriding slotsGuess slot names or use trial-and-error.nuxt/ui/button.ts or node_modules/.nuxt-ui/ui/button.ts<UButton :ui="{ base: 'rounded-full' }"/> without checking slotsMediumhttps://ui.nuxt.com/docs/getting-started/theme/componentsnuxt-ui 4.11.1active2026-09-21
7069ComposablesUse defineShortcuts whenever keyword shortcutwhenever array condition prevents shortcut firing when inactivewhenever: [isFormValid] to guard shortcut executionAlways-on shortcuts that fire in wrong contextdefineShortcuts({ meta_enter: { handler: submit, whenever: [isFormValid] } })defineShortcuts({ meta_enter: () => submit() }) // fires even when invalidLowhttps://ui.nuxt.com/docs/composables/define-shortcutsnuxt-ui 4.11.1active2026-09-21
7170i18nUse UApp locale prop for internationalizationUApp locale configures component messages, formatting, and directionPass a locale object to UApp and propagate lang and dir to htmlTranslate built-in component strings instance by instanceimport { fr } from '@nuxt/ui/locale'; // <UApp :locale="fr"><UModal title="Fermer"> manually for each componentLowhttps://ui.nuxt.com/docs/getting-started/integrations/i18n/nuxtnuxt-ui 4.11.1active2026-09-21
7271LayoutUse USplitter for resizable panel layoutsSplitter provides horizontal, vertical, nested, and collapsible resizable panelsDefine panel items with stable slots and size constraintsReimplement drag resizing and keyboard behavior<USplitter id="layout" :items="items" class="h-96"><div @mousemove="resizePanels">Mediumhttps://ui.nuxt.com/docs/components/splitternuxt-ui 4.11.1active2026-09-21
7372LayoutStabilize server-rendered splitter layoutsGenerated ids and mixed default sizes can cause hydration mismatches or panel jumpsSet id and give defaultSize to every item or to none; use auto-save-id for persistenceMix items with and without defaultSize during SSR<USplitter id="layout" auto-save-id="layout" :items="sizedItems"><USplitter :items="mixedDefaultSizes">Highhttps://ui.nuxt.com/docs/components/splitternuxt-ui 4.11.1active2026-09-21
7473DataUse UProgressGroup for segmented totalsProgressGroup displays multiple values as segments of one total with a legendPass labeled items and an explicit max when the total is not 100Build a segmented progress bar from unrelated div widths<UProgressGroup :items="usage" :max="128" status/><div v-for="item in usage" :style="{ width: item.value + '%' }">Lowhttps://ui.nuxt.com/docs/components/progress-groupnuxt-ui 4.11.1active2026-09-21
7574MotionRetune library motion with theme easing tokensNuxt UI 4.11 uses --ease-out for enter, exit, and movement transitionsOverride --ease-out in @theme to retime motion consistentlyOverride transition timing independently on every component@theme { --ease-out: cubic-bezier(0.16, 1, 0.3, 1); }.modal { transition-timing-function: ... } repeated per componentLowhttps://ui.nuxt.com/docs/getting-started/theme/design-system#motionnuxt-ui 4.11.1active2026-09-21
7675PerformanceEnable component detection in Vue and ViteThe Nuxt UI Vite plugin can generate CSS only for detected componentsSet experimental.componentDetection in the @nuxt/ui/vite plugin and restart after adding componentsExpect newly detected component styles without restarting the dev serverui({ experimental: { componentDetection: true } })ui({}) // generates theme CSS for every componentLowhttps://ui.nuxt.com/docs/getting-started/installation/vue#experimentalcomponentdetectionnuxt-ui 4.11.1active2026-09-21
7776SecurityUse Nuxt UI 4.11+ for CommandPalette searchNuxt UI 4.11 escapes CommandPalette search highlights to prevent XSSUpgrade @nuxt/ui to 4.11.1 or newer when rendering untrusted command labelsRender untrusted CommandPalette labels with a pre-4.11 releasepnpm add @nuxt/ui@^4.11.1@nuxt/ui@4.10 with user-controlled command labelsHighhttps://ui.nuxt.com/docs/components/command-palettenuxt-ui 4.11.1active2026-09-21