|
|
há 2 meses atrás | |
|---|---|---|
| .. | ||
| app | há 3 meses atrás | |
| lib | há 4 meses atrás | |
| CHANGELOG.md | há 3 meses atrás | |
| README.md | há 2 meses atrás | |
| eslint.config.js | há 4 meses atrás | |
| next.config.ts | há 4 meses atrás | |
| package.json | há 3 meses atrás | |
| postcss.config.mjs | há 4 meses atrás | |
| tsconfig.json | há 4 meses atrás | |
Static JSON specs rendered with json-render -- no AI required. This example demonstrates that json-render works as a standalone UI renderer without any LLM, streaming, or backend. Hand-authored specs are rendered client-side with JSONUIProvider and Renderer.
$bindState for two-way input binding, $cond for conditional visibility, checks for field validation, and a validateForm action.$computed with custom functions like formatAddress and citiesForCountry for derived values.watch triggers setState actions when a value changes, enabling cascading select patterns.$template for string interpolation with state values.confetti action wired to react-confetti-explosion.The app includes several tabbed demos:
$template, $cond, cross-field checks, validateForm, conditional visibilitywatch + setState, $computed, $templatepnpm install # from the monorepo root
cd examples/no-ai
No environment variables are needed.
pnpm dev
# http://no-ai-demo.json-render.localhost:1355
Requires global portless. The predev script checks for it automatically.
app/page.tsx -- tabbed gallery rendering each demo spec with JSONUIProvider and Rendererlib/examples.ts -- all demo specs as static Spec objectslib/render/catalog.ts -- component catalog using shadcn component definitions, with a confetti action and custom functionslib/render/registry.tsx -- registry mapping shadcn components, the confetti action handler, and computed function implementations