Build a component matching a screenshot you love
When to use: You see a great UI screenshot on Twitter and want to capture its vibe.
Flow
-
Extract DNAUse design-dna. Extract DNA from /screens/inspiration.png. Save as dna.json.✓ Copied→ JSON with tokens + style + effects
-
Generate componentUsing dna.json, generate a React Card component. Match the radii, shadow, gradient parameters.✓ Copied→ TSX with matching aesthetic
-
Compare visuallyRender side-by-side; tweak any drift in shadow strength.✓ Copied→ Visual match within tolerance
Outcome: On-brand component without copying code from the original.
Pitfalls
- DNA misses subtle effects (grain texture) — Pass --high-fidelity for slower but richer extraction