Skip to main content

Interface: FormProps

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

Props for the Form component.

The Form root carries no evaluation prop: under the evidence rule (CONTRIBUTING §2.3) a dimension only appears on a component if a runtime dispatches on it. The Form root is visually transparent — colors, spacing of authorial emphasis live on the nested Input / Action parts — so adding evaluation here would be reserving API surface for a speculative future consumer. Re-introduce it the day a real consumer (e.g. background card chrome) needs it.

The composite owns its layout; pass style/className on a wrapping element rather than on the composite root. See CONTRIBUTING §4.

Extends

  • Omit<RACFormProps, "style" | "className">

Properties

children?

optional children?: ReactNode

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

Form content — typically TextField / Select / Checkbox / RadioGroup composites plus a FormActions row at the end.

Overrides

Omit.children


labelPosition?

optional labelPosition?: FieldLabelPosition

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

Where every field's label sits relative to its control.

top (default) stacks them, which is right for a narrow column — a login card, a dialog, anything one field wide. side puts the labels in a column beside the controls and shares that column across the whole form, which is the only reason side labels are worth having: per-field label columns leave the controls ragged. That is also why this lives on the Form and not on a field.

Fields whose label is their row — Checkbox, Switch — ignore it, because their label already sits beside the control and there is nothing to move.

Default

'top'

necessityIndicator?

optional necessityIndicator?: FieldNecessityIndicator

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

How the fields inside mark the ones the user must fill. One decision for the whole form: a form where one field marks required and the next does not is a form nobody proofread.

icon (default) puts an asterisk beside each required label, following the reference system and the web's convention of marking the required fields rather than the optional ones. none drops the marker; screen readers still hear the requirement, because the control carries the native required attribute either way.

Default

'icon'