Generate complex svelte5 forms with a strictly-typed schema.
type Person = {
name: string;
age: number;
email: string;
};
const schema: FormSchema<Person> = {
name: { _title: "Name" },
age: {
_title: "Age",
type: "number",
},
email: {
_title: "Email",
type: "email",
},
};
<SchemaForm
schema={schema}
onSubmit={async ({ value }) => {
console.log("submit", value);
}}
/>;
For a complete example, have a look at App.svelte and its corresponding demo output.
While usable (you'd have to get your hands dirty), this is still very much a work in progress and many features are still missing. The goal is to be able to customize every aspect and behavior of the form by configuring the schema itself.