inputs/DSTextArea

DSTextArea

inputs
since v1.0

Multi-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

PropTypeDefaultDescription
labelString?nilLabel above the field.
placeholderString""Placeholder text.
textreqBinding<String>โ€”Bound text value.
minLinesInt3Minimum visible lines.
maxLengthInt?nilCharacter limit. Shows a counter.
errorString?nilValidation 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
)

Related Components