Introduction
Describe a form in TypeScript. The engine draws it, checks it, and sends its answers where your API wants them.
What it does
You write what to ask. The engine does the rest:
- draws each field with the right input
- checks every answer before it moves on
- builds the payload in the shape your API expects
- reads a saved application back into the form
- shows a review of every answer before it is sent
Two shapes
A form of sections is one page. A form of steps is a wizard, with a review at the end.
import { defineForm } from "#form-engine";
export default defineForm({
sections: [
{
key: "cafe",
title: "Café",
fields: [
{
key: "name",
type: "text",
label: "Café name",
},
],
},
],
});
Where to start
The tutorial teaches each idea in order, with a live form beside the code. These pages are the reference.