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

material-bread

v0.2.10

Published

Highly customizable React Native Material Design Components.

Downloads

293

Readme

Build Status NPM registry Code style NPM license Storybook

Features

  • Highly Customizable React Native Components.
  • Cross platform support: React Native (iOS, Android), React-native-web (Browsers), Electron (Windows, Mac, Linux), react-native-windows, react-native-macos, Next.js, Expo, Vue Native
  • Support for Material Design 2.0 components.
  • Live react native demos you can edit in in your browser.
  • Typescript support

Table of Contents

Quick Start

  1. npm install material-bread or yarn add material-bread
  2. Install and link react-native-vector-icons and react-native-svg
  3. Wrap your root <App> with a <BreadProvider>
<BreadProvider>
  <Root />
</BreadProvider>
  1. Start developing!

Read the getting started guides for your platform to learn more.

Documentation

The component API docs and curated demos can be found at material-bread.org. See the contributing section to learn how to run the docs locally.

More demos for each component can be found at the component Storybook. This environment is used for developing cross-platform, see the contributing section to learn how to set it up locally.

Getting Started

Guides

Getting Started with React Native

Getting Started with Web

Getting Started with Electron

Getting Started with MacOS

Getting Started with Windows

Getting Started with NextJS

Getting Started with Expo

Getting Started with Vue Native

Example Repos

Boilerplate projects with minimal configuration to get started on each platform.

React Native: material-bread-rn-example

React Web: material-bread-react-example

Electron: material-bread-electron-example

MacOS: material-bread-macos-example

Windows: material-bread-windows-example

NextJS: material-bread-next-example

Expo: material-bread-expo-example

Vue Native: material-bread-vue-native-example

Usage

import React from 'react';
import { Button } from 'material-bread';

function App() {
  return <Button type="contained">Click Me</Button>;
}

Sponsored By

Supported Components

A major goal of this library is to match all the components found in the material docs or provide enough demos/instructions that a developer can create a non-supported component from supported components. Keep in mind this still a work in progress so not all functionality from the Material Docs is supported yet.

Currently there are 39 distinct components (though what is a full component and what is a subcomponent is somewhat arbitrary), each with many variations, and 4 utility components.

| Name | iOS | Android | Web | Electron | | ---------------------------------------------------------------------------- | --- | ------- | --- | -------- | | Appbar | ✓ | ✓ | ✓ | ✓ | | AppbarBottom | ✓ | ✓ | ✓ | ✓ | | Avatar | ✓ | ✓ | ✓ | ✓ | | Backdrop | ✓ | ✓ | ✓ | ✓ | | Badge | ✓ | ✓ | ✓ | ✓ | | Banner | ✓ | ✓ | ✓ | ✓ | | Bottom Navigation | ✓ | ✓ | ✓ | ✓ | | Button | ✓ | ✓ | ✓ | ✓ | | Card | ✓ | ✓ | ✓ | ✓ | | Checkbox | ✓ | ✓ | ✓ | ✓ | | Chip | ✓ | ✓ | ✓ | ✓ | | DataTable | ✓ | ✓ | ✓ | ✓ | | Dialog | ✓ | ✓ | ✓ | ✓ | | Divider | ✓ | ✓ | ✓ | ✓ | | Drawer | ✓ | ✓ | ✓ | ✓ | | DrawerBottom | ✓ | ✓ | ✓ | ✓ | | Fab | ✓ | ✓ | ✓ | ✓ | | FabSpeeddial | ✓ | ✓ | ✓ | ✓ | | Icon | ✓ | ✓ | ✓ | ✓ | | IconButton | ✓ | ✓ | ✓ | ✓ | | List | ✓ | ✓ | ✓ | ✓ | | ListExpand | ✓ | ✓ | ✓ | ✓ | | Menu | ✓ | ✓ | ✓ | ✓ | | Paper | ✓ | ✓ | ✓ | ✓ | | ProgressBar | ✓ | ✓ | ✓ | ✓ | | ProgressCircle | ✓ | ✓ | ✓ | ✓ | | RadioButton | ✓ | ✓ | ✓ | ✓ | | Ripple | ✓ | ✓ | ✓ | ✓ | | Select | ✓ | ✓ | ✓ | ✓ | | SheetBottom | ✓ | ✓ | ✓ | ✓ | | SheetSide | ✓ | ✓ | ✓ | ✓ | | Slider | ✓ | ✓ | ✓ | ✓ | | Snackbar | ✓ | ✓ | ✓ | ✓ | | SwipeNav | ✓ | ✓ | ✓ | ✓ | | Switch | ✓ | ✓ | ✓ | ✓ | | Tabs | ✓ | ✓ | ✓ | ✓ | | TextField | ✓ | ✓ | ✓ | ✓ | | ToggleButton | ✓ | ✓ | ✓ | ✓ | | Tooltip | ✓ | ✓ | ✓ | ✓ | | Typography | ✓ | ✓ | ✓ | ✓ |

Utility components

| Name | iOS | Android | Web | Electron | | ------------------------------------------------------- | --- | ------- | --- | -------- | | Anchor | ✓ | ✓ | ✓ | ✓ | | Color | ✓ | ✓ | ✓ | ✓ | | Hoverable | ✓ | ✓ | ✓ | ✓ | | Shadow | ✓ | ✓ | ✓ | ✓ |

Contributing

All contributions are welcome and encouraged. If you are reporting a bug, please follow the bug issue template. If you are proposing an enhancement, please first search the backlogs before creating a new issue.

Contribute to library

Storybook is used as the dev environment for all components on all platforms. You can learn about how to get the storybook environment running locally for all platforms here. Please follow the conventions already in place. For example, most components follow the made up "props for prebuilt, children for custom" pattern. Additionally, make sure you are testing your components across platforms before making a PR.

Contribute to docs

Documentation is built using GatsbyJs and all pages are built using react components. You can learn how to get the docs running locally here.

Easy first contribution

You can start contribute extremely easily by improving demos or adding more interesting demos to the docs or storybook. Interesting, useful, and plentiful demos is a major goal of the project, so any help in that regard would be greatly appreciated.

Tests

Jest is the current test framework for all components. You can see the result of each component test in our storybook environement under the "Tests" tab. Writing more comprehensive tests is on the roadmap, but please consider contributing to speed this process up.

You can run tests locally using npm test.

You can generate test coverage by running npm run test:generate-output, this will output a json file with coverage.

Accessibility

react-native-web describes how to write accessible react-native components on the web here. Additionally, the storybook addon, addon-a11y, runs some simple accessibility tests on each component story. You can see the output of each accessibility test on the Accessibility tab for each component. Please consider contributing to make accessibility even better.

Copyright and License

Copyright 2019 Material Bread. Code released under the MIT license.