TextInput

React Native for web adds the following features to the React Native <TextInput /> element.

Props

Sets the color of the insertion caret, the visible marker where the next character typed will be inserted. The caret is typically a thin vertical line that flashes to help make it more noticeable.

Type: ColorPropType

Conversion

// HTML & CSS
- <input style="caret-color: red;" />

// React Native
+ <TextInput caretColor="red" />

Whether an element is resizable, and if so, in which directions.

Type: 'none' | 'vertical' | 'horizontal' | 'both'

Default: 'none'

Conversion

// HTML & CSS
- <textarea style="resize: both;" />

// React Native
+ <TextInput resize="both" />

Last updated