# Radix UI — card for AI agents

Unstyled, accessible component primitives for building design systems.

Category: UI components and icons · npm package `@radix-ui/react-slot` · latest version 1.5.0 (checked 2026-11-01)
Install: `npm install @radix-ui/react-slot`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## Radix UI Slot
- To wrap a slotted element and keep Slot's props and refs merged onto it, use nested `Slottable` items with a render prop. The changelog lists this support in the June 6, 2026 release.
- When debugging an infinite re-render loop under React 19, note that the June 6, 2026 release fixed one caused by Slot creating a new ref callback on every render. Check the installed version.
- To render your own element in place of a part, pass `asChild` and put your element inside, as the site's `StatusTooltip` example does with `<Tooltip.Trigger asChild>`.
- Look up component APIs at radix-ui.com/primitives/docs. The README itself only covers installing pnpm and running `pnpm install`.

## What it is
- `@radix-ui/react-slot` is the Slot package from Radix Primitives. The README describes Primitives as "a low-level UI component library with a focus on accessibility, customization and developer experience." The repository is MIT-licensed, maintained by WorkOS, and was created on 2020-06-19.
- The docs navigation lists Slot under Utilities, with Accessible Icon, Direction Provider, Portal and Visually Hidden. The sources here do not include Slot's own docs page. What they say about Slot comes from the release notes. The June 6, 2026 release added a render prop for nested `Slottable` items. The changelog says this lets a slotted element be wrapped "while still merging Slot props and refs onto it."
- The README says the components can be the base layer of a design system or be adopted incrementally. On the site, the `StatusTooltip` example passes `asChild` to `Tooltip.Trigger` and puts the developer's own `<Text>` element inside it.

## Caveats
- Slot caused a React 19 re-render loop: The June 6, 2026 release notes list a fix for an infinite re-render loop in React 19 "caused by Slot creating a new ref callback on every render."
- A second React 19 loop, component not named: The June 30, 2026 release fixed another infinite re-render loop in React 19, this one "caused by unstable composed ref callback references." The changelog does not say which component was affected.
- `asChild` plus a placeholder logged errors: The June 6, 2026 notes fixed `Select.Value` logging invalid prop errors when it was given both `asChild` and a placeholder.

