Form
Zod-driven form.
On this page
Props
| Prop | Type | Default | Description |
|---|---|---|---|
schema required | z.ZodTypeAny | None | Zod schema defining form fields |
fields | readonly PageNode[] | None | Optional custom field nodes |
onSubmit required | ActionTarget | { readonly kind: "action"; readonly id: string } | None | Action triggered on form submission |
submitLabel | string | None | Submit button text |
Example
ts
Form({
schema: z.object({ name: z.string().min(1), endpoint: z.string().url() }),
onSubmit: createConnection(),
submitLabel: "Connect",
})