mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-03 03:18:52 +00:00
A version written into a manifest is written into every manifest that wants it, which is how eslint came to exist in a hundred and four forms across this estate and how a package came to resolve twice at run time. The catalog moves the number out of the manifest: a manifest names the package, the workspace names the version. Four are held below their latest because the newer release cannot be used, and the reason is recorded rather than the version alone: @noble/hashes 2 renamed every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels 3 points its types condition at the bundle.
Astro + React + TypeScript + shadcn/ui (Monorepo)
This is a monorepo template for Astro with React, TypeScript, and shadcn/ui.
Structure
apps/web- Astro applicationpackages/ui- Shared UI components (shadcn/ui)
Adding components
To add components, run the following command from the root:
npx shadcn@latest add button -c apps/web
Using components
To use the components in your app, import them in an .astro file:
---
import { Button } from "@workspace/ui/components/button"
---
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Astro App</title>
</head>
<body>
<div class="grid h-screen place-items-center content-center">
<Button>Button</Button>
</div>
</body>
</html>