Code
<TextInput
mode="outlined"
label="Enter Password"
outlineColor="#000"
activeOutlineColor="#0073D9"
right={<TextInput.Icon name="eye" />}
style={{
backgroundColor: '#eee', marginRight: scale(20),
marginLeft: scale(20),
}}
value={Pass}
onChangeText={(text) => setPass(text)}
/>
Output
How to add an icon in react native paper text input?
2
Answers
add secureTextEntry in TextInput and for more Icons – https://pictogrammers.com/library/mdi/
You need to use icon prop instead of name.
your example
the right way:
and if you want to know what value you could use, here is the source:
https://callstack.github.io/react-native-paper/docs/guides/icons/
I hope this help 🙂