What problem does it solve?
Teams building UI libraries in @dxos/react-ui need consistent conventions for creating namespaced composite components like Dialog.Root and Dialog.Trigger, and this Skill codifies the exact patterns, naming rules, and theme integration so every composite follows the same structure.
Core Features & Use Cases
- Two construction styles: Choose between slottable()/composable() for pure DXOS parts and forwardRef wrapping for Radix primitive parts, with clear rules on when each applies.
- Naming and structure rules: Enforces prefixed internal names, dotted displayName values, object-literal namespace assembly, and exported Props types for every part.
- Theme integration: Routes classNames through the tx() theme function with composableProps reconciliation and sibling Foo.theme.ts token files.
- Use Case: When adding a new Popover composite to react-ui, follow the exemplar files Panel.tsx and Dialog.tsx, apply the ten rules, and avoid the documented counter-examples like FunctionComponent annotations that strip ref support.
Quick Start
Ask the AI to scaffold a new composite component named Menu with Root, Trigger, and Content parts following the composite-components conventions in @dxos/react-ui.