inputs/DSTextArea
DSTextArea
inputsMulti-line text input that expands as the user types, with an optional character counter.
iOS 17+macOS 14+
Purpose
Long-form text entry: descriptions, notes, comments, and bio fields.
States
default
Minimum 3 visible lines.
focused
Primary-colour border.
error
Red border + error message.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | String? | nil | Label above the field. |
| placeholder | String | "" | Placeholder text. |
| textreq | Binding<String> | โ | Bound text value. |
| minLines | Int | 3 | Minimum visible lines. |
| maxLength | Int? | nil | Character limit. Shows a counter. |
| error | String? | nil | Validation error message. |
Examples
Bio field with counter
Profile description limited to 160 characters.
swift
DSTextArea(
label: "Bio",
placeholder: "Tell us about yourself...",
text: $bio,
maxLength: 160
)