Decision 0006
Shared UI package with shadcn-svelte
accepted · 2026-11-07
Context
The dashboard and the website should look like one product. shadcn-svelte copies component source into a project rather than installing a library, so two apps would otherwise hold two copies of every component and the theme.
Decision
- One workspace package,
packages/ui(@spotcraft/ui), holds the shadcn-sveltecomponents.json, the components,cn, and the theme instyles.css. - The theme is the shadcn-svelte preset
b6RdvRWulu(vegastyle, neutral, square corners, Space Grotesk, lucide icons). - Both apps use Tailwind v4 and import
@spotcraft/ui/styles.css; that file declares an@sourcefor the package's components so each app's Tailwind generates their classes. - The package is source-only; the apps compile it. Inside it, files import each other through
#ui/*package imports.
Consequences
- Components are added once, with the CLI run in
packages/ui. - The CLI lists component dependencies as dev dependencies; they have to be moved to
dependenciesso the apps get them.