DEV Community

Cover image for Is Your Shadcn UI Project at Risk? A Deep Dive into Radix’s Future
Mashuk Tamim
Mashuk Tamim

Posted on

Is Your Shadcn UI Project at Risk? A Deep Dive into Radix’s Future

A recent "hot take" from Chris, a trusted contributor to the Create T3 App, sparked a significant discussion in the web development community: is using Shadcn UI, and by extension Radix, a liability? This question has ignited a debate about the maintenance of these popular UI component libraries and the future of UI development.

Understanding the Players: Shadcn UI and Radix

To understand the core of the issue, it’s crucial to differentiate between Shadcn UI and Radix:

  • Shadcn UI: This isn’t a traditional component library but rather an “idea” — an open abstraction with great defaults and a distribution system. It combines Tailwind for styling, Radix for behaviors, and its own custom styles for appearance. A key differentiator is that when you use Shadcn UI, you get the source code directly in your codebase, allowing for greater ownership and customization.
  • Radix Primitives: Radix is primarily known for its “headless behaviors” or “primitives.” These are the underlying functionalities for components like dropdowns, dialogues, and popovers, handling aspects like focus management and keyboard navigation. Radix provides the behavior, but you bring your own styles.

The Concerns Around Radix’s Maintenance

The core of Chris’s “hot take” stems from concerns about Radix’s maintenance. Radix was initially built by the startup Modulz, which later became defunct. The Radix team was then acquired by WorkOS, a company that needed better component libraries for integrating authentication into React applications.

While WorkOS initially aimed to continue maintaining Radix, many of the original maintainers have since left to pursue other ventures. This has led to a significant slowdown in contributions to the Radix open-source project, with a concerning number of open issues and pull requests. The original co-creator of Radix, Colem, even stated that Radix is a “liability” and the “last option” he’d consider for a serious project.

A significant example of these maintenance issues is a bug where the Radix library aggressively calls setState internally, leading to "update depth being exceeded" errors, especially in applications with many components. This particular issue was closed without being fixed for a long time and was caused by useEffect hooks lacking dependency arrays, leading to constant re-renders.

The Impact on Shadcn UI Users

Given that Shadcn UI heavily relies on Radix for its component behaviors, the maintenance concerns directly impact Shadcn UI users. Companies like Axiom, which handles massive amounts of data and requires highly performant UIs, have encountered these Radix-related performance issues.

However, Shadcn UI’s unique architecture offers a potential solution. Since Shadcn UI components provide the source code directly to your codebase, users have the flexibility to modify or even replace the underlying Radix implementation if any issues arise.

The Path Forward: Alternatives and Shadcn’s Stance

Despite the concerns, the creator of Shadcn UI acknowledges the situation and offers guidance:

  • Stick with Radix for existing projects: If you’re already using Radix in production, switching component libraries is likely to introduce more bugs and consume valuable resources. Radix is still a mature and battle-tested library, and its code doesn’t simply stop working because maintainers move on.
  • Consider alternatives for new projects: For new projects, options like Radix, React Aria, or Aria Kit are recommended.
  • Keep an eye on Base UI: Base UI, built by the same team that created Radix, is emerging as a promising alternative with a similar API, making migration from Radix relatively easy. While currently in beta, it’s actively maintained.
  • Leverage Shadcn UI’s modularity: Shadcn UI’s design allows users to own and modify the code. If performance issues arise with Radix, parts of Shadcn UI usage can be moved to use Base UI instead.

Ultimately, the goal is to use a stable and understandable component library that works for your needs. While Radix’s maintenance has been a concern, WorkOS is now investing in its maintenance, with skilled developers like Chance stepping in to address existing issues. The modular nature of Shadcn UI also provides a strong safety net, allowing for flexibility and adaptation as the UI landscape evolves.

Top comments (0)