How to change font family for TextInput placeholder in React Native?

Sometimes, we want to change font family for TextInput placeholder in React Native.

In this article, we’ll look at how to change font family for TextInput placeholder in React Native.

How to change font family for TextInput placeholder in React Native?

To change font family for TextInput placeholder in React Native, we can set the fontFamily style of the TextInput.

For instance, we write:

import * as React from 'react';
import { View, TextInput } from 'react-native';

export default function App() {
  const [value, setValue] = React.useState();

  return (
    <View>
      <TextInput
        style={{ fontFamily: 'courier' }}
        value={value}
        onChangeText={setValue}
      />
    </View>
  );
}

to set the fontFamily property to 'courier' to render the text inputted in the TextInput with Courier.

Conclusion

To change font family for TextInput placeholder in React Native, we can set the fontFamily style of the TextInput.