| name | mft-add-shadcn |
| description | Add a shadcn/ui primitive correctly into the frontend. |
Use when the user asks to add a shadcn primitive.
cd frontend && npx shadcn@latest add <component> (e.g. dialog,
dropdown-menu, input, select).
- The command writes to
src/components/ui/. Don't hand-edit those files;
they are regenerated when shadcn ships updates.
- Import via
@/components/ui/<component> and use the cn() helper from
@/lib/utils for any conditional class names.
- If the primitive needs a new Radix peer, the shadcn CLI adds it to
package.json automatically; commit package.json and yarn.lock
together.
- Re-run
yarn lint && yarn typecheck to make sure the addition didn't
break anything.