Skip to content
TrademarkTrademark
Docs
Form Controls

Form

Updated: October 20, 2026
View on GitHub
Soon
Not released yet. The published package does not include this yet, so it will not install today.

Form takes the same props as on the web (density, columns, size, as, onSubmit, pending). It lays its fields out in rows and columns, gives them all one size, and tells a SubmitButton when a submit is running. With density="stacked" the fields fuse onto shared borders and only the group's outer corners stay round. See the web Form for the same component in the browser.

A booking form with a stacked group of fields, an error summary and a submit button

Submitting

React Native has no form element, so the SubmitButton inside a Form with onSubmit calls it; as="form" is accepted and changes nothing more. Return a promise and the form stays pending until it settles: the button shows its spinner, swaps to pendingLabel and ignores taps, so a double tap sends one request.

Stacked fields

density="stacked" joins the fields into one block. The corners come from the fields that actually rendered, so hiding one never leaves the group ending on a square edge. tight (the default, 8) and spacious (24) keep every field separate.

Columns

columns takes a number, or one per breakpoint ({ xs: 1, m: 2 }). A child's span takes several columns.

Differences from the web

  • No form element. onSubmit takes no event, and only a SubmitButton submits. The keyboard's return key does not; call your submit from onSubmitEditing on the last field if you want it to.
  • Columns are rows of flexible cells rather than a CSS grid.

API reference

Prop
Type
Default
Description
density"stacked" | "tight" | "spacious""tight"Gap and grouping.
columnsnumber | { xl?, l?, m?, s?, xs? }1Columns, flat or per breakpoint.
size"xs" | "s" | "m" | "l" | "xl"Size for every field that sets none.
as"div" | "form""div"Accepted for the web's sake; onSubmit alone lets a SubmitButton inside submit.
onSubmit() => unknownCalled by the SubmitButton. A returned promise keeps the form pending.
pendingbooleanMarks the form as submitting from outside.

Form also takes every Flex prop.

Edit this page on GitHub