Form Frame
The frame of a settings or edit form: sections, fields, validation with an error summary, and a save bar that slides up when something changed.
pixikit.com/docs/app-ui/forms/form-frame
Customize
Layout
Sections
Save bar
Guard
Disabled
Props
11| Name | Type | Default | Description |
|---|---|---|---|
onSubmit | (values: FormValues) => void | Promise<void> | None | Called with the field values once validation passes. A promise shows the saving state. |
validate | (values: FormValues) => Record<string, string> | None | Returns a message for each invalid field name; an empty object means valid. |
layout | "stacked" | "split" | "aligned" | "stacked" | `stacked` puts title and fields in a column, `split` sets each section's title beside its fields, `aligned` puts labels to the left of fields in a divided list. |
sections | "plain" | "cards" | "plain" | `plain` separates sections with a rule, `cards` gives each its own card. |
saveBar | "sticky" | "inline" | "none" | "sticky" | `sticky` is a bar that slides up when something changed, `inline` sits under the form, `none` has no bar. |
submitLabel | string | "Save changes" | The text of the save button. |
discardLabel | string | "Discard" | The text of the discard button. |
guard | boolean | false | Asks the browser to confirm before leaving while there are unsaved changes. |
children | ReactNode | None | The sections and fields. Use uncontrolled fields so Discard can restore them. |
disabled | boolean | false | Turns every field off. |
className | string | None |