1. Docs
  2. Components
  3. Form

Form

A form component that coordinates submission and validation.

Installation

Overview

Form is a minimal, non-visual component that coordinates:

  • Form submission via onSubmit
  • Server-side validation errors via validationErrors
  • Reset handling via onReset

Form does not:

  • Manage field state
  • Control layout
  • Replace the Field component
  • Render visual elements or field containers

For layout and field composition, use the Field component.

Understanding the architecture

Form is only responsible for submission and validation coordination. It does not handle:

  • Individual field layout → Use Field
  • Input behavior and accessibility → Use TextField or similar
  • Complex form state → See Forms overview for library integrations

Recommended reading:

Anatomy

Form Libraries

For complex forms with client-side validation and state management, see the Forms guide:

Examples

Basic

Component textfield-form not found in registry.

Server Validation

Use the validationErrors prop to display server-side validation errors.

Reset

API Reference

Form accepts all props from React Aria's Form.

PropTypeDefault
validationErrors
object
validationBehavior
enum
"native"
onSubmit
function
onReset
function
onInvalid
function

Field Examples

See the following components for form integration examples: