0.1.12 • Published 8 years ago

react-grid-utilities v0.1.12

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

react-grid-utilities

Bootstrap v4 Grid Layout with ultilities for React

Imgur

Setup

npm i react-grid-utilities

Or

yarn add react-grid-utilities

Basic Usage

import { Grid, Row, Col } from 'react-grid-utilities'

export const Example = () => {
  return (
    <Grid fluid>
      <Row justifyContent="center" justifyContentMd="end">
        <Col xs={12} sm={10} md={8} />
        <Col xs={12} sm={10} md={8} />
        <Col xs={12} sm={10} md={8} />
      </Row>
    </Grid>
  )
}

Component Props

Grid

PropRequiredValuesResponsiveDescription
fluidNotrue, falseNoFull width container, spanning the entire width of the viewport

Row

PropRequiredValuesResponsiveDescription
roundedNotrue, top, left, bottom, right, 0NoRound element's corners.
alignContentNostart, end, center, between, around, stretchalignContent, alignContentSm, alignContentMd, alignContentLg,,alignContentXlIt helps to align a flex container's lines within it when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.
alignItemsNostart, end, center, baseline, stretchalignItems, alignItemsSm, alignItemsMd, alignItemsLg, alignItemsXlIt defines the default behaviour for how flex items are laid out along the cross axis on the current line.
justifyContentNostart, end, center, between, aroundjustifyContent, justifyContentSm, justifyContentMd, justifyContentLg, justifyContentXlIt defines the alignment along the main axis. It helps distribute extra free space leftover when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size. It also exerts some control over the alignment of items when they overflow the line.
mNo0, 1, 2, 3, 4, 5, autom, mSm, mMd, mLg, mXlSet margin for element
mtNo0, 1, 2, 3, 4, 5, automt, mtSm, mtMd, mtLg, mtXlSet margin-top for element
mbNo0, 1, 2, 3, 4, 5, automb, mbSm, mbMd, mbLg, mbXlSet margin-bottom for element
mlNo0, 1, 2, 3, 4, 5, automl, mlSm, mlMd, mlLg, mlXlSet margin-left for element
mrNo0, 1, 2, 3, 4, 5, automr, mrSm, mrMd, mrLg, mrXlSet margin-right for element
mxNo0, 1, 2, 3, 4, 5, automx, mxSm, mxMd, mxLg, mxXlSet horizontal margin for element
myNo0, 1, 2, 3, 4, 5, automy, mySm, myMd, myLg, myXlSet vertical margin for element
pNo0, 1, 2, 3, 4, 5p, pSm, pMd, pLg, pXlSet padding for element
ptNo0, 1, 2, 3, 4, 5pt, ptSm, ptMd, ptLg, ptXlSet padding-top for element
pbNo0, 1, 2, 3, 4, 5pb, pbSm, pbMd, pbLg, pbXlSet padding-bottom for element
plNo0, 1, 2, 3, 4, 5pl, plSm, plMd, plLg, plXlSet padding-left for element
prNo0, 1, 2, 3, 4, 5pr, prSm, prMd, prLg, prXlSet padding-right for element
pxNo0, 1, 2, 3, 4, 5px, pxSm, pxMd, pxLg, pxXlSet horizontal padding for element
pyNo0, 1, 2, 3, 4, 5py, pySm, pyMd, pyLg, pyXlSet vertical padding for element

Col

PropRequiredValuesResponsiveDescription
xsNoauto, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12xs, sm, md, lg, xlThe width of column
orderNo1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12order, orderSm, orderMd, orderLg, orderXlThe visual order of your content
alignSelfNostart, end, center, baseline, stretch, autoalignSelf, alignSelfSm, alignSelfMd, alignSelfLg, alignSelfXlIt makes possible to override the align-items value for specific flex items.
roundedNotrue, top, left, bottom, right, 0NoRound element's corners.
flexDirectionNorow, row-reverse, column, column-reverseflexDirection, flexDirectionSm, flexDirectionMd, flexDirectionLg, flexDirectionXlIt establishes the main-axis, thus defining the direction flex items are placed in the flex container.
flexWrapNowrap, wrap-reverse, nowrapflexWrap, flexWrapSm, flexWrapMd, flexWrapLg, flexWrapXlIt defines whether the flex items are forced into a single line or can be flowed into multiple lines. If set to multiple lines, it also defines the cross-axis which determines the direction new lines are stacked in.
displayNonone, inline, inline-block, block, table, table-cell, flex, inline-flexdisplay, displaySm, displayMd, displayLg, displayXlIncludes support for some of the more common values, as well as some extras for controlling display when printing.
alignContentdisplay="flex", display="inline-flex"start, end, center, between, around, stretchalignContent, alignContentSm, alignContentMd, alignContentLg,,alignContentXlIt helps to align a flex container's lines within it when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.
alignItemsdisplay="flex", display="inline-flex"start, end, center, baseline, stretchalignItems, alignItemsSm, alignItemsMd, alignItemsLg, alignItemsXlIt defines the default behaviour for how flex items are laid out along the cross axis on the current line.
justifyContentdisplay="flex", display="inline-flex"start, end, center, between, aroundjustifyContent, justifyContentSm, justifyContentMd, justifyContentLg, justifyContentXlIt defines the alignment along the main axis. It helps distribute extra free space leftover when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size. It also exerts some control over the alignment of items when they overflow the line.
mNo0, 1, 2, 3, 4, 5, autom, mSm, mMd, mLg, mXlSet margin for element
mtNo0, 1, 2, 3, 4, 5, automt, mtSm, mtMd, mtLg, mtXlSet margin-top for element
mbNo0, 1, 2, 3, 4, 5, automb, mbSm, mbMd, mbLg, mbXlSet margin-bottom for element
mlNo0, 1, 2, 3, 4, 5, automl, mlSm, mlMd, mlLg, mlXlSet margin-left for element
mrNo0, 1, 2, 3, 4, 5, automr, mrSm, mrMd, mrLg, mrXlSet margin-right for element
mxNo0, 1, 2, 3, 4, 5, automx, mxSm, mxMd, mxLg, mxXlSet horizontal margin for element
myNo0, 1, 2, 3, 4, 5, automy, mySm, myMd, myLg, myXlSet vertical margin for element
pNo0, 1, 2, 3, 4, 5p, pSm, pMd, pLg, pXlSet padding for element
ptNo0, 1, 2, 3, 4, 5pt, ptSm, ptMd, ptLg, ptXlSet padding-top for element
pbNo0, 1, 2, 3, 4, 5pb, pbSm, pbMd, pbLg, pbXlSet padding-bottom for element
plNo0, 1, 2, 3, 4, 5pl, plSm, plMd, plLg, plXlSet padding-left for element
prNo0, 1, 2, 3, 4, 5pr, prSm, prMd, prLg, prXlSet padding-right for element
pxNo0, 1, 2, 3, 4, 5px, pxSm, pxMd, pxLg, pxXlSet horizontal padding for element
pyNo0, 1, 2, 3, 4, 5py, pySm, pyMd, pyLg, pyXlSet vertical padding for element
0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago