Forms

Form

Thin form root that owns asynchronous submit state and prevents duplicate submissions while preserving native form behavior.

import { Form } from '@lostgradient/cinder/form';
formsubmit
01

Overview

Form is a thin native form root that exposes asynchronous submission state to its child snippet and ignores duplicate submissions while the current handler is pending.

Use native validation and form controls as usual. The component owns only submit coordination; it does not replace native serialization, validation, or reset behavior.

Live preview

02

When to use

Use when
  • A form needs a shared pending state while an asynchronous submit handler runs.
Avoid when
  • Submission is entirely native and no pending UI needs to be coordinated.
03

Examples

Basic form

Native form submission with Cinder controls.

04

Props

Props for form
NameTypeDefaultDescription
onSubmit (event: SubmitEvent) => voidPromise<void>
children snippet