Pro--% off in--d : --h : --m : --s
HeroUI

Migration

Complete guide to migrate your HeroUI v2 application to v3

For AI Assistants

Below are three approaches for AI assistants to access migration documentation. We recommend using the HeroUI Migration MCP server and leveraging its prompts and tools, but all options provide agents with the complete documentation.

FeatureMCP ServerAgent SkillsAGENTS.md
Data sourceRemote endpointsRemote endpointsLocal files
Access methodMCP toolsScript filesLocal file reads
SetupMCP configInstall commandheroui-cli command
UpdatesReal-timeReal-timeManual
Offline
ToolsMCP tools + promptsScripts
GuideMCP Server →Agent Skills →AGENTS.md →

Major Changes

  • Dependencies: Update React to v19+, HeroUI packages to v3, Tailwind CSS to v4, remove Framer Motion
  • No Provider Required: v3 removes the need for HeroUIProvider
  • Component API Updates: Many components use React Aria Components patterns
  • Compound Components: New compound component patterns for better customization. See individual component guides for details.
  • Hooks Removed: v2 component hooks like useSwitch or useInput are removed - use compound components instead. useDisclosure is replaced with useOverlayState. See the Hooks Migration Guide for details.
  • Configuration: Remove heroui() plugin from Tailwind config, update CSS imports, remove hero.ts file
  • Item identity: Collection items (Dropdown, Listbox, Select, Accordion, etc.) now use id and textValue in v3; keep React's key for lists.

Item identity and accessibility (key, id, textValue)

In v2, collection components (Dropdown, Listbox, Select, Accordion, etc.) used React's key as the item identity. The same value drove both React's list reconciliation and the component's selection/expand state. In v3, which uses React Aria Components, those roles are split:

  • id — v3 uses an explicit id prop on each item for selection state, focus, and callbacks (e.g. selectedKeys, expandedKeys, onSelectionChange). Use the same (or equivalent) value you used for key in v2 so that state and callbacks continue to refer to the correct item.
  • textValue — v3 requires textValue on items when the visible content is not plain text (e.g. when using Label, icons, or Description). It is used for screen reader announcements and type-ahead.
  • keyKeep using React's key on list items. It is still required for React's reconciliation and is independent of id.

When migrating: add id (and textValue where needed) for v3's API, but keep key for React.

Migration Strategies

HeroUI v2 and v3 cannot coexist in the same project without special setup. You have two migration approaches to choose from:

Full Migration

Best for: Projects that can dedicate focused time to complete migration in one go.

How it works:

  • Migrate all component code first (project will be broken during this phase)
  • Switch dependencies to v3
  • Complete styling migration

Advantages:

  • Simpler setup - no complex coexistence configuration
  • Cleaner transition - only one version active at a time
  • Supported by Migration MCP prompts

Disadvantages:

  • Project is broken during migration
  • All components should be migrated before switching dependencies

Get started: Full Migration Guide

Incremental Migration

Best for: Projects that need to stay functional during migration, teams migrating gradually over time, large codebases migrating feature-by-feature.

How it works:

  • Set up coexistence using pnpm aliases or component packages
  • Migrate components one-by-one while keeping project functional
  • Complete migration and remove v2 dependencies

Advantages:

  • Project remains functional during migration
  • Can migrate gradually over time
  • Can test v3 components alongside v2

Disadvantages:

  • More complex initial setup
  • Potential styling conflicts
  • Requires managing two versions simultaneously

Get started: Incremental Migration Guide

Component Migration Reference

Use the table below to quickly find migration guidance for each component. Use the link in the "Migration Guide" column to jump to detailed migration instructions.

Component Development Status: Components marked with 🔄 In Progress or 📋 Planned are still being developed. Check the Roadmap for the task status. Guides for these components will be available once development is finished.

