Instruction file imported from La-Fabryck/caddie-frontend-svelte (
.cursor/rules/shadcn-ui-components.mdc). Copyright stays with the author.
shadcn-svelte UI components (src/lib/components/ui)
-
Do not modify files under
src/lib/components/ui/(includingindex.ts, primitives, and styles inside that tree). Treat this directory as generated / upstream shadcn-svelte output. -
If the project needs a new component from the registry (Button variant, Dialog, Select, etc.), do not hand-roll or paste it: ask the maintainer to add it with the shadcn-svelte CLI (e.g.
npx shadcn-svelte@latest add <component>), then use the installed exports from$lib/components/ui. -
Allowed: importing and composing those components elsewhere (e.g. routes, feature components), passing
class, snippets, and props as documented. -
Avoid: editing checkbox/button/input source, changing
cn()defaults in primitives, or rewritingindex.tsbarrel exports unless the user explicitly asks for a one-off exception.