How to Change the Background Color in TextInput React Native Paper
See original GitHub issueAsk your Question
I have this code
<TextInput
style={{
borderRadius: 50,
padding:'offset'
}}
label='Password'
mode='outlined'
theme={{
roundness: 50,
colors: {
primary:'green',
underlineColor:'transparent',
}
}}
underlineColorAndroid='transparent'
placeholder="password"
keyboardType='default'
autoCorrect='false'
autoCapitalize='none'
secureTextEntry='true'
onChangeText={formikProps.handleChange('password')}
onBlur={formikProps.handleBlur('password')}
/>
and I want to change the color or the textfield https://prnt.sc/o8gpc4
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Change text color of TextInput in React Native Paper
Just add this line theme={{colors: {text: 'Your Color' }}} to the < ...
Read more >TextInput · React Native Paper
Callback that is called when the text input's text changes. Changed text is passed as an argument to the callback handler. selectionColor. Type:...
Read more >TextInput - React Native
The highlight and cursor color of the text input. Type, Required. color, No. selectTextOnFocus . If true , all text will ...
Read more >React-native-paper TextInput background color
PlaceHolder Text Color can be modified using placeholderTextColor = “” prop, This prop would allow us to set Change TextInput PlaceHolder Text Color...
Read more >Change text color of TextInput in React Native Paper - iTecNote
However I want to control text color through passed props from a parent component. Strangely, passing backgroundColor works but color does not. Removing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, @maheraldous Did you try to add background Color to your TextInput component style?
<TextInput style={{ backgroundColor: 'yourColor' borderRadius: 50, padding:'offset' }}
Your code will work if the TextInput from react-native not from react-native-paper that’s why I am here. Because it you try your code with react-natove-paper the background color with get out of the outline and the border radius will create another circle border over the outline border.