v2 Componentv3 ComponentStatusMigration Guide
AccordionAccordion✅ AvailableView guide →
AlertAlert✅ AvailableView guide →
AutocompleteComboBox✅ RenamedView guide →
AvatarAvatar✅ AvailableView guide →
BadgeBadge✅ AvailableView guide →
BreadcrumbsBreadcrumbs✅ AvailableView guide →
ButtonButton✅ AvailableView guide →
ButtonGroupButtonGroup✅ AvailableView guide →
CalendarCalendar✅ AvailableView guide →
CardCard✅ AvailableView guide →
CheckboxCheckbox✅ AvailableView guide →
CheckboxGroupCheckboxGroup✅ AvailableView guide →
ChipChip✅ AvailableView guide →
Code❌ RemovedView guide →
DateInputDateField✅ RenamedView guide →
DatePickerDatePicker✅ AvailableView guide →
DateRangePickerDateRangePicker✅ AvailableView guide →
TimeInputTimeField✅ RenamedView guide →
DividerSeparator✅ RenamedView guide →
DrawerDrawer✅ AvailableView guide →
DropdownDropdown✅ AvailableView guide →
FormForm✅ AvailableView guide →
Image❌ RemovedView guide →
InputTextField, Input, InputGroup✅ AvailableView guide →
InputOTPInputOTP✅ AvailableView guide →
KbdKbd✅ AvailableView guide →
LinkLink✅ AvailableView guide →
ListboxListBox✅ AvailableView guide →
ModalModal✅ AvailableView guide →
Navbar❌ RemovedView guide →
NumberInputNumberField✅ RenamedView guide →
PaginationPagination✅ AvailableView guide →
PopoverPopover✅ AvailableView guide →
ProgressProgressBar✅ RenamedView guide →
CircularProgressProgressCircle✅ RenamedView guide →
RadioRadio✅ AvailableView guide →
RadioGroupRadioGroup✅ AvailableView guide →
RangeCalendarRangeCalendar✅ AvailableView guide →
Ripple❌ RemovedSee Button ripple →
ScrollShadowScrollShadow✅ AvailableView guide →
SelectSelect✅ AvailableView guide →
SkeletonSkeleton✅ AvailableView guide →
SliderSlider✅ AvailableView guide →
Snippet❌ RemovedView guide →
Spacer❌ RemovedView guide →
SpinnerSpinner✅ AvailableView guide →
SwitchSwitch✅ AvailableView guide →
TableTable✅ AvailableView guide →
TabsTabs✅ AvailableView guide →
ToastToast✅ AvailableView guide →
TooltipTooltip✅ AvailableView guide →
User❌ RemovedView guide →

New Components in v3

v3 introduces a number of new components not available in v2:

ComponentPurposeDocumentation
TextFieldEnhanced text input with label and description supportView docs →
TextAreaMulti-line text input componentView docs →
AlertDialogModal dialog for confirmations and alertsView docs →
LabelAccessible form label componentView docs →
DescriptionHelper text for form fieldsView docs →
FieldErrorForm field error message displayView docs →
FieldsetGroup related form fieldsView docs →
InputGroupCompose multiple inputs togetherView docs →
SurfaceContainer component with elevation stylesView docs →
DisclosureExpandable/collapsible content sectionsView docs →
DisclosureGroupCompound component for multiple disclosure sectionsView docs →
SearchFieldSearch input with clear button and optional loading stateView docs →
DateFieldDate input with calendar pickerView docs →
TimeFieldTime input componentView docs →
Tag, TagGroupTags and tag group for selection or displayView docs →
ColorPickerColor selection (ColorArea, ColorField, ColorSlider, ColorSwatch, ColorSwatchPicker)View docs →
CloseButtonDismiss or close trigger buttonView docs →
ErrorMessageForm field error display (React Aria integration)View docs →

Additional Migration Guides

Getting Help

If you encounter issues during migration:

  1. Check the v3 documentation
  2. Review component-specific migration guides
  3. Check the GitHub Discussions
  4. Join the Discord community

On this page