Skip to content

WrathChaos/react-native-flex-divider

Repository files navigation

React Native Flex Divider

React Native Flex Divider

npm version npm Platform - Android and iOS License: MIT styled with prettier

React Native Flex Divider React Native Flex Divider

Installation

Add the dependency:

npm i react-native-flex-divider

Peer Dependencies

Zero Dependency

Usage

Import

import FlexDivider from "react-native-flex-divider";

Fundamental Usage

<FlexDivider text="Settings" />

Customization Usage

<FlexDivider
  text="USER SETTINGS"
  textStyle={{ fontFamily: "SuezOne-Regular" }}
  rightDividerStyle={{ flex: 5 }}
/>

Example Project 😍

You can checkout the example project 🥰

Simply run

  • npm i
  • react-native run-ios/android

should work of the example project.

Configuration - Props

Fundamentals

Property Type Default Description
text string undefined change the text

Customization (Optionals)

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

Future Plans

  • LICENSE
  • Write an article about the lib on Medium

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Flex Divider is available under the MIT license. See the LICENSE file for more info.