create-component
Installation
SKILL.md
Create Component
Workflow
- Read the applicable
AGENTS.md, package exports, and nearby components before choosing an API. - Use a simple component by default. Use a compound API only when related children need shared state, coordinated behavior, or a clearer semantic tree. Read references/compound-components.md first.
- Create the component under its category and separate the root, reusable child renderers, JSX, styles, public types, state hooks, and pure utilities by responsibility. Read references/architecture.md.
- Put Tailwind classes in
styles.ts. Declare every supported visual style as an invariant class or a typed semantic variant; do not exposeclassNameas a styling escape hatch. Addcursor-pointerto every clickable control. Fortailwind-variants, use thetailwind-variants-best-practiceskill and read references/styling.md. - Keep the public API typed, semantic, and accessible. Forward native element props deliberately; supply accessible labels for icon-only controls.
- Export the public component from its category and package barrels, then run the narrowest type and lint checks.