Providing marginTop to Input via ThemeProvider applies to SearchBar elements and cannot be overridden.
See original GitHub issueBefore filling out an issue, be sure to check the version of react-native-elements you are using and the docs for that version over here.
Explain what you did
Defining the following in my React Native Elements theme works properly, except that this affects SearchBar elements and cannot be overridden when the SearchBar uses platform="Android"
Input: {
containerStyle: {
marginTop: 16,
},
},
I’ve tried all methods of styling my SearchBar, but it always receives marginTop: 16
Expected behaviour
Theme Inputs with containerStyle: { marginTop: 16 } and then override that on a SearchBar.
Describe the bug
SearchBar inputContainer’s marginTop cannot be overridden when that value is provided via the ThemeProvider
To Reproduce We highly recommend that you re-create the bug on Snack. If not, list the steps that a reviewer can take to reproduce the behaviour:
To reproduce:
- Add the following to your theme:
Input: {
containerStyle: {
marginTop: 16,
},
},
- Attempt to modify the
marginTopon aSearchBarwithplatform="Android"
Possible Solution Unknown
Screenshots If applicable, add screenshots to help explain your problem.
Your Environment (please complete the following information):
| software | version |
|---|---|
| react-native-elements | 1.0.0 |
| react-native | 0.57.1 (Via Expo) |
| npm or yarn | Yarn@1.13.0 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (2 by maintainers)

Top Related StackOverflow Question
@Slapbox Now the searchbar don’t use themed input, so I am hoping it’s no longer any issue in v4
@flyingcircle sir can i work on this issue.