Add the dependency:
npm i react-native-flex-divider
Zero Dependency
import FlexDivider from "react-native-flex-divider";
<FlexDivider text="Settings" />
<FlexDivider
text="USER SETTINGS"
textStyle={{ fontFamily: "SuezOne-Regular" }}
rightDividerStyle={{ flex: 5 }}
/>
You can checkout the example project 🥰
Simply run
npm i
react-native run-ios/android
should work of the example project.
Property | Type | Default | Description |
---|---|---|---|
text | string | undefined | change the text |
Property | Type | Default | Description |
---|---|---|---|
style | ViewStyle | default | set or override the style object for the main container |
text | ViewStyle | default | set or override the style object for the text style |
leftDividerStyle | ViewStyle | default | set or override the style object for the left divider style |
rightDividerStyle | ViewStyle | default | set or override the style object for the right divider style |
TextComponent | Text | default | set your own component instead of default react-native Text component |
-
LICENSE - Write an article about the lib on Medium
FreakyCoder, kurayogun@gmail.com
React Native Flex Divider is available under the MIT license. See the LICENSE file for more info.