1.1 KiB
1.1 KiB
name, description, license, triggers
| name | description | license | triggers | ||
|---|---|---|---|---|---|
| molecular-assembler | Composes Atoms into Molecules (e.g., SearchField = Input + IconButton) and minimizes prop-drilling by exposing concise props. | MIT |
|
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.