The Working Approach
Building Components is a guide to the engineering decisions behind a reusable UI library. It routes an agent to focused references for composition, keyboard behavior, state management, TypeScript interfaces and styling. The entry point covers primitives, components, blocks and templates, so the level of abstraction can match the actual deliverable.
This skill is useful when a component must serve several consumers rather than one isolated screen. It brings API shape, accessibility and distribution into the same discussion. The source is primarily a reference index: the linked files are part of the working skill and should accompany the entry file.
Expected Deliverables
- For an implementation request, a component with an explicit composition and state model.
- For a documentation request, usage guidance covering the component API and relevant behavior.
- An appropriate packaging or registry plan when distribution is part of the request.
From Brief to Review
- 01Identify the component contract
Decide whether the task concerns a primitive, component, block or template. Establish its public interface and the contexts in which callers will compose it.
- 02Read the relevant engineering guidance
Read state.mdx for controlled versus uncontrolled behavior, composition.mdx for the public composition model, and accessibility.mdx for keyboard and focus requirements. Consult types.mdx and styling.mdx for the implementation. Add the polymorphism or as-child references only when callers need those API patterns.
- 03Implement and document the surface
Connect state and presentation through the chosen API. Explain intended usage and choose npm, a registry or another documented distribution route only when needed.