Package Exports
- flexbox-react
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (flexbox-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
flexbox-react
What
Unopinionated, standard compilant flexbox components.
Why
You should not learn any propietary syntax, classnames or API's.
If you know how to use flexbox, you know how to use flexbox-react components.
No more <Box>, <SpacedBox>, <Column>, <View>, <Section> or any other
arbitrarily named and spec ed components to layout your apps.
No more first={true}, ternary={true}, spaced={true},grouped={true}
or any other arbitrarily named and spec ed props to layout your apps.
Finally, you get to see your code and figure out how your components are laid out without jumping between css files. Leave css files for the looks and actual aesthetics. On the React mindset, some inline stuff is good. Relax.
How
No hardcoded, bloated, unnecesary vendor prefixes, by
caniuse. Just those your browser needs, based
on your userAgent.
No need to import any new stylesheet or to add any styles to your existing stylesheets. It works out of the box, just by using the component.
Install
npm install --save flexbox-reactUsage
import { Flexbox, FlexItem } from "flexbox-react";
//...
<Flexbox flexDirection="column" minHeight="100vw">
<FlexItem height="60px">
Header
</FlexItem>
<FlexItem flex="1">
Content
</FlexItem>
<FlexItem height="60px">
Footer
</FlexItem>
</Flexbox>Sticky footer!
Props
Take a look at Flexbox PropTypes and FlexItem PropTypes. No mysteries. As said, you just need to know actual flexbox properties not any propietary syntax for them, if you're not familiar with flexbox, here is a good starting point.
License
MIT © Ignacio Álvarez