---
name: radix-ui
description: Build accessible, unstyled React UI components with Radix Primitives
when_to_use: When you need accessible, composable UI components that give you full control over styling while ensuring WCAG compliance
---
# Radix UI Primitives Skill
Radix UI Primitives provides low-level, unstyled React components with built-in accessibility, keyboard navigation, and focus management. Perfect for building design systems and custom UI components.
## Quick Start
### Basic Dialog Example
```jsx
import * as Dialog from "@radix-ui/react-dialog";
import { Cross2Icon } from "@radix-ui/react-icons";
function BasicDialog() {
return (
Edit profile
Make changes to your profile here.
);
}
```
### Dropdown Menu Example
```jsx
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import { HamburgerMenuIcon, CheckIcon } from "@radix-ui/react-icons";
function UserMenu() {
const [showBookmarks, setShowBookmarks] = React.useState(true);
return (
New Tab
⌘+T
New Window
⌘+N
Show Bookmarks
);
}
```
## Common Patterns
### Primitive Components
Radix provides 30+ primitive components for common UI patterns:
```jsx
// Accordion with animation
import * as Accordion from "@radix-ui/react-accordion";
function FAQAccordion() {
return (
Is it accessible?
Yes. It adheres to WAI-ARIA design patterns.
);
}
// Tooltip with delay
import * as Tooltip from "@radix-ui/react-tooltip";
function TooltipExample() {
return (
Additional information
);
}
```
### Accessibility Features
Radix automatically handles accessibility:
```jsx
// All components include proper ARIA attributes
// Focus management is handled automatically
// Keyboard navigation works out of the box
// Screen reader support is built-in
// Example: Select with proper labeling
import * as Select from "@radix-ui/react-select";
function AccessibleSelect() {
return (
FruitsApple
);
}
```
### Composition with asChild
Compose Radix primitives with your own components:
```jsx
// Use your existing button styles
import { Dialog, Tooltip } from "@radix-ui/react-dialog";
import { Button } from "./your-design-system";
function ComposedDialog() {
return (
Dialog Title
);
}
// Multiple primitives on one element
function TooltipDialogButton() {
return (
Opens a modal dialog
{/* Dialog content */}
);
}
```
### Custom Component Abstractions
Create your own simplified APIs:
```jsx
// Custom Dialog wrapper
import * as DialogPrimitive from "@radix-ui/react-dialog";
export const CustomDialog = ({ children, trigger, title }) => {
return (
{trigger}{title}
{children}
);
};
// Usage
Open Settings}>