compound-components

Design accessible UI primitives with ARIA roles and keyboard navigation.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/ChoreShore/Version1 --skill compound-components-choreshore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compound-components
Source: https://github.com/ChoreShore/Version1/tree/main/.windsurf/skills/compound-components
Command: npx skills add https://github.com/ChoreShore/Version1 --skill compound-components-choreshore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compound components provide a robust pattern for building accessible, flexible UI primitives that manage complex interactions (such as dialogs, selects, and tabs) while keeping behavior decoupled from presentational styling.

Core Features & Use Cases

  • Accessible composition with proper ARIA roles, keyboard navigation, and focus management.
  • Pattern-based primitives (Root, Trigger, Content, Item, etc.) that enable scalable component libraries or design systems.
  • Use cases include building a reusable UI toolkit, a component library, or custom interactive widgets with predictable state and extension points.

Quick Start

Create a React compound component set by wiring Root, Trigger, and Content to produce accessible, keyboard-navigable UI primitives.

Frequently Asked Questions about compound-components

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build accessible React UI primitives with proper ARIA roles and keyboard navigation?

Build accessible React UI primitives using the compound component pattern to enforce proper ARIA roles, keyboard navigation, and focus management. This approach decouples complex behavior from presentational styling for robust interactions.

What is the compound component pattern for React and when should I use it?

The compound component pattern is an architecture using Root, Trigger, and Content components to manage complex interactions like dialogs and selects. Use it when building scalable component libraries or design systems requiring predictable state and extension points.

How do I implement focus management and ARIA compliance for a React Select or Dialog?

Implement focus management and ARIA compliance by wiring Root, Trigger, and Content components together using the compound component pattern. This architecture natively handles focus trapping and ARIA attributes across common interactive widgets like Dialog and Select.

Can I use headless UI patterns to build a custom React design system without locking in styling?

Yes, you can use headless UI compound patterns to build a custom React design system. This approach provides behavior, ARIA roles, and keyboard navigation while keeping presentational styling completely decoupled and flexible for your toolkit.

What's the best way to structure a React component library for scalable Tabs, Accordion, and Menu widgets?

Structure your React component library using pattern-based primitives like Root, Trigger, Content, and Item. This compound architecture ensures scalable, accessible composition for common widgets like Tabs, Accordion, and Menu with robust keyboard interactions.