shadcn: undocumented setup steps (radix-ui aggregate, Tailwind @source, CSS vars) and silent prop rejection
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 73/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, react, tailwindcss, typescript, vite
- Domain
- developer-experience, documentation, tooling
Research direction
Start with packages/shadcn/README.md and compare its installation and styling guidance with the setup steps described in the issue. Check the package dependency declarations and the component prop examples mentioned in the report. Done means the README explains the transitive dependencies, Tailwind 4 source scanning, and required CSS variables; the suggested validation behavior is an additional, less-scoped idea.
Written by the indexing model from the issue text.
Description
Summary
Getting @json-render/shadcn rendering from a clean project took several undocumented steps. Each failure is silent — the build succeeds, but the page is blank or unstyled. Sharing them in case the docs should cover them.
Verified on @json-render/shadcn 0.21.3 with Vite 8 + Tailwind 4 + React 19.
1. The package needs the radix-ui aggregate, not @radix-ui/react-*
The packages/shadcn/src/ui/*.tsx files import from the aggregate package:
import { Tabs as TabsPrimitive } from "radix-ui";
All 20 UI files use radix-ui rather than scoped @radix-ui/react-* packages. If you install the scoped packages instead, the production build still succeeds and the page renders blank. In my Node SSR test the failure surfaced as:
Dynamic require of "react" is not supported
at node_modules/react-remove-scroll/dist/es5/Combination.js
at node_modules/@radix-ui/react-dialog/dist/index.mjs
at node_modules/@json-render/shadcn/dist/index.mjs
package.json does list radix-ui as a dependency, so this resolves itself under a normal npm/pnpm install — but the README installation section only lists four packages:
npm install @json-render/shadcn @json-render/core @json-render/react zod
A note that radix-ui, embla-carousel-react, and vaul are pulled in by the package would make the dependency footprint less surprising.
2. Tailwind must scan the package's dist
The shadcn class names live in node_modules/@json-render/shadcn/dist, which Tailwind 4 does not scan by default. Without this, components render with no styling:
@import "tailwindcss";
@source "../node_modules/@json-render/shadcn/dist";
There is no mention of @source in packages/shadcn/README.md.
3. The shadcn CSS variables must be defined
Components use the standard shadcn tokens (--background, --primary, --border, --ring, ...). Without them the UI renders but is unreadable. This is normal shadcn setup, but it would help to show the expected variable list next to the install steps, since the package ships components without a theme.
4. Wrong prop names fail silently
This one is not a bug, but it is worth flagging because there is no feedback loop.
Most props fields are declared .nullable(), and the schema is not strict, so an unrecognized key is simply dropped. The component renders as an empty shell with no warning.
Two examples I hit by guessing from the component name:
| Component | Guessed | Actual | Symptom |
|---|---|---|---|
| Tabs | items | tabs | Renders a single divider, no tab labels |
| Alert | description + variant | message + type | Renders an empty box |
After fixing both, the server-rendered HTML went from 6,241 to 10,475 characters — 4,234 characters of content had been silently discarded.
For a framework whose main consumer is an LLM generating these objects, silent prop rejection is risky. catalog.validate() does catch structural problems, but it cannot tell you a prop was ignored.
Options that might be worth considering:
- Run Zod in strict mode for component props and return unrecognized keys from
catalog.validate() - Have
defineRegistrywarn in development when an element carries keys the schema does not declare - Keep
exampleon every definition (many have it) and surface it incatalog.prompt()for the components that currently omit it
What worked
To be clear, once configured the package works well. A dashboard built from 16 of the 36 components handled:
$bindState+visiblefor tab switchingrepeatover a state array$condfor conditional badge styling$templatestring interpolationStack/Gridlayout composition
No hand-written JSX inside the rendered region.
Environment
@json-render/core,@json-render/react,@json-render/shadcn— 0.21.3radix-ui1.4.3,tailwindcss4, react 19, zod 4, Vite 8, Node 26
The headings above are documentation gaps and one DX suggestion; nothing here is blocking. Happy to open a PR for the README additions if that would be useful.
- Dominant language
- TypeScript
- Stars
- 20k
- Forks
- 1.1k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vercel-labs/json-render
-
React Quick Start examples fail at runtime: Renderer must be wrapped in JSONUIProviderPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
vercel-labs/json-render#443 ·
Maintainers usually reply within 2 days
-
shadcn Grid/Stack are not responsive (fixed grid-cols-N, no min-w-0)Possibly taken @sushanshakya77 claimed this 67 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
vercel-labs/json-render#355 ·
Maintainers usually reply within 2 days
-
Array path helpers accept malformed RFC 6902 indexesPossibly taken @simonyang08 claimed this 106 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel-labs/json-render#326 ·
Maintainers usually reply within 2 days
-
Support zod 4.4+ — _zod.version.minor type check prevents upgradeMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel-labs/json-render#297 · 2 reactions ·
Maintainers usually reply within 2 days
-
feat: Generic `Spec` type supportPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vercel-labs/json-render#275 · 1 reaction ·
Maintainers usually reply within 2 days
All issues in vercel-labs/json-render
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainers usually reply within 1 day
-
area: middleware enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
juspay/agent-distro#203 ·
Maintainers usually reply within 1 day