v1.0.0
Summary
React Native Elements v1 is finally here!! π― This is the biggest and more improved release so far so please read through the release notes below carefully. And welcome to v1 π
Thanks to all that have submitted issues, pull requests and helped us to reach this milestone today. β€οΈ
Be sure to check out our blog post if you're upgrading from 0.19.1!
BREAKING CHANGES
Avatar, Badge, ButtonGroup, CheckBox, Icon, ListItem, SocialIcon
If you were using the component prop for any of these, it's now changed to Component. 3582b78 @iRoachie
Avatar
If you were using the editButton prop before, the param names are now changed e44bff0 @iRoachie
// Before
<Avatar
editButton={{
iconName: 'xx',
iconType: 'xx',
iconColor: 'xx'
}}
/>
// After
<Avatar
editButton={{
name: 'xx',
type: 'xx',
color: 'xx'
}}
/>Button
-
We've added button types! Buttons can now have a type of
solid,clearoroutline. This means that theclearprop is now deprecated. Also in this change,buttons on Android by default won't be raised -- if you want a raised button, then add theraisedprop. 773131e, 5673323 @iRoachie -
The default title "Welcome to React Native Elements" is now gone. If for some reason you were depending on this in your app π you'll have to set the title. 52678d5 @iRoachie
Badge
wrapperStyleis now been deprecated.containerStylenow functions as what waswrapperStyleand a new propbadgeStylereplaces what wascontainerStyle.elementprop which was undocumented is now deprecated. Just use thevalueprop- Badges can no longer render children. Instead, if you want a custom component you can use the
valueprop which now supports rendering react components. - We've added "mini badge" π
which functions as a status indicator when no
valueis provided. - Adds
statusprop which is a convenience prop for styling the background viabadgeStylefor quick and commonly used scenarios
ButtonGroup
Deprecates the disableSelected prop and introduces 5 new props for handling disabled states:
disableddisabledStyledisabledTextStyledisabledSelectedStyledisabledSelectedTextStyle
Card
Deprecates two props:
fontFamily- Can be set viatitleStylepropflexDirection- Can be set viawrapperStyleprop
SearchBar
Adds the ability to customize the "Cancel" button on the iOS SearchBar with some new keys in the cancelButtonProps props:
cancelButtonProps: {
buttonStyle,
buttonTextStyle,
color,
disabled, // boolean for the Touchable
buttonDisabledStyle,
buttonDisabledTextStyle,
}Input
Input previously had a default width of 90% that would give it a weird inset. It's now been fixed to appear as expected.
See before and after in #1640 (comment).
Text
Deprecates the fontFamily prop. If you want to change the font family you can use the style prop.
Features
- Adds showcase section website 4af1ce3 @Monte9
- New Image component! 3663c0c @iRoachie
- New withBadge HOC for adding Badges to any component 59845eb @janhesters
- Add AntDesign to list of available icon sets 83a8625 @osdnk
- Add platform specific colors to theme e14237d @janhesters
DividerAllow passing View properties b7617e8 @iRoachieHeaderAdd props for background image 1957e0d @MHaseInputAllowlabelto be a react element d1ac878 @MHaseInputAddsetNativePropsmethod 61dc4af @marcelolxTile | FeaturedTileAllowcaptionto be a react element 0f83366 @MHaseTileAllowImageComponentprop for custom image component b39b88b @BradenM- React Native Web will now use styles and touchable components for iOS cb11a69 6349f79 62a9fcc 489723e 21292b4 a2e179f c05a8fd 659ad08 4379a78 241adb4 94b9cee @piu130
Bug Fixes/Warnings
AvatarCorrect proptype foroverlayContainerStyleandcontainerStyle412a7d1 @inandszaAvatarImageComponent prop type to allow both of func and object 9bcd638 @haruelrovixButtonMake padding consistent 5508d92 @haruelrovixButtonRounded corners with custom width, height now work correctly on android 5673323 @iRoachieHeaderFix issue with iPhone Xr de522f1 @iRoachieListItemFix typescript type forcomponentprop https://github.com/react-native-elements/react-
native-elements/commit/19ada2baafd754f05e68667bc0eae887965e9632 @iRoachieListItemFix displaying of rightTitle and other right props when title is not provided 4a44469 @iRoachieOverlayFix ScrollView usage 22654c9 @iRoachieOverlayFixonBackdropPress22654c9 @iRoachieOverlayFix resizing issues when changing orientation or changing window size bcaafba @iRoachieOverlayFix array keys warning 8778d38 @iRoachieSearchBarFix bug where clear button wouldn't show if value prop was set 28c6141 @franck-nadeauSearchBarFix bug withplatform='android'where clear button was showing cancel icon 3f3e95d @iRoachieSearchBarFix bug withplatform='android'where margins on the containerStyle couldn't be applied 96b2f3f @iRoachieSliderFix bug when updating the bounds dynamically aa4bf53 @xavier-villelegierSliderFix bug when using LayoutAnimation + Slider on Android 324d0bc @xavier-villelegierSliderFix bug where vertical sliders weren't being layout correctly e2555a6 @armenbadalyanTextpropType warning when passing array of objects for style prop 12e830f @iRoachieTextFix bug where local props would not override the theme set font size 5d64dc2 @iRoachieThemeProviderRemove circular dependency 687fc8c @haruelrovixThemeProviderFix bug where withTheme hoc wasn't passing statics (navigationOptions) 4a0e06e @iRoachieTooltipProper calculation of tooltip position based on visible element width 203c94b @cidevant- Remove warning for react-native-vector-icons when installing 4c412f1 @haruelrovix
Docs
- Small Typo Fix on Getting Started Page 74aceff @swkane
- Made small updates to the prose on Overview page d72e2ce @swkane
- Added
importΒ β¦statements on some pages 1a3e4eb 764ec1a 15b9952 @swkane - Fix small list item error 98e8485 @janhesters
- Fix links in some docs pages 4c3dda9 @MHase
- Fix GitHub spelling 945e2c8 @sdaniel55
- Add
overlayContainerStyleprop to Tile 092283c @JoseVf - Typo on Tooltip page c1c0a7f @jsina
- Add closing braces on CheckBox examples 7a97cee @kelseyyim
Misc
- (types) Add missing types for Avatar 65264c0 @haruelrovix
- (types) Change type of HeaderProps.placement 358f452 @curtisrutland
- (types) Allow checkmark on ListItem to pass partial props e1b7f42 @janhesters
- (types) Fix ListItem checkBox props typo 59bab39 @josephktcheung
- (test) Fix failing tests on Windows b8de1db @haruelrovix
- (test) Fix eslint errors, and add eslint to precommit and lint 82c1cdf b9f8317 @tux-tn
- (Icon) Move default props to the
defaultProps9574edf @msevestre - (SearchBar) Switch Icons from material-community to material d60bb03 @piu130