NextUI v2.6.0 🔥
NextUI version v2.6.0 comes with 4 new components Form, Drawer, Input OTP and Alert, React 19 & Next.js 15 support, and lots of bug fixes and improvements.
What's New in v2.6.0?
- Form Component - A form component with built-in validation, submission handling, and accessibility features.
- Drawer Component - A sliding panel component with multiple placement options and focus management.
- Input OTP Component - An accessible one-time password input with focus management.
- Alert Component - A component for displaying messages with accessibility and keyboard navigation support.
- Collection-based components Virtualization - Performance improvements for large datasets in Select, Autocomplete & Listbox components.
- React 19 Support & Library Upgrades - Support for React 19 and upgrades to various dependencies.
- New use-theme hook - A new hook for runtime theme management.
- Draggable Modal - Support for draggable modal functionality.
- Router Improvements - Enhanced routing capabilities and TypeScript support.
- API Improvements - New features and props across multiple components.
- What's Next? - Upcoming features and improvements.
- Breaking Changes - Important changes that may affect existing implementations.
- Release Changes - Detailed list of features, documentation updates, bug fixes and enhancements.
Upgrade today by using one of the following methods:
- Upgrading NextUI using the
cli
- First, upgrade Framer Motion to at least v11.9.0:
- Then, upgrade NextUI:
- Upgrading NextUI using the
pnpm
Form Component
Built on React Aria's Form component, the Form component provides accessible form handling with built-in submission, validation and error management.
Built-in Validation
You can use native HTML validation attributes or create custom validation rules.
Real-time Validation
You can validate the form data while users are typing.
Server Integration
The Form components works seamlessly with React Server Actions.
Form Libraries Support
You can also use popular form libraries like react-hook-form
and formik
.
Accessibility Built-in
The Form
component automatically handles ARIA attributes and keyboard navigation, making your forms usable by everyone:
Schema validation
The Form
component supports errors from schema validation libraries like Zod.
You can use Zod's flatten
method to get error messages for each field and return them as part of the server response.
Key Features
- Server Integration: Works seamlessly with React Server Actions
- Schema Validation: Supports Zod schema validation
- Form Libraries Support: Supports popular form libraries like
react-hook-form
andformik
- Accessibility: Built-in accessibility features including ARIA attributes and keyboard navigation
Check out our Forms documentation for a deep dive into all the features and capabilities.
Drawer Component
The new Drawer component displays a sliding panel from the screen edge with supplementary content, featuring built-in accessibility, focus management, and keyboard navigation.
Key Features
- Multiple Placements: Can be positioned on any edge of the screen (left, right, top, bottom)
- Customizable Sizes: Comes with preset sizes from xs to 5xl, plus full-width option
- Backdrop Options: Supports transparent, opaque, or blur backdrop styles
- Focus Management: Automatically handles focus trapping and restoration
- Keyboard Navigation: Built-in support for Esc key dismissal and keyboard navigation
- Form Validation: Supports built-in validation states and custom validation rules for form inputs
See the Drawer documentation for more details and examples.
Input OTP Component
The Input OTP component provides an accessible way to enter one-time passwords with built-in focus management and keyboard navigation. It is built on top of the input-otp library by @guilherme_rodz.
Key Features
- Focus Management: Automatically handles focus trapping and restoration
- Keyboard Navigation: Built-in support for Esc key dismissal and keyboard navigation
- Customizable Animations: Supports custom motion animations through Framer Motion
- Form Integration: Seamlessly works with form elements while maintaining proper focus management
See the Input OTP documentation for more details and examples.
Alert Component
The Alert component allows users to display messages to the user. It's built with accessibility in mind and includes features like focus management, keyboard navigation, and screen reader support.
Key Features
- Focus Management: Automatically handles focus trapping and restoration
- Keyboard Navigation: Built-in support for Esc key dismissal and keyboard navigation
- Customizable Animations: Supports custom motion animations through Framer Motion
- Form Integration: Seamlessly works with form elements while maintaining proper focus management
See the Alert documentation for more details and examples.
Collection-based components Virtualization
Select, Autocomplete & Listbox components now support virtualization to improve performance on large collections.
Note: The virtualization strategy is based on the @tanstack/react-virtual package, which provides efficient rendering of large lists by only rendering items that are visible in the viewport.
See the Autocomplete documentation for more details and examples.
React 19 Support & Library Upgrades
- In preparation for React 19, NextUI is now compatible with React 19 RC and Next.js 15.
- React Aria packages upgrades and fixes the exact versions of React Aria, React Flow, React Hook Form, React Router, React Server, React Use, Tanstack Query, Tanstack Virtual, and Tanstack Table
- Framer Motion is now only added to the final bundle when the animations are enabled and we also added support for Framer motion v12
New use-theme hook
We created our own use-theme
hook that replaces use-dark-theme
hook to allow users to change the theme at runtime.
See the Dark Mode documentation for more details and examples.
Draggable Modal
Added support for draggable modals.
Note: The modal is draggable only from the header part.
Router Improvements
NextUI now provides enhanced routing capabilities with better TypeScript support and integration with popular routing solutions:
- Path Type Safety: All router-based components now support path intellisense when using TypeScript
- Router Options Support: Added
routerOptions
prop to all link components for controlling navigation behavior - Enhanced Router Configuration: Global type configuration for router options through TypeScript:
- Improved Base Path Support: Better handling of base paths through the new
useHref
prop inNextUIProvider
- Framework-specific Optimizations: Built-in support for Next.js (both App and Pages Router), React Router, Remix, and TanStack Router
See the Routing documentation for more details.
API Improvements
NextUIProvider
useHref
(added) - Converts a router-specific href to a native href for use on DOM elements. For example, if your router accepts relative paths or custom link formats, useHref will generate the full native href based on the RouterProvider's configuration.navigate
(modified) -((path: Href, routerOptions?: RouterOptions) => void) | undefined
- we added the router optionsreduceMotion
(added) - Controls the motion preferences for the entire application, allowing developers to respect user settings for reduced motion. The available options are:"always"
- Always disable motion"never"
- Always enable motion"user"
- Respect user system preferences for motion
DatePicker
selectorButtonPlacement
(added) - Controls the placement of selector buttonsshowMonthAndYearPickers
(added) - Controls visibility of month and year picker dropdowns
Tabs
tabRef
(added) - Allows accessing the underlying tab element via ref
Popover
shouldCloseOnScroll
(added) - Controls whether popover should close when scrolling
Table
isKeyboardNavigationDisabled
(added) - Disables keyboard navigation in tables
Textarea
isClearable
(added) - Adds clear button functionality to textarea
Select
hideEmptyContent
(added) - Controls visibility of empty content message- Added virtualization support for improved performance with large datasets
Autocomplete & Listbox
- Added virtualization support for improved performance with large datasets
Modal
- Added support for draggable modals (draggable from header)
See the NextUIProvider documentation for more details.
What's Next?
- Rebranding - We're preparing a rebranding of NextUI to ensure long-term sustainability and avoid potential naming conflicts
- Update NextUI Pro - We're working on a new version of NextUI Pro that will be compatible with Next.js 15 and React 19. Follow progress here
- Tailwind CSS v4 support - Read more here
- React 19 internal APIs migration - Read more here
- Toast component - Follow progress here
- Rating component - Follow progress here
- File Upload component - Follow progress here
- Upgrade to the latest React Aria - Read more here
- Complete Figma components - Follow progress here
🚨 Breaking Changes
We try to keep the breaking changes to a minimum, but sometimes it's necessary to make changes to the API to improve the developer experience.
Table Theme Group Data Selectors
The nested group selectors for table themes have been updated to require explicit element selectors. You'll need to add /tr
or /th
to custom styles for group-data.
Circular Progress Theme Location
The circular progress Tailwind variants have been moved from circular-progress
to progress
. You'll need to update your Tailwind CSS configuration tailwind.config.js
:
Release Changes
Features:
- Added Alert component by @jrgarciadev and @abhinav700 in PR #3982, PR #3680, PR #4071, and PR #4073
- Added Draggable modal by @jrgarciadev and @wzc520pyfm in PR #3983 and PR #2818
- Added Drawer component by @jrgarciadev and @1111mp in PR #3986, PR #2223 and PR #4057
- Added InputOTP component by @macci001 in PR #4052
- Added Form component by @ryo-manba in PR #3036
- Added
selectorButtonPlacement
prop to date-picker by @ryo-manba in PR #3248 - Added
tabRef
prop to tabs by @winchesHe in PR #3974 - Added
shouldCloseOnScroll
prop to popover by @awesome-pro in PR #3595 - Added
showMonthAndYearPickers
prop to date-range-picker and range-calendar by @ryo-manba in PR #3302 - Added
use-theme
hook by @wingkwong in PR #3169 - Added
isKeyboardNavigationDisabled
prop in Table by @macci001 in PR #3735 - Added
reducedMotion
to Provider by @ryo-manba in PR #3470 - Added
isClearable
to Textarea by @jrgarciadev and @IsDyh01 in PR #4172 and PR #3477 - Added
hideEmptyContent
to Select by @Peterl561 in PR #4219
Documentation:
- Improved performance by implementing
useIntersectionObserver
for code blocks - now they only load when visible in viewport - Enhanced readability with style changes to provide more space and better visual hierarchy
- Revamped API Table design:
- Moved descriptions into tooltips that appear right after titles
- Decreased font size for better scanning
- Improved color scheme for better contrast
- Fixed broken links by @wingkwong in PR #3796
- Fixed canary storybook links by @wingkwong in PR #4030
- Fixed typos in dark mode page by @wingkwong in PR #3823
- Fixed types for classNames and itemClasses by @wingkwong in PR #4209
- Fixed typos in landing page by @PentSec in PR #3928
- Fixed typos in date picker page by @dperconti in PR #3516
- Fixed incorrect highlighted line in Select page by @Choneas in PR #3838
- Fixed unexpected translation in code block by @nnmax in PR #3878
- Fixed yarn command in installation page by @AzpektDev in PR #4132
- Added ethical ads by @jrgarciadev in PR #3803
- Added Form guide by @ryo-manba in PR #3882
- Enhanced overall DX for all pages by @wingkwong in PR #4055
- Supported virtualization for Autocomplete by @jrgarciadev and @vinroger in PR #4094 and PR #3444
- Supported virtualization for Select by @vinroger in PR #4203
- Supported virtualization for Listbox by @vinroger in PR #4206
- Optimized code fold by @winchesHe in PR #4202
- Synced API from nextui-cli v0.3.5 by @winchesHe in PR #4173
Bug Fixes:
- Fixed avatar flashing issues by @jrgarciadev and @rkkautsar in PR #3987 and PR #3444
- Fixed image ReferenceError in SSR by @wingkwong in PR #4122
- Fixed navigate parameters by @wingkwong in PR #4163
- Fixed missing peer / dev dependency for framer-motion by @wingkwong in PR #4161
- Fixed menu item classNames by @winchesHe in PR #4156
- Fixed controlled IsInvalid prop by @chirokas in PR #4082
- Fixed inert value with boolean type for React 19 by @wingkwong in PR #4039
- Fixed typecheck errors by @wingkwong in PR #4171
- Fixed tw nested group by @wingkwong in PR #3909
- Fixed select styles consistent with input by @macci001 in PR #3881
- Fixed missing li tag when href is specified by @macci001 in PR #4168
- Fixed sliding issue caused by the helper wrapper by @mstfblci in PR #3966
- Fixed element.ref warning in React 19 by @jrgarciadev in PR #4003
- Fixed image load on NextJS by @jrgarciadev in PR #3998
- Fixed squish textarea label by @Peterl561 in PR #4197
- Fixed forwardRef render functions by @winchesHe in PR #4198
- Fixed collection based components ref by @jrgarciadev in PR #4207
- Fixed data-slot for select error message by @jubar in PR #4214
- Fixed selection functionality on touch by @macci001 in PR #4220
- Fixed cursor position when hidden on init by @Peterl561 in PR #4222
Enhancements:
- Automatically focus first non-disabled item by @juliesaia in PR #2186
- Refactored RTL-specific styles by @macci001 in PR #3868
- Upgraded React Aria and Support NextJS 15 by @ryo-manba in PR #3732
- Upgraded tailwind-merge version by @wingkwong in PR #3657
- Upgraded Storybook to v8 by @winchesHe in PR #3946
- Optimized performance by @wingkwong in PR #3523
- Applied
useMenu
anduseMenuItem
from@react-aria
by @wingkwong in PR #3261 - Revised label font size for lg by @wingkwong in PR #4141
- Improved Form component by @jrgarciadev in PR #4224
Chore:
- Added git hook to auto update dependencies by @winchesHe in PR #3365
- Added pre-release workflow by @wingkwong in PR #2910
- Updated testing libraries by @ryo-manba in PR #3886
- Replaced VA by Posthog by @wingkwong in PR #4123
- Moved circular-progress tv to progress by @winchesHe in PR #3321
Special thanks to NextUI Team members @wingkwong, @macci001, @vinroger, @ryo-manba, @winchesHe, @tianenpang and contributors for their contributions to this release.
For a full list of changes, please refer to the release notes.
Thanks for reading and happy coding! 🚀
Community
We're excited to see the community adopt NextUI, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!
Contributing
PR's on NextUI are always welcome, please see our contribution guidelines to learn how you can contribute to this project.