npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-master-ui

v0.1.2

Published

UI for using in your react native projects.

Downloads

4

Readme

react-native-master-ui

UI for using in your react native projects (Android and IOS).

Install

npm i react-native-master-ui

or

yarn add react-native-master-ui

Then

npm i react-native-vector-icons
react-native link

or

yarn add react-native-vector-icons
react-native link

Simple Usage

import React, {Component} from 'react';
import {View,} from 'react-native';
import {CardView, ListItem, Accordion, StarsRate, Button} from 'react-native-master-ui'

export default class App extends Component {
    
    render() {
        return (
            <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
                <Button title={'Sample Button'}/>
            </View>
        )
    }
}

Accordion

Accordion Props

Prop | Type | Default | Description --------------------- | ------------ | ------------------------- | ----------- title | string | null | Title of the accordion. titleStyle | object | {} | Add your custom style for the title. headerStyle | object | {} | Add your custom style for the header. containerStyle | object | {} | You can change style accordion. isRtl | boolean | false | For the languges are right to left (like: farsi,arabic). isCard | boolean | false | You have two style of accordion (flat,card) . iconColor | string | "gray" | Color of arrow icon.

Example

import React, {Component} from 'react';
import {View,} from 'react-native';
import {Accordion} from 'react-native-master-ui'

export default class App extends Component {

    render() {
        return (
            <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
                <Accordion
                    title={"Headline"}
                    titleStyle={{
                        color: 'red'
                    }}
                    headerStyle={{
                        backgroundColor: 'blue'
                    }}
                    containerStyle={{
                        marginTop: 20
                    }}
                    iconColor={"red"}
                    isCard={true}
                    isRtl={false}
                >
                    <View>
                        .... whatever can be here
                    </View>
                </Accordion>
            </View>
        )
    }
}

Buttons

Button Props

Prop | Type | Default | Description --------------------- | ------------ | ------------------------- | ----------- onPress | function() | undefine | The job you want to happen after click. title | string | null | Title on the Button. textStyle | object | {} | Add your custom style for title. status | string | null | Can be one of: "info","info2","success","warning","danger","aqua" style | object | {} | Add your custom style for button. isLinear | isLinear | false | Show button with border and opacity background color. disable | boolean | false | Button not working when click if disable is true. isLoading | boolean | false | It shows an indicator instead of title until it's true. indicatorColor | string | "white" | Color of indicator.

Example

import React, {Component} from 'react';
import {View,} from 'react-native';
import {Button} from 'react-native-master-ui'

export default class App extends Component {

    render() {
        return (
            <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
                <Button
                    onPress={() => alert("Clicked!")}
                    title={'Sample Button'}
                    textStyle={{fontSize: 16}}
                    status={"info"} /// "info","info2","success","warning","danger"
                    style={{
                        marginTop: 5
                    }}
                    isLinear={true}
                    disable={false}
                    isLoading={false}
                    indicatorColor={"black"}
                />
            </View>
        )
    }
}

CardView

CardView Props

Prop | Type | Default | Description --------------------- | ------------ | ------------------------- | ----------- onPress | function() | undefine | The job you want to happen after click on card. (Do'nt use this props if you're card is not clickable!) avatarImage | string | null | The image top of card. (Does not show if not used) avatarImageStyle | object | {} | Add your custom style for avatar image. avatarTitle | string | null | Like names or user name ... . (Does not show if not used) avatarTitleStyle | object | {} | Add your custom style for avatar title. image | string | null | The image you want to show. (Does not show if not used) imageStyle | object | {} | Add your custom style for image. resizeMode | string | null | Change the resize mode of image for custom purpose. title | string | null | Title of what ever you want to show. (Does not show if not used) titleStyle | object | {} | Add your custom style for title. content | string | null | Description of what ever you want to show. (Does not show if not used) contentStyle | object | {} | Add your custom style for Description. numberOfLines | number | null | Number of "content" line you want to show. isFlat | boolean | false | There is two style "Card" if it's false and "Flat" if it's true. style | object | {} | Add your custom style for CardView. isRtlText | boolean | false | For the languges are right to left (like: farsi,arabic). isRtlAvatar | boolean | false | For the languges are right to left (like: farsi,arabic).

