- Notifications
You must be signed in to change notification settings - Fork116
Cross Platform React Native Material Design Components
License
codypearce/material-bread
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Cross Platform React Native Material Design Components
- 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
- Quick Start
- Documentation
- Getting Started
- Supported Components
- Contributing
- Tests
- Accessibility
- Copyright and License
npm install material-bread
oryarn add material-bread
- Install and linkreact-native-vector-icons andreact-native-svg
- Wrap your root
<App>
with a<BreadProvider>
<BreadProvider><Root/></BreadProvider>
- Start developing!
Read thegetting started guides for your platform to learn more.
The component API docs and curated demos can be found atmaterial-bread.org. See thecontributing section to learn how to run the docs locally.
More demos for each component can be found at the componentStorybook. This environment is used for developing cross-platform, see thecontributing section to learn how to set it up locally.
Getting Started with React Native
Getting Started with Vue Native
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
importReactfrom'react';import{Button}from'material-bread';functionApp(){return<Buttontype="contained">Click Me</Button>;}

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 | ✓ | ✓ | ✓ | ✓ |
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.
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 platformshere. 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.
Documentation is built usingGatsbyJs and all pages are built using react components. You can learn how to get the docs running locallyhere.
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.
Jest is the current test framework for all components. You can see the result of each component test in ourstorybook 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 usingnpm test
.
You can generate test coverage by runningnpm run test:generate-output
, this will output a json file with coverage.
react-native-web
describes how to write accessible react-native components on the webhere. 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 theAccessibility tab for each component. Please consider contributing to make accessibility even better.
Copyright 2019 Material Bread.Code released under the MIT license.
About
Cross Platform React Native Material Design Components
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.