Skip to main content

Function: Form()

Form(__namedParameters): any

Defined in: composites/Form/Form.tsx:101

A semantic form scope built on React Aria's native Form.

Coordinates nested Input / Selection / Action parts around a single submission and validation contract. Field-level State.invalid is driven by React Aria's validationErrors propagation — this component adds no state machinery of its own.

Entity = Structure. The root is visually transparent — only vars.spacing.gap.stack.md between children. No color tokens are read here; chrome lives on the nested input / action parts.

Parameters

ParameterType
__namedParametersFormProps

Returns

any

Example

<Form onSubmit={(e) => { e.preventDefault();}}>
<TextField name="email" isRequired>
<TextFieldLabel>Email</TextFieldLabel>
<TextFieldControl type="email" />
<TextFieldError />
</TextField>
<FormActions>
<Button type="reset" evaluation="muted">Reset</Button>
<FormSubmit>Save</FormSubmit>
</FormActions>
</Form>