## Numbers (AgentGid data)
- Gid Score: 85.1 (#41 of all tools, 3 of 230 in its category)
- Used in 814 public projects set up for AI coding agents (13.0%)
- Downloads last week: 241,479,325 (as of 2026-11-24), +30.8% over 4 weeks
- GitHub stars: 19,554 (as of 2026-11-24)
- Last push: 2026-10-14

## Often used with
Tailwind Merge 95.7%, clsx 95.3%, Lucide React 95.0%, Class Variance Authority 93.7%, React 98.9%, Tailwind CSS 97.1%

## Links
- AgentGid page: https://agentgid.com/tools/radix-ui/
- Homepage: https://radix-ui.com/primitives
- Repository: https://github.com/radix-ui/primitives
- Source: https://github.com/radix-ui/primitives#readme
- Source: https://github.com/radix-ui/primitives
- Source: https://www.npmjs.com/package/@radix-ui/react-slot
- Source: https://radix-ui.com/primitives
- Source: https://www.radix-ui.com/primitives/docs/overview/releases


## Radix Primitives: accessible menus, dialogs and tabs for React

Radix Primitives is a free set of building blocks for React apps, such as pop-up dialogs, dropdown menus, tabs, switches and tooltips. They handle keyboard use, focus and screen reader labels for you, but come without any look. You or your AI assistant add the styles, so they fit any design.

### Where to use it
- Pop-up forms and confirmations: An "Edit profile" window opens over the page; focus stays inside it, and Esc or the close button returns people to where they were.
- Action menus on a button: A "More actions" button opens a list such as Export, Duplicate and Delete that also works with arrow keys and typing the first letter.
- Settings split into tabs: A settings page shows Account, Notifications and Billing as tabs that people can also switch with the arrow keys.
- On and off switches with labels: Rows like "Email me about new orders" get a switch that screen readers announce as on or off, tied to its label.
- Hints on icon buttons: A small "?" or icon button shows a short hint on hover or keyboard focus, and Esc hides it.
- The base of your own components: Your team builds its own buttons-and-menus kit on top of Radix and styles it once, or swaps in one piece at a time.

### How to start
- Install the single radix-ui package (pin the version in your project).

```
npm install radix-ui
```

- Import the parts of one primitive and put them together.

```
import { Tabs } from "radix-ui";

export default () => (
	<Tabs.Root>
		<Tabs.List>
			<Tabs.Trigger />
		</Tabs.List>
		<Tabs.Content />
	</Tabs.Root>
);
```

- Style each part with a className and its state with the data-state attribute.

```
.AccordionItem[data-state="open"] {
	border-bottom-width: 2px;
}
```


### License
Free to use in any project, paid or not, under the MIT license. No visible credit is needed; keep the license notice with copies of its files.

### Good to know
- It is made for React apps and needs React and React DOM, version 16.8 or newer.
- You write all the styles, even basic ones. A dialog's dark backdrop does not cover the screen until you style it.
- Labels are still your job. Icon-only buttons need a text label so screen readers can name them.
- If you swap a part for another element, keeping it usable with a keyboard becomes your job.
- It works with server rendering, for example in Next.js.

Checked 2026-11-10 against: https://www.radix-ui.com/primitives/docs/overview/introduction, https://www.radix-ui.com/primitives/docs/overview/getting-started, https://www.radix-ui.com/primitives/docs/overview/accessibility, https://www.radix-ui.com/primitives/docs/overview/releases, https://www.radix-ui.com/primitives/docs/guides/styling, https://www.radix-ui.com/primitives/docs/guides/composition, https://www.radix-ui.com/primitives/docs/guides/server-side-rendering, https://www.radix-ui.com/primitives/docs/components/dialog, https://www.radix-ui.com/primitives/docs/components/dropdown-menu, https://www.radix-ui.com/primitives/docs/components/tabs, https://www.radix-ui.com/primitives/docs/components/switch, https://www.radix-ui.com/primitives/docs/components/tooltip, https://github.com/radix-ui/primitives/blob/main/README.md, https://github.com/radix-ui/primitives/blob/main/LICENSE, https://registry.npmjs.org/radix-ui, https://registry.npmjs.org/radix-ui/1.8.1

### Mistakes to avoid
- Don't: <Tooltip.Root> without a Tooltip.Provider around it → Do: Wrap the app (or the area) in <Tooltip.Provider> once (In our run a Tooltip without the provider threw: `Tooltip` must be used within `TooltipProvider`.)
- Don't: Mixing @radix-ui/react-dialog, @radix-ui/react-popover and others at different versions → Do: Use the single radix-ui package, or update every @radix-ui/react-* package together (Mixed versions duplicate shared parts and grow the bundle.)
- Don't: require("radix-ui") or importing the root in a setup that cannot drop unused code → Do: Import one primitive from its subpath, e.g. import * as Dialog from "radix-ui/dialog" (The root entry loads every primitive; in our run require("radix-ui") failed until all of them were present, while the subpaths loaded only what they need.)
- Don't: Expecting a ready look (backdrop, menu shadow, active tab line) out of the box → Do: Write CSS for each part, using className and [data-state=open|checked|active] (Radix ships no styles at all, including functional ones such as a full-screen overlay.)
- Don't: npm install radix-ui@latest in generated setup steps → Do: Pin the version you tested, e.g. radix-ui@1.8.1, and upgrade on purpose (The getting-started page uses @latest; a pinned version keeps builds repeatable.)

### Questions
- Do I install one package or many? The docs recommend the single radix-ui package. Separate @radix-ui/react-* packages also work; then update them all together.
- How do I style it with Tailwind or plain CSS? Every part takes a className, and parts with state carry data-state, such as data-state="open" or "checked", for your CSS.
- Can I make a link open a tooltip instead of a button? Yes, with the asChild prop Radix passes its behaviour to your own element, which then must stay focusable.
- Is it maintained? Yes. radix-ui 1.8.1 was published on 2026-10-12, and the releases page lists fixes from July 2026.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
