Skip to main content
This guide covers strategies for upgrading Radix UI Primitives and handling breaking changes between versions.

Version Strategy

Radix UI follows semantic versioning:
  • Major versions (1.x → 2.x): Breaking changes that may require code updates
  • Minor versions (1.1 → 1.2): New features, backward compatible
  • Patch versions (1.1.1 → 1.1.2): Bug fixes, backward compatible
Radix Primitives is currently in v1.x and maintains a strong commitment to stability. Breaking changes are rare and well-documented.

General Upgrade Process

1

Check the changelog

Review the changelog for the component you’re upgrading:
2

Update dependencies

Update to the latest version:
3

Run TypeScript checks

TypeScript will catch many breaking changes:
4

Test your components

Run your test suite and manually test components:

Common Migration Patterns

Updating Multiple Packages

When upgrading, it’s often best to update all Radix packages together since they share internal dependencies:

Handling Breaking Changes

API Prop Changes

If a prop is renamed or removed:
Create a wrapper to ease migration:

Component Structure Changes

If component structure changes:

Type Changes

TypeScript types may change between versions:

Migration Checklist

When upgrading major versions:
1

Read release notes

Check the release notes and changelog:
  • Breaking changes
  • Deprecated features
  • New features
  • Bug fixes
2

Update peer dependencies

Ensure React version compatibility:
3

Search for deprecated usage

4

Update styles

Check if CSS selectors or data attributes have changed:
5

Test accessibility

Ensure accessibility features still work:
  • Keyboard navigation
  • Screen reader announcements
  • Focus management
  • ARIA attributes

Backwards Compatibility

Create compatibility layers for gradual migration:
Use this wrapper during migration:

Codemods

For large codebases, consider creating codemods to automate migrations:

Handling Deprecation Warnings

Radix may mark features as deprecated before removing them:
Address deprecation warnings as soon as possible. Deprecated features will be removed in the next major version.

Testing After Migration

Unit Tests

Visual Regression Tests

Use tools like Playwright or Chromatic to catch visual changes:

Getting Help

If you encounter issues during migration:
1

Check documentation

Review the component documentation at https://radix-ui.com/primitives
2

Search GitHub issues

3

Ask the community

Join discussions on GitHub Discussions or Discord
4

Report bugs

If you find a bug, report it with a minimal reproduction

Version-Specific Guides

Upgrading from v0.x to v1.x

Major changes in v1.0:
  • Improved TypeScript types
  • Better SSR support
  • Refined API surface
  • Enhanced accessibility

Staying Current

To stay informed about updates:
  • Watch the GitHub repository
  • Follow release notes
  • Check the changelog regularly
  • Subscribe to the Radix blog