Categories
React Native Answers

How to add a text input with React Native?

Spread the love

To add a text input with React Native, we use the TextInput component.

For example, we write

<TextInput
  label={label}
  mode="outlined"
  theme={{
    colors: {
      primary: "#FFF",
    },
  }}
/>;

to add a TextInput with the label set to the label text.

The mode is outlined makes the text input show an outline.

And the colors.primary property set the main color of the text input.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.