Get Started
shadcn-rjsf is a set of three copy-paste registry items that bring JSON Schema–driven forms and a visual form builder to any shadcn/ui project.
Prerequisites
- shadcn/ui initialized in your project (
npx shadcn@latest init) - Next.js 13+ (App Router) or React 18+ with a compatible bundler
- Node.js 18+
Installation
| Item | What it is |
|---|---|
form-builder-types | Types (FormSchema, FormFieldDefinition, …), registerValidator and createCustomValidator. |
form-renderer | Renders a FormSchema as an accessible form built on your shadcn/ui components. |
form-builder | Drag-and-drop editor with a field palette, canvas and settings panel. Emits a FormSchema via onChange. |
Dependencies install automatically: form-builder pulls in form-renderer and form-builder-types, so one command gets everything:
Only rendering forms? Install just the renderer (it pulls in form-builder-types):
Quick Start: FormRenderer
Pass a FormSchema to FormRenderer and handle submissions via onSubmit.
Quick Start: FormBuilder
Wire FormBuilder to a FormRenderer for a live preview. The builder emits a full FormSchema on every change.
Locale Setup
Both components take a locale — the active locale used to resolve LocalizedString values — and a baseLocale fallback for missing translations. In FormBuilder, new field and option labels are created under baseLocale. A plain-string LocalizedString is always shown as-is. See the API Reference for every prop.
Updating
Registry items are copied into your project, so updates are not automatic. Every installed file starts with a comment naming the version it came from:
Compare it with the latest release (v0.3.0) and read the changelog for what changed. To update, install again with --overwrite:
This replaces the files in place. If you edited them, review the result with git diff and re-apply your changes.