Radix UI Primitives
UI library · Free
Unstyled React primitives with focus, keyboard, and ARIA management for your own design system.
Also known as: radix-ui/primitives

What you can use for free
Radix UI Primitives code is available free of charge for local and commercial projects, subject to its license.
Paid features and costs
This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
Access and limitations
Radix UI Primitives code is available free of charge for local and commercial projects, subject to its license. This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
Use cases
- Accessible dialogs and dropdown menus
- Custom visual component systems
Example workflow
A possible workflow; this is not a report of hands-on testing.
Accessible dialogs and dropdown menus with Radix UI Primitives.
Before you start
- A working React; TypeScript project and a specific use case: an accessible dialog and dropdown menu.
- A design, interface states, or dataset; target screens and accessibility requirements.
Steps
- Check the project's stack and version against the current Radix UI Primitives documentation; add the package or the required source component.
- Implement the selected workflow with the supplied data, adapting styles and states to the project.
- Check the result in the target environment, remove sample data, and retain the notices required by the license.
Check your result
- The example works in the chosen tech stack, including target dimensions and input errors.
- Dependency size, keyboard behavior, and reduced motion suit the task; license terms are met.
Choosing Radix UI Primitives
Accessible dialogs and dropdown menus
Choose this when
- Accessible dialogs and dropdown menus
- Custom visual component systems
Consider alternatives when
- When choosing for this topic, compare Radix UI Primitives with Ark UI. A candidate to compare under the topic: UI components. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- When choosing for this topic, compare Radix UI Primitives with Headless UI. A candidate to compare under the topic: UI components. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
Requirements
- For a custom component under asChild, pass received props to the DOM element and support ref.
Things to consider
- Costs and limits of free use: This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
- Terms of use: MIT: permits commercial use, modification, and distribution of the code at no charge, provided the license text and copyright notice are retained.
- Replacing a button with a non-focusable div can remove keyboard access to the trigger; accessibility of your custom element remains your responsibility.
Frequently asked questions
What can you use for free in Radix UI Primitives?
Radix UI Primitives code is available free of charge for local and commercial projects, subject to its license.
What additional costs might arise with Radix UI Primitives?
This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
What terms of use matter for Radix UI Primitives?
MIT: permits commercial use, modification, and distribution of the code at no charge, provided the license text and copyright notice are retained.
How do you get started with Radix UI Primitives?
Check the project's stack and version against the current Radix UI Primitives documentation; add the package or the required source component. Implement the selected workflow with the supplied data, adapting styles and states to the project. Check the result in the target environment, remove sample data, and retain the notices required by the license.
Why does my custom button not work as a Radix trigger with asChild?
Radix clones the child element and adds props and handlers. The documentation requires the leaf component to spread props onto the DOM node and forward ref. If the component consumes this data or changes the element's semantics, behavior and accessibility can break.
Related tasks and approaches
- Ark UI
A candidate to compare under the topic: UI components. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- Headless UI
A candidate to compare under the topic: UI components. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- React Aria
A candidate to compare under the topic: UI components. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
License
MIT: permits commercial use, modification, and distribution of the code at no charge, provided the license text and copyright notice are retained.
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- React
- TypeScript
- components