Overview
Nuxt UI v4 is a major release that brings compatibility with Nuxt 4, imports@nuxt/ui-pro components into the main library, and introduces several breaking changes to improve consistency and developer experience.
Nuxt UI v4 requires Nuxt 4 for compatibility. Ensure you’ve upgraded your Nuxt version before migrating.
Breaking Changes
Nuxt 4 Compatibility
The most significant change in v4 is the update to support Nuxt 4. This means v4 is not compatible with Nuxt 3.Component Renames and Removals
FieldGroup (formerly ButtonGroup)
TheButtonGroup component has been renamed to FieldGroup to better reflect its purpose in form layouts.
Before (v3):
Marquee (formerly PageMarquee)
ThePageMarquee component has been simplified and renamed to Marquee.
Before (v3):
PageAccordion Removed
ThePageAccordion component has been removed in favor of the standard Accordion component.
Before (v3):
AI SDK v5 Upgrade
If you’re using AI-related components, they now useai-sdk v5, which includes breaking changes to the AI SDK API.
Model Modifiers
Thenullify modifier has been renamed to nullable, and a new optional modifier has been added.
Before (v3):
Form Validation Changes
Support forjoi and yup has been removed in favor of the @standard-schema/spec interface. This means you should migrate to validation libraries that support the standard schema spec.
Before (v3):
Zod and Valibot are recommended alternatives that support the standard schema specification.
Form State Transformation
The Form component no longer mutates the form state when transformations are enabled. This prevents unwanted side effects. Migration:- If you rely on the form state being transformed, you’ll need to handle transformations manually in your submit handler.
- Consider using the
transformprop with a separate transformed state variable.
Table Select Event
The arguments order in the@select event has been standardized for consistency.
Before (v3):
CommandPalette Children Icon
Thetrailing-icon prop in the input is now separate from the children-icon prop.
Before (v3):
Consistent Exposed Refs
Component refs have been standardized across all components. Some components now expose different ref names. Migration:- Check your template refs if you’re accessing component internals
- Refer to the component documentation for the new exposed ref structure
Composables Export
Composables are now properly exported from the module, which may affect your import statements. Before (v3):New Features
Nuxt UI Pro Components Integrated
All components from@nuxt/ui-pro have been integrated into the main @nuxt/ui package. You no longer need to install @nuxt/ui-pro separately.
Icon Component Enhancement
The Icon component now allows passing a component instead of just a name string.New Components
Editor Component
A new rich text editor component with full WYSIWYG capabilities.Theme Component
A new component for managing theme configurations.Empty Component
A dedicated component for displaying empty states.InputDate and InputTime
New date and time input components for better form handling.ScrollArea Component
A new component for creating custom scrollable areas with better styling control.Deprecations
useOverlay Changes
Theunmount function has been renamed from unmont (fixing the typo).
Before (v3):
Migration Checklist
Update dependencies
- Upgrade Nuxt to v4
- Upgrade @nuxt/ui to v4
- Remove @nuxt/ui-pro if installed
Update component names
- Replace
UButtonGroupwithUFieldGroup - Replace
UPageMarqueewithUMarquee - Replace
UPageAccordionwithUAccordion
Update validation schemas
- Migrate from joi/yup to zod or valibot
- Update form schemas to use @standard-schema/spec
Update model modifiers
- Replace
.nullifywith.nullableor.optional
Update event handlers
- Fix Table
@selectevent argument order
Update composable imports
- Import composables directly from ‘@nuxt/ui’
Test your application
- Run
npm run devand check for errors - Test all forms and validation
- Test all UI components
- Run type checking with
npm run typecheck
Need Help?
If you encounter issues during migration:- Check the GitHub Discussions
- Review the Changelog
- Open an issue on GitHub