Socket
Socket
Sign inDemoInstall

@app-masters/react-native-ui-kit

Package Overview
Dependencies
0
Maintainers
5
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @app-masters/react-native-ui-kit

App Master's magical kit for UI solutions.


Version published
Maintainers
5
Install size
152 kB
Created

Readme

Source

React Native UI Kit

This is an UI kit for React Native with the common components used in App Masters.

Components

  • Button
  • Card
  • Divider
  • Input Field
  • Offline Image
  • Spinner
  • Style Utils

Usage

Before start, you must have a style file like (?).

$ npm install @app-masters/react-native-ui-kit --save-dev

Import your styles files and startStyles:

import { startStyles } from '@app-masters/react-native-ui-kit';
import AppStyles from './styles/styles';

In your app constructor:

startStyles(AppStyles);

Description

Button

Conditional button with style of Android and iOS

PropsDefaultDescription
style-[Optional] A custom style for that will override any default in the button container
onPress-Button's callback
label-Button's text
image-[Optional] Icon that will apear before the label
subText-[Optional] Label caption
subTextStyle-[Optional] Style for the caption
imageColor-[Optional] Color of icon
primaryColor-Background color when raised. When not, color of text.
secondaryColor-Color when pressed.
textColor-Color of text
raisedfalseWhen raised, background color is shown.

Card

Simple material design card.

PropsDefaultDescription
children-Card content
horizontalfalseIf horizontal, card will not have horizontal border.
style-[Optional] Custom styles that will override the default
onPress-[Optional] Callback for when the card is pressed

Divider

Simple material design horizontal divider

Input Field

Pretty Input field

PropsDefaultDescription
style-[Optional] Custom style that will override the container's style
value-Value of input
autoCapitalizefalseSet the first characters to upper case
maxLength-Maximun number of characters
keyboardType-[Optional] Set the keyboard type
onChangeText-Callback for changing in the text
placeholder-[Optional] Text when nothing is typed
secureTextEntryfalseIf true, hide the characters (password)
icon-[Optional] Icon that will be shown in the right of input
primaryColor-Color of icon and border
errorfalseIf true, error message will be shown and color will change
errorMessage-Message to show the error
errorColor-Color override in error
suffix-[Optional] Suffix text

Offline Image

Image component with that will load an online image and show an animation. If no online or fail to get, an offline image will be shown in the place.

PropsDefaultDescription
online-Image link for online get
offline-Offline default image
style-[Optional] Custom style that will override the container's style

Spinner

View with a spinner for loading states

PropsDefaultDescription
color-[Optional] Color of Spinner
screenfalseIf true, spinner will be larger

Style Utils

Functions used for creation of default styles

FunctionsParamsDescription
startStyles(appStyles)Create a object will default styles and merge with all custom app styles.
Styles-Static object will all app styles
ScreenSize-Static object with screen size of phone: {width, height}
isPortrait( )Return true if Portrait
isLandscape( )Return true if Landscape
screenPosition( )Return "LANDSCAPE" or "PORTRAIT"

Keywords

FAQs

Last updated on 02 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc