--- name: "radix-ui-design-system" description: "Radix UI Design System workflow skill. Use this skill when the user needs Build accessible design systems with Radix UI primitives. Headless component customization, theming strategies, and compound component patterns for production-grade UI libraries and the operator should preserve semantics, verify interactive behavior in a real browser, and keep provenance clear before merging or handing off." version: "0.0.1" category: "frontend" tags: - "radix-ui-design-system" - "build" - "accessible" - "design" - "systems" - "radix" - "primitives" - "headless" - "omni-enhanced" complexity: "advanced" risk: "caution" tools: - "codex-cli" - "claude-code" - "cursor" - "gemini-cli" - "opencode" source: "omni-team" author: "Omni Skills Team" date_added: "2026-04-15" date_updated: "2026-04-19" source_type: "omni-curated" maintainer: "Omni Skills Team" family_id: "radix-ui-design-system" family_name: "Radix UI Design System" variant_id: "omni" variant_label: "Omni Curated" is_default_variant: true derived_from: "skills/radix-ui-design-system" upstream_skill: "skills/radix-ui-design-system" upstream_author: "sickn33" upstream_source: "community" upstream_pr: "79" upstream_head_repo: "diegosouzapw/awesome-omni-skills" upstream_head_sha: "6bf093920a93e68fa8263cf6ee767d7407989d56" curation_surface: "skills_omni" enhanced_origin: "omni-skills-private" source_repo: "diegosouzapw/awesome-omni-skills" replaces: - "radix-ui-design-system" --- # Radix UI Design System ## Overview Use this skill when the task is to build, harden, or review an accessible design system built on Radix UI Primitives. The core operating model is: 1. start from the primitive contract, not a visual mock alone 2. preserve semantics and interaction behavior while customizing appearance 3. treat `asChild`, prop spreading, and ref forwarding as high-risk composition points 4. validate the result in a real browser before calling the component production-ready Radix helps with accessibility and composability, but it does not make heavy customization automatically safe. If a team replaces semantic elements, suppresses focus styles, breaks ref forwarding, or tests only with brittle selectors, the result can still regress. This skill keeps the design-system focus of the upstream material while adding a browser-verification layer for the failures that usually appear only during real interaction: keyboard navigation, focus movement, dismissable layers, portals, collision handling, and SSR hydration behavior. ## When to Use This Skill Use this skill when the user needs to: - build a reusable component library on top of Radix Primitives - wrap Radix primitives in a stable internal design-system API - customize headless components without losing keyboard or screen-reader behavior - design theming and variant strategies around Radix state attributes and tokens - debug broken overlays, focus traps, custom triggers, or portal layering - review whether a Radix-based component is safe for production use - verify interactive behavior in a browser with role/name-based assertions Do **not** use this skill as the main router when the task is primarily: - static presentational styling with no interactive primitive behavior - a non-Radix widget implementation from first principles - broad visual branding work with no component API or accessibility scope - a generic frontend test setup unrelated to Radix interaction patterns ## Operating Table | Situation | Start here | Why it matters | | --- | --- | --- | | Choosing a primitive or wrapper API | `## Workflow` | Prevents starting from visual styling before the primitive anatomy and interaction contract are clear | | Custom trigger or wrapper uses `asChild` | `## Composition Rules` | Missing prop spread or ref forwarding is a common cause of silent Radix breakage | | Need a real interaction check | `examples/browser-flow-example.md` | Gives a concrete browser flow for keyboard, focus, dismissal, and portal validation | | Need quick browser-verification guidance by primitive family | `references/browser-automation-notes.md` | Lists Radix-specific checks, common state attributes, and reliable locator patterns | | Unsure whether browser validation is runnable in the current workspace | `scripts/validate-playwright-env.py` | Reports whether Playwright and at least one actionable target are available without changing the environment | | SSR or hydration-sensitive app | `## SSR and Hydration` | Radix overlays, labels, ids, and portal timing should be checked against built output, not only dev mode | | Review before merge | `## Accessibility Verification` and `## Troubleshooting` | Ensures the component is validated by behavior, not only by code inspection | ## Workflow 1. **Clarify the component boundary** - Identify the primitive family involved: dialog, dropdown menu, popover, tabs, tooltip, select, checkbox, etc. - Define whether the deliverable is: - a thin wrapper around primitives - a higher-level design-system component with opinionated API - a migration from an existing styled component library - Decide early whether the component will support controlled, uncontrolled, or both state models. 2. **Map product requirements to Radix anatomy** - Identify the required parts such as trigger, content, overlay, item, title, description, close action, or portal. - Verify that the intended UX matches the primitive's interaction model instead of forcing a different widget into the wrong primitive. - Keep public API decisions stable even if internal styling or tokens may evolve later. 3. **Choose a styling and theming strategy** - Prefer styling through documented Radix state attributes such as `data-state`, `data-side`, `data-disabled`, and similar primitive-specific attributes. - Use design tokens or CSS variables for colors, spacing, radius, motion, and focus treatment. - Treat Radix Themes as optional. Use it only when the project intentionally wants that dependency; do not assume it is required to use Primitives well. 4. **Implement composition safely** - If using `asChild`, make sure the child component spreads incoming props to the underlying DOM element. - Forward refs anywhere Radix needs measurement, focus management, or trigger/content coordination. - Preserve native semantics where possible. If a trigger behaves like a button, prefer an actual `