Find duplicate components
Finds local copies of design-system components and swaps them back.
---
name: component-adoption
description: Use when a codebase may contain local copies of design-system components such as its own Button or Modal.
---
Find duplicate components
Find places where the code uses its own Button, Modal, or Input instead of the design system's.
Steps
- Measure usage:
npx @andrewaitken/ds-coverage src/ --ds @acme/ui
Replace @acme/ui with the package name of your design system.
- List local components that share a name with a system export.
- For each one, compare props. If the system component covers it, replace it.
- If it does not, report the missing prop. Do not patch the system component.
- Run the scan again and compare the numbers.
Done when
- Coverage went up, or each remaining duplicate has a reason
- No behavior changed on the touched screens