React NativeScript

React NativeScript

  • Docs

›ELEMENTS: COMPONENTS

INTRODUCTION

  • Introduction

GETTING STARTED

  • Quick Start
  • Environment Setup
  • Using React Devtools

CORE CONCEPTS

  • Native Access
  • Navigation
  • Node Roles
  • Modals
  • Plugins
  • Styling

SAMPLES

  • Apps

ELEMENTS: LAYOUT

  • AbsoluteLayout
  • DockLayout
  • FlexboxLayout
  • GridLayout
  • StackLayout
  • WrapLayout

ELEMENTS: COMPONENTS

  • ActivityIndicator
  • ActionBar
  • ActionItem
  • Button
  • DatePicker
  • Frame
  • HtmlView
  • Image
  • Label
  • ListView
  • ListPicker
  • NavigationButton
  • Page
  • Placeholder
  • Progress
  • ScrollView
  • SearchBar
  • SegmentedBar
  • Slider
  • Switch
  • TabView
  • TabViewItem
  • TextField
  • TextView
  • TimePicker
  • WebView

LICENCES

  • Licences
Edit

TextField

<textField> is an input component that creates an editable single-line box.

<textField> extends TextBase and EditableTextBase which provide additional properties and events.

See also:

  • Official top-level documentation
  • Detailed API specification

import * as React from "react";

<textField text={textFieldValue} hint="Enter text..." />

Props

NameTypeDescription
textstringSets the value of the field.
hintstringSets the placeholder text.
editablebooleanWhen true, indicates that the user can edit the value of the field.
maxLengthnumberLimits input to the spcified number of characters.
securebooleanHides the entered text when true. Use this property to create password input fields.
Default value: false.
keyboardTypeKeyboardTypeShows a custom keyboard for easier text input.
Valid values: datetime, phone, number, url, or email.
returnKeyTypeReturnKeyTypeSets the label of the return key.
Valid values: done, next, go, search, or send.
autocorrectbooleanEnables or disables autocorrect.
onBlur(args:EventData) => voidEmitted when the field loses focus.
onFocus(args:EventData) => voidEmitted when the field gains focus.
onReturnPress(args:EventData) => voidEmitted when the return key is pressed.
onTextChange(args:EventData) => voidEmitted when the text changes.

Native component

AndroidiOS
android.widget.EditTextUITextField
Last updated by Jamie Birch
← TabViewItemTextView →
  • Props
  • Native component
React NativeScript
Docs
Getting StartedUI Components Reference
Community
Stack OverflowChat on Slack in #reactTwitter
More
GitHub – React NativeScriptStarGitHub – Docs Site
Follow @LinguaBrowse
Copyright © 2021 Jamie Birch