Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion apps/web/content/docs/api/shadcn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ Pre-built [shadcn/ui](https://ui.shadcn.com/) components for json-render. 36 com
npm install @json-render/shadcn @json-render/core @json-render/react zod
```

Your app must have Tailwind CSS configured.
The package includes `radix-ui` as a dependency.

In your Tailwind CSS v4 stylesheet, add an `@source` directive so Tailwind generates styles for the installed components. This example assumes your stylesheet is at `src/index.css`.

```css
@import "tailwindcss";
@source "../node_modules/@json-render/shadcn/dist";
```

The `@source` path is relative to the stylesheet. If your app doesn't already have a shadcn/ui theme, follow the [shadcn/ui theming guide](https://ui.shadcn.com/docs/theming) to define CSS variables such as `--primary` and `--border` and map them to Tailwind utilities.

## Entry Points

Expand Down
6 changes: 3 additions & 3 deletions apps/web/tests/fixtures/docs-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1619,9 +1619,9 @@
"title": "@json-render/shadcn",
"metadataTitle": "@json-render/shadcn API | json-render",
"prefix": "import { pageMetadata } from \"@/lib/page-metadata\"\nexport const metadata = pageMetadata(\"docs/api/shadcn\")\n\n# @json-render/shadcn\n",
"sourceSha256": "1d49bfa1175e72c857b977e19d27edfa2a72f35116bafd2c8da624771a37a25f",
"bodySha256": "fe6b3f334b0971fef057ff58a201e7c1619a8b2d78d79adba8279c2554a3ce60",
"markdownSha256": "643b1629f02d63106f681051ff603760a307b2e11470a6308224750aacd9b591",
"sourceSha256": "5bafa679864081dbae86ba01b9a6142444291cad9eb5e342e60307e36746c12d",
"bodySha256": "1ae0eb62f88de65e548940d86012adcc1070a4fb2385cab10cfa3aeaa8156457",
"markdownSha256": "8aeea18f4d005579ae8e9fa4d50de4ea3ad3bae64c7b896cd7b42f503c3de139",
"headings": [
{
"title": "Installation",
Expand Down
11 changes: 11 additions & 0 deletions packages/shadcn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Pre-built [shadcn/ui](https://ui.shadcn.com/) components for json-render. Drop-i
npm install @json-render/shadcn @json-render/core @json-render/react zod
```

The package includes `radix-ui` as a dependency.

In your Tailwind CSS v4 stylesheet, add an `@source` directive so Tailwind generates styles for the installed components. This example assumes your stylesheet is at `src/index.css`.

```css
@import "tailwindcss";
@source "../node_modules/@json-render/shadcn/dist";
```

The `@source` path is relative to the stylesheet. If your app doesn't already have a shadcn/ui theme, follow the [shadcn/ui theming guide](https://ui.shadcn.com/docs/theming) to define CSS variables such as `--primary` and `--border` and map them to Tailwind utilities.

## Quick Start

### 1. Create a Catalog
Expand Down