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-design-system

v2.0.5

Published

A reusabale component library and design rules for react-native.

Downloads

221

Readme

React Native Design System is a set of design rules and component library that lets you prototype faster with easy to use cross-platform components. Let's get started!

🏠 Homepage

📄 Documentation

Install

Simply go to the command line and run this command.

yarn add react-native-design-system

This library needs react-native-vector-icons so go on and install that too to get all the cool icons. Check out Install guide.

Usage

React Native Design System uses a centralized theme to provide consistency across all the components.

Step 1. Import ThemeProvider and theme then wrap your root component

This step is important. We are passing theme as context value that each component will access.

//your root component
import {ThemeProvider, theme} from 'react-native-design-system';

function App() {
  return (
    <ThemeProvider theme={theme} colorMode="light">
      <Root />
    </ThemeProvider>
  );
}

Step 2. Use component

//inside any file
import {Button} from 'react-native-design-system';

function HomeScreen() {
  return <Button>Press Me</Button>;
}

That's pretty much it. theme file contains configuration for all the components. Don't worry, you can easily customize it. Let me show how:

Customize

You just need to import theme, reassign the value you want to change and pass it to ThemeProvider. Example:
Default primary color is blue but you like orange so you can simply do:

import {ThemeProvider, theme} from 'react-native-design-system';

theme.colors.primary = 'orange';

function App() {
  return (
    <ThemeProvider theme={theme} colorMode="light">
      <Root />
    </ThemeProvider>
  );
}

And we are done!

You can see all the configurations available on the theme page.

If you have a lot of customizations

This is just a personal approach, you can do as you prefer. What I usually do is create a theme.config.js file and add all my customizations there.

//theme.config.js at root
import {theme} from 'react-native-design-system';

theme.colors.dark = {
  bg: {
    '100': '#fff',
    '200': '#f8f8f8',
    '300': '#f4f4f4',
  }
  heading: '#000',
  para: '#999',
  subtle: '#333',
  disabled: '#78909c',
  disabledText: '#78907c',
};

export default theme;

Now, I will just import theme from here and pass it to my ThemeProvider.

import {ThemeProvider} from 'react-native-design-system';
import theme from './theme.config.js';

function App() {
  return (
    <ThemeProvider theme={theme}>
      <Root />
    </ThemeProvider>
  );
}

Please make sure to pass all the keys while reassigning any object inside the theme.

Components included:

Author

👤 Shad Mirza

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page and contribution guidelines.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2019 Shad Mirza. This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator