react-native-ui-lib
UI Components Library for React Native.
Getting Started
Installation
yarn add react-native-ui-lib
or
npm i --save react-native-ui-lib
Native Dependencies
Some of the components are using these native dependencies, they are not a requirement but will allow you to create
better lookings apps (:
- react-native-animatable
- react-native-blur
Usage
This is a quick example of how to use our basic components, modifiers and presets to generate a good looking screen.

Style
The base foundation of each UI component is its style.
We use basic style presets to define the rules and the style guide we follow.
Our presetes includes: Colors, Typography, Shadows, Border Radius and more..
The UILib already comes with a set of predefined constants and presets.
You can easily use it anywhere in your code as you would have used any other constant value, or as a component modifier.
It's also very easy to define your own presets..
and so for example, the following line
Will generate this text
It will use the h1 preset for typography and the pink color value we set to style the Text element.
Modifiers
As you probably noticed already, we translate our style presets into modifiers.
Modifiers will help you create a stunning UI easily and quickly.
Align Faster
Use our alignment props to quickly position your content without getting confused calculating all these flex rules.
left, top, right, bottom, row, center, centerH (Horizontal Center), centerV (Vertical Center), spread
Spacing & Styling
Same goes here... space, stretch and color in a more readable way.
-
[colorKey] (text color), background-[colorKey]
<Text pink>...</Text>
<View bg-pink>...</View>
-
[typographyPresetKey] (text components)
<Text h1>...</Text>
-
flex, flex-[value]
-
padding-[value], paddingL-[value], paddingT-[value], paddingR-[value], paddingB-[value], paddingH-[value], paddingV-[value]
<View paddingV-20 paddingH-30>...</View>
-
margin-[value], marginL-[value], marginT-[value], marginR-[value], marginB-[value], marginH-[value], marginV-[value]
<View marginT-5 marginB-10>...</View>
Check out this example where we use most of these props
Assets
Assets are big part of the whole UI system, whether it's an icon, placeholder or an illustration, we use them everywhere.
Load assets groups and easily render them with the Image component.
Components (WIP)
- Action Bar
- Action Sheet (cross-platform)
- Avatar
- Badge
- Basic List
- Button
- Card
- Connection Status Bar
- List Item
- State Screen
- Loader Screen
- Page Control
- Picker
- Stepper
- Text
- TextInput
- MaskedInput
- TagsInput
Card
Masked Input
Tags Input
Since Android does not support TextInput onKeyPress callback, the feature that removes tags on Backspace won't work.
In Order to fix it, follow these instructions:
Update your dependencies in android/app/build.gradle
:
Update your android/settings.gradle
:
In your MainApplication.java
, add to the getPackages()
list: