StyleBox is a React component system for styling your app. Uses custom components which can be composed easily and easy styling through props. Based mostly on UI component system from Danie Steigerwald => https://medium.com/@steida/css-in-js-the-argument-refined-471c7eb83955
VWIP = Very Work In Progress
Not ready for production use
Stylebox has 3 parts:
- Components to style the page generally
- Grid system components
- Fela renderer
Stylebox is originally based on fela, but isn't dependent on it. You can supply your own renderer to <Styler /> and components will use it.
- Styler
- reset and global styles
- renderer
- theme
- commponents
- guidelines
- storybook
- dev
Use <Styler /> to supply renderer, theme and icons to context of components.
<Styler renderer={renderer} theme={theme} icons={icons}>
<App />
</Styler>- renderer (Renderer) - Renderer to render styles to classNames. Recommended is fela renderer
- theme (UserTheme) - Theme declarations for styling
- Icons (Icons)
Get fela renderer:
import { getRenderer } from 'react-stylebox/felaRenderer';and use supply it to Styler
<Styler renderer={getRenderer(theme, fonts)}>// TODO