How can I set some space between Input and Icon properly?
See original GitHub issueI am new to both react native and react native elements and I have read react native elements documents as well as test some code provides in the docs but the result is not the same as shown in the document page. I have tried on this section and then this is the code I tried:
<View>
<Input
placeholder='PASSWORD'
style={{padding: 50}}
// leftIcon={ <Icon name="lock" size={24} style={{padding:}}/> } // this one is working but imagine if I have some reason not to use <Icon/>
leftIcon={{ type: 'font-awesome', name: 'lock' }} />
</View>
Here is the result i got:

The output look too bad compare to the one i saw on the documents. So, how can I set some space between icon and input?
I almost forget. i believe what shown on document(code, picture) should be relevant so we can easily copy and paste and furthermore, there should be more code example. I used to use bootstrap, this provide many example including form … And if this project could do that too, it would be much easier for new comer to learn and copycat. Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9

Top Related StackOverflow Question
Not as yet, we do have it planned for the next release. See https://github.com/react-native-elements/react-native-elements/issues/1962
This is a bug that’s to be fixed in 2.0.0, we didn’t fix it earlier cause it would’ve been a breaking change.
However, we have a prop called
leftIconContainerStylethat you can use to remove the margin. See example https://snack.expo.io/@roach_iam/intelligent-pizza