How to change placeholder color in react native?

Hi Friends 👋,

Welcome To aGuideHub!

To change the placeholder text color of TextInput in react native, you can use the placeholderTextColor attribute in the TextInput component it will change the placeholder color based on the placeholderTextColor attribute value.

See a short example of the placeholderTextColor attribute to change placeholder text color.

  placeholder="Placeholder Color"

Pro Tip: in the placeholderTextColor attribute you can pass color value in hex decimal, RGB, rgba, hsl, and hwb. For more check out React Native Color Reference.

In this article, you will get a complete example change react native text input placeholder text color using the placeholderTextColor attribute.

Let’s start today’s tutorial Example of change placeholder color of react native textinput

In the below example, I used TextInput from react-native and provided two examples of text input with different placeholder colors.

import React from 'react';
import {SafeAreaView, StyleSheet, TextInput} from 'react-native';

const TextInputExample = () => {
  const [text, onChangeText] = React.useState('');
  const [number, onChangeNumber] = React.useState('');

  return (
        placeholder="Placeholder Color"
        placeholder="Placeholder Color"

const styles = StyleSheet.create({
  input: {
    height: 40,
    margin: 12,
    borderWidth: 1,
    padding: 10,

export default TextInputExample;

Here, we are provided code expo links for the above program change placeholder color of textinput. Then you can use it whenever you want and make the changes per your requirements.

You can also use the below link to check the output of the above program.

Try it Yourself

All the best 👍

Premium Content

You can get all the below premium content directly in your mail when you subscribe us


Interview Questions

Soon You will get CSS, JavaScript, React Js, and TypeScript So Subscribe to it.

Portfolio Template

View | Get Source Code

Cheat Sheets

Cheat Sheets Books are basically Important useful notes which we use in our day-to-day life.

Related Posts