Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)48k · #5563

radix-ui-design-system

Skill này làm gì

Công cụ này giúp xây dựng hệ thống thiết kế cho website và ứng dụng. Nó cho phép bạn tạo các thành phần giao diện (như nút và menu) dễ tiếp cận và tùy chỉnh hoàn toàn, mà không áp đặt một phong cách hình ảnh có sẵn.

Khi nào nên dùng

  • ✓Khi tạo hệ thống thiết kế từ đầu.
  • ✓Khi xây dựng thư viện thành phần giao diện dễ tiếp cận.
  • ✓Khi triển khai các thành phần tương tác phức tạp.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/radix-ui-design-system/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/radix-ui-design-system/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một hệ thống thiết kế dễ tiếp cận cho ứng dụng danh sách việc cần làm bằng Radix UI.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng các khối xây dựng của Radix UI để tạo thành phần. Bạn có thể định nghĩa cách mỗi thành phần trông và hoạt động, đảm bảo mọi người đều dễ dùng và tương thích tốt với các công cụ phát triển khác.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết 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 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 * 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">
          <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 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">United States</Select.Item>

…
Câu hỏi thường gặp

“Headless primitives” là gì?

Đó là các khối cơ bản cho thành phần giao diện không có sẵn kiểu dáng hình ảnh. Nhờ vậy, bạn hoàn toàn tự do tạo kiểu theo ý muốn.

“Accessible” nghĩa là gì?

Nghĩa là các thành phần được thiết kế để mọi người đều dùng được, kể cả người khiếm thị, khiếm vận động hoặc khuyết tật khác. Chúng tuân theo các hướng dẫn như WCAG.

Tôi có cần biết React để dùng công cụ này không?

Có, công cụ này dành cho dự án dùng React, vì Radix UI là thư viện cho React.

Chi tiết

Mô tả gốc của tác giả

Build accessible design systems with Radix UI primitives. Headless component customization, theming strategies, and compound component patterns for production-grade UI libraries.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5563
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự