Molecular Assembler
When to use this skill
- •Use when combining atoms into reusable UI patterns that encapsulate small behavior and layout.
- •Triggered by requests to create a composite component that uses two or more atoms.
Instructions
- •
First Step: Identify the atoms to compose and define a minimal props surface for the molecule (avoid exposing internal atom implementation details).
- •
Second Step: Implement the molecule in
src/components/molecules/with clear prop destructuring and forwarding of refs where appropriate. - •
Third Step: Add unit tests to verify rendering and interactions and an example usage in a page or story.
Examples
- •SearchField: uses
InputandIconButton, exposesvalue,onChange, andonSearchprops.
Notes
- •Molecules should be easy to reuse in multiple organisms; prefer composition over conditional internals.