Skip to content

Pattern: adopt shadcn/ui for interactive primitives (not just init) #8

Description

@denkasyanov

Observation from a downstream project (reference links kept internal): shadcn was initialized in the template but nothing ever used it, so interactive primitives got hand-rolled and diverged (two copies of the same popover, no arrow-key nav / positioning).

The pattern:

  • Interactive primitives (menus, switches, dialogs, popovers) come from bunx shadcn@latest add <component> into src/components/ui/ — committed vendor-style code, restyled at call sites.
  • App components compose these; never hand-roll popover/focus/a11y behavior a Radix primitive provides.
  • Gotcha to fix in the template: components.json aliases must match the app's real tsconfig alias (a stale alias breaks the CLI with "Could not resolve the following aliases").

Scope if accepted: fix template components.json aliases, ship one real shadcn component as the seed/example, add an ADR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions