Form builder
Builds a working form: add fields from the palette, reorder by drag or Alt and arrows, set validation and show-when rules, then preview the real form and copy its schema.
When to use
- Surveys, intake and application forms your customers design.
- Internal tools where operations staff change questions.
When not to use
- A form you write once in code; use fields directly.
Installation
pnpm dlx shadcn@latest add @caliper/form-builder
Adds its 16 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
FormBuilder
4 props
FormPreview
3 props
fieldVisible
10 props
Keyboard
- ↑
- Moves to the previous item or value.
- ↓
- Moves to the next item or value.
- Delete
- Removes the next character or the selected item.
- Backspace
- Removes the previous character or item.
- Enter
- Activates the focused control.
- Space
- Activates the focused control.
Accessibility
It exposes button, status and alert semantics, with aria-label, aria-hidden, aria-pressed, aria-describedby and aria-invalid kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/form-builder.mdThe index of every part is at /llms.txt.