radix-ui-design-system – skill Thiết kế & UI cho agent AI
Xây dựng design system dễ tiếp cận với primitive của Radix UI. Tùy biến component headless, chiến lược theming và mẫu compound component cho thư viện UI cấp production.
Cài skill radix-ui-design-system bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/radix-ui-design-system-56d1a.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /radix-ui-design-system – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/radix-ui-design-system-56d1a.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $radix-ui-design-system – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/radix-ui-design-system-56d1a.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /radix-ui-design-system – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/radix-ui-design-system-56d1a.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /radix-ui-design-system – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Radix UI Design System
Build production-ready, accessible design systems using Radix UI primitives with full customization control and zero style opinions.
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use This Skill
- Creating a custom design system from scratch
- Building accessible UI component libraries
- Implementing complex interactive components (Dialog, Dropdown, Tabs, etc.)
- Migrating from styled component libraries to unstyled primitives
- Setting up theming systems with CSS variables or Tailwind
- Need full control over component behavior and styling
- Building applications requiring WCAG 2.1 AA/AAA compliance
Do not use this skill when
- You need pre-styled components out of the box (use shadcn/ui, Mantine, etc.)
- Building simple static pages without interactivity
- The project doesn't use React 16.8+ (Radix requires hooks)
- You need components for frameworks other than React
---
Real-World Examples
Example 1: Command Palette (Combo Dialog)
import { useState, useEffect } from 'react';
import * as Dialog from '@radix-ui/react-dialog';
import { Command } from 'cmdk';
export function CommandPalette() {
const [open, setOpen] = useState(false);
useEffect(() => {
const down = (e: KeyboardEvent) => {
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
e.preventDefault();
setOpen((open) => !open);
}
};
document.addEventListener('keydown', down);
return () => document.removeEventListener('keydown', down);
}, []);
return (
<Dialog.Root open={open} onOpenChange={setOpen}>
<Dialog.Portal>
<Dialog.Overlay className="fixed inset-0 bg-black/50" />
<Dialog.Content className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">
<Dialog.Title>Commands</Dialog.Title>
<Dialog.Description>Search available actions.</Dialog.Description>
<Command>
<Command.Input placeholder="Type a command..." />
<Command.List>
<Command.Empty>No results found.</Command.Empty>
<Command.Group heading="Suggestions">
<Command.Item>Calendar</Command.Item>
<Command.Item>Search Emoji</Command.Item>
</Command.Group>
</Command.List>
</Command>
</Dialog.Content>
</Dialog.Portal>
</Dialog.Root>
);
}Example 2: Dropdown Menu with Icons
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
import { DotsHorizontalIcon } from '@radix-ui/react-icons';
export function ActionsMenu() {
return (
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<button className="icon-button" aria-label="Actions">
<DotsHorizontalIcon />
</button>
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content className="dropdown-content" align="end">
<DropdownMenu.Item className="dropdown-item">
Edit
</DropdownMenu.Item>
<DropdownMenu.Item className="dropdown-item">
Duplicate
</DropdownMenu.Item>
<DropdownMenu.Separator className="dropdown-separator" />
<DropdownMenu.Item className="dropdown-item text-red-500">
Delete
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
);
}Example 3: Form with Radix Select + React Hook Form
import * as Select from '@radix-ui/react-select';
import { useForm, Controller } from 'react-hook-form';
interface FormData {
country: string;
}
export function CountryForm() {
const { control, handleSubmit } = useForm<FormData>();
return (
<form onSubmit={handleSubmit((data) => console.log(data))}>
<Controller
name="country"
control={control}
render={({ field }) => (
<Select.Root onValueChange={field.onChange} value={field.value}>
<Select.Trigger ref={field.ref} onBlur={field.onBlur} aria-label="Country" className="select-trigger">
<Select.Value placeholder="Select a country" />
<Select.Icon />
</Select.Trigger>
<Select.Portal>
<Select.Content className="select-content">
<Select.Viewport>
<Select.Item value="us"><Select.ItemText>United States</Select.ItemText></Select.Item>
<Select.Item value="ca"><Select.ItemText>Canada</Select.ItemText></Select.Item>
<Select.Item value="uk"><Select.ItemText>United Kingdom</Select.ItemText></Select.Item>
</Select.Viewport>
</Select.Content>
</Select.Portal>
</Select.Root>
)}
/>
<button type="submit">Submit</button>
</form>
);
}---
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- rayden-use – Xây dựng và duy trì các component và màn hình Rayden UI trong Figma qua Figma MCP, với…
- react-ui-patterns – Các mẫu UI React hiện đại cho trạng thái loading, xử lý lỗi và lấy dữ liệu. Dùng khi xây…
- redesign-existing-projects – Dùng khi nâng cấp website hoặc ứng dụng hiện có bằng cách kiểm tra các mẫu UI chung…
- retro-design – Hướng dẫn triển khai Web và App cho Retro Design (thập niên 60-80). Kích hoạt khi người…
- retro-futurism – Hướng dẫn triển khai Web và App cho Retro Futurism. Kích hoạt khi người dùng muốn ý…
- reverse-image-search – Tìm kiếm ngược hình ảnh. Dùng khi làm việc với hình ảnh hoặc URL hình ảnh công khai.
- robius-state-management – CRITICAL: Dùng cho các mẫu quản lý trạng thái của Robius. Kích hoạt khi có: AppState…
- robius-widget-patterns – CRITICAL: Dùng cho các mẫu widget của Robius. Kích hoạt khi có: apply_over, TextOrImage…