radix-ui
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "radix-ui" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-98be8ec99e044c68f1cabf7c6a91f3688fe33b330a11f14bb68cae1f5d501bdc. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Build accessible foundational UI components with Radix UI. Suitable for creating accessible dropdowns, dialogs, popovers, tabs, and tooltips, or for building a design system based on unstyled, composable components.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: radix-ui
description: >-
Build accessible UI primitives with Radix UI. Use when creating accessible
dropdowns, dialogs, popovers, tabs, tooltips, or building a design system
with unstyled, composable components.
license: Apache-2.0
compatibility: 'React 18+'
metadata:
author: terminal-skills
version: 1.0.0
category: development
tags: [radix-ui, accessibility, components, react, primitives]Radix UI
Overview
Radix UI provides unstyled, accessible React primitives — dropdowns, dialogs, popovers, tabs, accordions, and more. Each component handles keyboard navigation, focus management, screen reader support, and ARIA attributes. You add your own styling. Foundation of shadcn/ui.
Instructions
Step 1: Dialog
import * as Dialog from '@radix-ui/react-dialog'
function ConfirmDialog({ trigger, title, description, onConfirm }) {
return (
<Dialog.Root>
<Dialog.Trigger asChild>{trigger}</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Overlay className="fixed inset-0 bg-black/50 animate-in fade-in" />
<Dialog.Content className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg p-6 w-[90vw] max-w-md shadow-xl animate-in fade-in zoom-in-95">
<Dialog.Title className="text-lg font-semibold">{title}</Dialog.Title>
<Dialog.Description className="text-sm text-gray-500 mt-2">
{description}
</Dialog.Description>
<div className="flex justify-end gap-2 mt-6">
<Dialog.Close asChild>
<button className="px-4 py-2 rounded border">Cancel</button>
</Dialog.Close>
<button onClick={onConfirm} className="px-4 py-2 rounded bg-red-500 text-white">
Confirm
</button>
</div>
<Dialog.Close asChild>
<button className="absolute top-4 right-4" aria-label="Close">✕</button>
</Dialog.Close>
</Dialog.Content>
</Dialog.Portal>
</Dialog.Root>
)
}
Step 2: Dropdown Menu
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'
function UserMenu({ user }) {
return (
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<button className="flex items-center gap-2">
<img src={user.avatar} className="w-8 h-8 rounded-full" alt="" />
{user.name}
</button>
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content className="bg-white rounded-lg shadow-lg p-1 min-w-[180px]" sideOffset={5}>
<DropdownMenu.Item className="px-3 py-2 rounded cursor-pointer hover:bg-gray-100">
Profile
</DropdownMenu.Item>
<DropdownMenu.Item className="px-3 py-2 rounded cursor-pointer hover:bg-gray-100">
Settings
</DropdownMenu.Item>
<DropdownMenu.Separator className="h-px bg-gray-200 my-1" />
<DropdownMenu.Item className="px-3 py-2 rounded cursor-pointer hover:bg-red-50 text-red-600">
Sign out
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
)
}
Step 3: Tabs
import * as Tabs from '@radix-ui/react-tabs'
<Tabs.Root defaultValue="overview">
<Tabs.List className="flex border-b">
<Tabs.Trigger value="overview" className="px-4 py-2 data-[state=active]:border-b-2 data-[state=active]:border-blue-500">
Overview
</Tabs.Trigger>
<Tabs.Trigger value="analytics" className="px-4 py-2 data-[state=active]:border-b-2 data-[state=active]:border-blue-500">
Analytics
</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="overview"><OverviewPanel /></Tabs.Content>
<Tabs.Content value="analytics"><AnalyticsPanel /></Tabs.Content>
</Tabs.Root>
Guidelines
- Radix is unstyled — bring your own CSS/Tailwind. For pre-styled, use shadcn/ui.
asChildmerges Radix behavior onto your custom elements (no extra DOM wrappers).data-[state=active]anddata-[state=open]for styling based on component state.- Install individual packages:
@radix-ui/react-dialog,@radix-ui/react-dropdown-menu. - All components handle keyboard (Escape, Arrow keys, Enter) and screen readers automatically.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 适用于前端开发者在React项目中构建无障碍UI组件
- 具有广泛受众的实用价值
Highlights
- 触发词精准完整,覆盖多种变体
- 边界清晰
Areas to improve
-
缺少明确的When to Use章节 Reported severity: Minor
文档中缺少明确的When to Use章节,用户可能不清楚何时使用该Skill
Recommendation: 建议添加When to Use章节,明确说明适用场景和使用时机
-
缺少端到端示例 Reported severity: Minor
文档中缺少完整的端到端示例,用户可能难以理解如何集成和使用
Recommendation: 建议添加一个完整的端到端示例,展示如何集成和使用Radix UI组件
Highlights
- Phase/步骤清晰,有出口条件
- frontmatter完整
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常,不可逆操作有确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.