# Form builder: edit and preview a schema

> Add fields from a palette, reorder them with the keyboard or pointer, inspect field settings, and see the validated form preview and schema JSON update…

Language: en
Canonical: https://texuli.com/examples/forms-builder/
Markdown: https://texuli.com/examples/forms-builder.md (this page). Every texuli.com page has a Markdown twin at its URL plus `.md` (the home page is https://texuli.com/index.md), and any page URL answers `Accept: text/markdown` with its twin instead of HTML.
Last Updated: 2026-11-13

---

[All examples](https://texuli.com/examples/)

Add fields from a palette, reorder them with the keyboard or pointer, inspect field settings, and see the validated form preview and schema JSON update together.

[Form builder: edit and preview a schema](https://texuli.com/examples/forms-builder/)

`forms-builder` · `forms/FormBuilder`

 forms builder

 Props
- `onChange`
- `schema`

Live example loads in an isolated same-origin preview frame.

Source (forms/FormsBuilderDemo.svelte)

```
<script lang="ts">
import { FormBuilder } from '@texuli/forms/builder';
import type { FormSchema } from '@texuli/forms/model';

let schema = $state<FormSchema>({
  title: 'Community day RSVP',
  description: 'Register for the example.com community day.',
  fields: [
    { name: 'name', type: 'text', label: 'Your name', required: true },
    { name: 'email', type: 'email', label: 'Email address', required: true },
  ],
});
</script>

<section data-example="forms-builder" class="demo" aria-label="Interactive form builder example">
  <FormBuilder {schema} onChange={(next) => schema = next} />
</section>

<style>
  .demo { padding: 1rem; color: var(--tx-foreground, CanvasText); background: var(--tx-background, Canvas); }
</style>
```

## For agents

A worked example rendered live in the browser; the isolated preview frame (`/examples/preview/<id>/`) shows the same example without the site shell, and the example page next to it carries its code. The live parts run in the browser and are not in this Markdown; the operations below do the same work through the read-only MCP server at https://texuli.com/mcp (no sign-in; see https://texuli.com/auth.md).

MCP operations ([reference](https://github.com/DailybotHQ/texuli/blob/main/packages/tools/docs/ops.md#operations)):

- `example.search`: Find component examples.
- `component.get`: Read a component manifest.

Docs:

- [Component docs for agents (llms.txt)](https://texuli.com/llms/llms.txt)
- [Catalog manifest snapshot (JSON)](https://texuli.com/catalog/catalog.json)
- [@texuli/examples README](https://github.com/DailybotHQ/texuli/blob/main/packages/examples/README.md)
- [texuli README](https://github.com/DailybotHQ/texuli/blob/main/packages/texuli/README.md)
