Skip to content

Text area - Frameworks

A text area allows users to input extended text content that covers multiple lines.

iOSreleasedReactreleasedVuereleased

iOS

Syntax

swift
Warp.TextArea(
    title: String = "",
    additionalInformation: String? = nil,
    tooltipContent: AnyView? = nil,
    text: Binding<String>,
    placeholder: String = "",
    style: Warp.TextAreaStyle = .default,
    helpText: String? = nil,
    minHeight: CGFloat = 88
)
swift
Warp.TextArea(
    title: "Title",
    text: $text,
    placeholder: "Please fill me"
)

Visual options

There are a variety of variants supported for the TextArea component:

swift
enum Warp.TextAreaStyle {
    case `default`
    case disabled
    case error
    case readOnly
}

Legacy support

By default all Warp components return a SwiftUI View but there is always a UIKit UIView available to use also.

swift
Warp.TextArea(
    title: "Title",
    text: $text,
    placeholder: "Please fill me"
).uiView

Parameters

Required props

NameTypeDefaultDescription
textBinding StringBinding to the text content.

Optional Props

NameTypeDefaultDescription
titleStringemptyThe main title text to display.
additionalInformationString?nilOptional text to display after the title.
tooltipContentAnyView?nilAn optional view to display when the tooltip icon is tapped.
placeholderStringemptyText to display when the text area is empty.
styleWarp.TextAreaStyle.defaultThe style of the text area. Use one of the predefined TextAreaStyle values: .default, .disabled, .error, or .readOnly
helpTextString?nilOptional String to display below the text area.
minHeightCGFloat88Minimum height for the text area.

Questions?

Feel free to ask any questions on usage in the Warp DS Slack channel: #warp-design-system