Aphro
An unopinionated set of user interface elements for React
Install
yarn add aphro
Setup
Aphro makes use of React's context for configuration. Here's an example of a basic configuration.
1. Create a root component
// Theme.js const Theme = propschildren ThemecontextTypes = aphro: PropTypesshape config: PropTypesobject classNames: PropTypesobject ThemechildContextTypes = aphro: config classNames:
2. Create a theme
// config.jsconst Button = extraSmall: height: 10 small: height: 20 medium: height: 30 large: height: 40
3. Wrap your application
withClassNames
// Application.js const enhance = withClassNames <div className=> <div className=> Sidebar </div> <div className=> Content </div> </div>
aphro classNames
container flex flexWrap alignFlexStart alignCenter alignFlexEnd justifyFlexStart justifyCenter justifyFlexEnd col{1-12}{xs|sm|md|lg|xl}
Contributing
Contributions welcome! Please read the contributing guidelines first.