1.0.1 • Published 8 years ago
react-flexboxgrid v1.0.1
React Flexbox Grid
http://flexboxgrid.com/ ported to react components.
Installation
npm install react-flexboxgrid --saveUsage
import { Grid, Row, Col } from 'react-flexboxgrid';
<Grid fluid>
<Row>
<Col xs={12} md={6}>
Grid Column!
</Col>
<Col xs={12} md={6}>
Grid Column!
</Col>
</Row>
</Grid>Grid Props
fluid(bool) : responsive grid or notnodeName(string) : the element's node name (default'div')
All other props applied directly to the grid element.
Row Props
xsHAlign(string) (CSS?-xs) : horizontal alignment :'start','center', or'end'smHAlign(string) (CSS?-sm) : horizontal alignment :'start','center', or'end'mdHAlign(string) (CSS?-md) : horizontal alignment :'start','center', or'end'lgHAlign(string) (CSS?-lg) : horizontal alignment :'start','center', or'end'xsVAlign(string) (CSS?-xs) : vertical alignment :'top','middle', or'bottom'`smVAlign(string) (CSS?-sm) : vertical alignment :'top','middle', or'bottom'mdVAlign(string) (CSS?-md) : vertical alignment :'top','middle', or'bottom'lgVAlign(string) (CSS?-lg) : vertical alignment :'top','middle', or'bottom'xsDistribution(string) (CSS?-xs) : distribution :'around', or'between'smDistribution(string) (CSS?-sm) : distribution :'around', or'between'mdDistribution(string) (CSS?-md) : distribution :'around', or'between'lgDistribution(string) (CSS?-lg) : distribution :'around', or'between'reverse(bool) (CSSreverse) : reverse ordering of all columnsnodeName(string) : the element's node name (default'div')
All other props applied directly to the grid element.
Col Props
xs(number|bool) (CSScol-xs,col-xs-?) : the column size :1...12, ortruesm(number|bool) (CSScol-sm,col-sm-?) : the column size :1...12, ortruemd(number|bool) (CSScol-md,col-md-?) : the column size :1...12, ortruelg(number|bool) (CSScol-lg,col-lg-?) : the column size :1...12, ortruexsOffset(number) (CSScol-xs-offset-?) : offset column :1...12smOffset(number) (CSScol-sm-offset-?) : offset column :1...12mdOffset(number) (CSScol-md-offset-?) : offset column :1...12lgOffset(number) (CSScol-lg-offset-?) : offset column :1...12xsReorder(string) (CSS?-xs) : reorder column :'first', or'last'smReorder(string) (CSS?-sm) : reorder column :'first', or'last'mdReorder(string) (CSS?-md) : reorder column :'first', or'last'lgReorder(string) (CSS?-lg) : reorder column :'first', or'last'reverse(bool) (CSSreverse) : reverse ordering for this columnnodeName(string) : the element's node name (default'div')
All other props applied directly to the grid element.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
License
The MIT License