Skip to content
PixiKit

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
NameTypeDefaultDescription
onSubmit(values: FormValues) => void | Promise<void>NoneCalled with the field values once validation passes. A promise shows the saving state.
validate(values: FormValues) => Record<string, string>NoneReturns 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.
submitLabelstring"Save changes"The text of the save button.
discardLabelstring"Discard"The text of the discard button.
guardbooleanfalseAsks the browser to confirm before leaving while there are unsaved changes.
childrenReactNodeNoneThe sections and fields. Use uncontrolled fields so Discard can restore them.
disabledbooleanfalseTurns every field off.
classNamestringNone

Related