npm i rebass-native
Rebass-native is a port of Rebass, a library of highly-composable, primitive UI components for React, built with styled-components to keep styles isolated and reduce the need to write custom Styles in your application. Based upon a configurable design system, Rebass‘s props API makes building consistent, responsive web apps simpler and faster.
import React from 'react'import Provider Heading Button from 'rebass-native'const App =<Provider><Heading>Hello</Heading><Button>Rebass</Button></Provider>
- Kickstart your own react-native component library
- Responsive style props from styled-system
- Flexbox grid with native-grid-styled
- Support for styled-components
- Functional stateless UI components
- Configurable theming
- Extensible base components
- Design-system based consistency
- Built for responsive web design
Try it out:
Rebass is built around a component architectural approach inspired by Dan Abramov’s Presentational and Container Components, where presentational components are the only ones that encapsulate styles and contain no application logic, and container components do not contain any styles or DOM markup and handle all the application logic.
See Patterns for Style Composition in React for more on some of the thought behind Rebass.