Input

A single-line text field with adornments and a clear button, plus TextField with a label.

import { Input, TextField } from "@plexui/react-native"

Examples

Overview

TextField is an Input with a label, a description under it and an errorMessage that takes the description's place and marks the field invalid; required adds an asterisk to the label. On iOS the label stands over the field (15/20 medium) and the help 4pt under it; on Android the label floats onto the outline, or to the top of a filled field, when the field has focus or a value, in the accent while it has focus (its lighter text at night), and the help is 14sp text in the secondary gray under the field.

Password with visibility toggle

SSN input

Birthday input

Birthday with validation

With button

Platforms

iOS 26Android
Native componentText fieldText field (filled or outlined)
LookA 44pt field in 17pt type, its border darkening on focusA 50dp field in 17sp type, its outline thickening in the accent on focus
In a List rowThe row's value: no frame, the text at the row's end, the error a line under the rowA field at the row's end, the error under the label

API

Input

PropTypeDefaultDescription
variant"outline" | "soft" | "ghost""outline"Fill style; ghost has no frame. On Android outline is the outlined field, soft a field filled with the text color at 5% (with a startAdornment and no label, the 40dp search field)
size"3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl""md"Step of the control scale. On iOS every step is the 44pt phone control and the size changes the radius, gutter and type; Android fields are 50dp, 56 with a label
valuestring—Controlled text
defaultValuestring—Initial text (uncontrolled)
onChangeText(text: string) => void—Called with the text on every change
placeholderstring—Shown while the field is empty
invalidbooleanfalseDraws the field in the error color
disabledbooleanfalseDims the field and takes no input (TextInput's editable is not used)
readOnlybooleanfalseKeeps the value and hides the clear button
onClear() => void—Shows a clear button while the field has a value: on iOS while it is edited, or while a search field has text, and never for a value at a row's end. A press clears the text (onChangeText receives an empty string), then calls it
startAdornmentReactNode—An icon or element before the text
endAdornmentReactNode—An icon or element after the text
pillbooleanfalseA capsule. On iOS a 3xl capsule is the text field of a step (Health, Mail, Apple Account): 52pt, the height of the action under it, its text 20 in
styleStyleProp<ViewStyle>—Style of the field's box
refRef<ComponentRef<typeof TextInput>>—The text input itself, for focus(), blur() and clear()
testIDstring—Test id

Every other prop of React Native's TextInput passes through to the text input (keyboardType, inputMode, secureTextEntry, selectTextOnFocus, autoCapitalize, autoComplete, maxLength, onFocus, onBlur and so on).

Input.AdornmentButton

A button in startAdornment or endAdornment, as the web's Input.AdornmentButton (also exported as InputAdornmentButton). Every other prop of Pressable passes through.

PropTypeDefaultDescription
childrenReactNode—The icon: it takes the button's color and size (19pt at an iOS row's end, 20 in a field, 24dp on Android)
accessibilityLabelstring—The button's name for screen readers (required)
selectedboolean—A toggle's state, read as selected
onPress() => void—Called on a press
disabledboolean—Dims the button and takes no press

TextField

TextField takes every prop of Input, plus:

PropTypeDefaultDescription
labelReactNode—The field's name (required): over the field on iOS, floating inside it on Android
descriptionReactNode—Help under the field
errorMessageReactNode—Shown under the field in place of the description, and marks it invalid
requiredboolean—Adds an asterisk to the label and marks the field required
labelActionReactNode—Content at the end of the label's line on iOS, of the help's line on Android (where the label floats)
counterboolean | stringfalseShows the count of characters against maxLength (3/15): Material's counter at the end of the help's line on Android, at the end of the label's line on iOS. A string is a count of its own in that place (chosen tags, "3/10")