Example

import React, {Component} from 'react';
import {View,} from 'react-native';
import {CardView} from 'react-native-master-ui'

export default class App extends Component {

    render() {
        return (
            <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
                <CardView
                    onPress={() => alert('clicked!')}
                    avatarImage={{uri:'image link address'}}
                    avatarImageStyle={{width:20,height:20}}
                    avatarTitle={'UserName'}
                    avatarTitleStyle={{fontSize:10}}
                    image={{uri:'image link address'}}
                    imageStyle={{borderRadius: 5}}
                    resizeMode={'cover'}
                    title={"Title text"}
                    titleStyle={{fontFamily: 'my custom font'}}
                    content={'here is the description'}
                    contentStyle={{fontFamily: 'my custom font'}}
                    numberOfLines={2}
                    isFlat={false}
                    style={{backgroundColor: 'red'}}
                    isRtlText={false}
                    isRtlAvatar={false}
                >
                    <View>whatever can be here(like: buttons, links, texts...)</View>
                </CardView>
            </View>
        )
    }
}

ListItem

ListItem Props

Prop | Type | Default | Description --------------------- | ------------ | ------------------------- | ----------- onPress | function() | undefine | The job you want to happen after click on card.(Do'nt use this props if you're card is not clickable!) image | string | null | The image you want to show. imageStyle | object | {} | Add your custom style for image. title | string | null | Title of what ever you want to show. titleStyle | object | {} | Add your custom style for title. content | string | null | Description of what ever you want to show. contentStyle | object | {} | Add your custom style for Description. numberOfLines | number | null | Number of "content" line you want to show. isCard | boolean | false | There is two style "Card" if it's true and "Flat" if it's false. style | object | {} | Add your custom style for ListItem. isRtl | boolean | false | For the languges are right to left (like: farsi,arabic).

Example

import React, {Component} from 'react';
import {View,} from 'react-native';
import {ListItem} from 'react-native-master-ui'

export default class App extends Component {

    render() {
        return (
            <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
                <ListItem
                    onPress={() => alert('clicked!')}
                    image={{uri:''}}
                    imageStyle={{
                        borderRadius:5
                    }}
                    title={"Title text"}
                    titleStyle={{
                        fontFamily:'my custom font'
                    }}
                    content={'here is the description'}
                    contentStyle={{
                        fontFamily:'my custom font'
                    }}
                    numberOfLines={2}
                    isCard={false}
                    style={{
                        backgroundColor:'red'
                    }}
                    isRtl={false}
                />
            </View>
        )
    }
}

StarRate

StarsRate Props

Prop | Type | Default | Description --------------------- | ------------ | ------------------------- | ----------- onPress | function() | undefine | It will update the star count. if you don't want user able to change count of stars just remove this porps. starSelected | number | 0 | Count of selected stars. starStyle | object | {} | Add your custom style for each star. starColor | string | "gold" | Color of stars or hearts. starSize | number | 14 | Size of stars or hearts. isHeart | boolean | false | False will show "Stars" and true will show "Hearts"

Example

import React, {Component} from 'react';
import {View,} from 'react-native';
import {StarsRate} from 'react-native-master-ui'

export default class App extends Component {

    constructor(props) {
        super(props)
        this.state = {
            starCount: 3
        }
    }

    render() {
        return (
            <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
                <StarsRate
                    onPress={(starCount) => this.setState({starCount})}
                    starSelected={this.state.starCount}
                    starStyle={{
                        margin: 10,
                        backgroundColor: 'white'
                    }}
                    starColor={'red'}
                    starSize={20}
                    isHeart={false}
                />
            </View>
        )
    }
}

MIT Licensed