Use checkout when a form has to prove it can handle real business density: contact details, masks, selects, live previews, and saved progress.
- Masked fields cover card number, expiry, CVV, and internal business codes
select()keeps option metadata in the schema for both web and native- Draft persistence helps longer flows survive reloads or app restarts
Persist the draft
Checkout, onboarding, and support forms are much safer when the user can leave and come back.
- Use
persist.keyto scope the draft to the business flow - Pick the storage target that matches the platform: local storage on web, async storage on native
- Add
excludewhen some values should never be cached locally, such as ephemeral tokens
CheckoutPersistence.tsts
| 1 | const form = useFormBridge(checkoutSchema, { |
| 2 | persist: { |
| 3 | key: 'customer-checkout', |
| 4 | storage: 'local', |
| 5 | debounce: 250, |
| 6 | exclude: ['cvv'], |
| 7 | }, |
| 8 | }) |
Layout without forking the runtime
The shape of the form can change a lot between screens, but the schema does not have to.
- Put layout concerns in your host components and field wrappers
- Keep the field semantics in the builders
- Use generated fields for most inputs, then style or group them in rows, cards, or side panels as needed