Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
React Native docs
FormsReact Native

Text field

Collect a single line of text using each platform’s native input and focus behavior.

Public APILumenTextFieldReact Native

Native example

Use Text field

Keep a stable label even when placeholder text is present. Pair error styling with useful explanatory text rather than relying on color alone.

View verified React Native runtime capture
Text field rendered in the Expo web renderer Lumen playground
Verified runtime captureExpo web renderer
tsx
<LumenTextField
  accessibilityLabel="Email address"
  onChangeText={setEmail}
  value={email}
/>

Reference

Public API

The primary shared and platform-specific options exposed by LumenTextField.

APIValues or typeDefaultDescription
valueBound StringRequiredStores the current native input value.
onChangeTextValue callback / bindingRequiredUpdates application state.
accessibilityLabelStringRequiredNames the field.
sizesm · md · lgmdSelects shared control metrics.
errorBooleanfalseApplies the semantic invalid treatment.
editableBooleantrueControls native editing state.

Native behavior

Design and accessibility

When to use it

Keep a stable label even when placeholder text is present. Pair error styling with useful explanatory text rather than relying on color alone.

Accessibility

The field remains a native input with platform focus, keyboard, autofill, and screen-reader behavior. Errors use native invalid-state semantics where available.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose
React Native docsNative primitives