mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
* fix(cli): allow esbuild builds in Vite templates * fix(cli): extend pnpm 11 build-script allowlists across app templates - Add packages: [] to single-app pnpm-workspace.yaml so pnpm 9 does not reject the file with "packages field missing or empty". - Add astro-app, react-router-app, start-app, next-app workspace yamls with the build-script allowlist each template needs (esbuild, sharp, unrs-resolver as applicable). - Set msw: false across all app allowlists so the registry component install runs cleanly under pnpm 11 without executing msw's service-worker postinstall. - Add a scaffold test pinning the packages:[] + allowBuilds shape so the parser keeps treating it as single-app. * chore: changeset * fix(templates): allow monorepo pnpm builds * ci(templates): validate app workspace conversion --------- Co-authored-by: shadcn <m@shadcn.com>
shadcn/ui monorepo template
This is a Vite monorepo template with shadcn/ui.
Adding components
To add components to your app, run the following command at the root of your web app:
pnpm dlx shadcn@latest add button -c apps/web
This will place the ui components in the packages/ui/src/components directory.
Using components
To use the components in your app, import them from the ui package.
import { Button } from "@workspace/ui/components/button";