Skip to content

TextAreaField

A multi-line string input. An undefined value displays as an empty string without seeding the command.

PropTypeDefaultDescription
value(instance: TCommand) => unknownRequired. Accessor function returning the property value from the command instance.
titlestringThe label for the field.
placeholderstringPlaceholder text shown when empty.
rowsnumber5Number of visible text rows.
colsnumberNumber of visible text columns.
requiredbooleanOverride automatic required detection.

See Common props for styling, decoration, and population. This field does not accept every native textarea attribute (for example maxLength); use a custom adapter for additional attributes. Required and length rules belong in command validation.

These illustrative field fragments require TextAreaField from @cratis/arc.react/commands and the named generated command classes. Place each inside its matching CommandForm. bio and notes are string properties; these are alternatives, not a complete component.

<TextAreaField<UserCommand>
value={c => c.bio}
title="Biography"
placeholder="Tell us about yourself..."
rows={8}
/>
<TextAreaField<NoteCommand>
value={c => c.notes}
title="Additional Notes"
rows={3}
/>