0.2.0 • Published 2 years ago

@djx/grid v0.2.0

Weekly downloads
137
License
ISC
Repository
-
Last release
2 years ago

@djx/grid

Representing a configurable flexgrid

Installation

npm install --save @djx/grid

Usage

Make sure you import the component somewehere in your application first:

import '@djx/grid';

You can then use it like normal web components in your markup:

<djx-grid>
  <djx-grid-row>
    <djx-grid-col xs="12" lg="6">
      <span>Width 12 at XS and 6 at LG</span>
    </djx-grid-col>
    <djx-grid-col xs="12" lg="6">
      <span>Width 12 at XS and 6 at LG</span>
    </djx-grid-col>
  </djx-grid-row>
  <djx-grid-row>
    <djx-grid-col xs="12" lg="[6, 3]">
      <span>Width 12 at XS and 6 with 3 offset at LG</span>
    </djx-grid-col>
    <djx-grid-col xs="12" lg="[6, 3]">
      <span>Width 12 at XS and 6 with 3 offset at LG</span>
    </djx-grid-col>
  </djx-grid-row>
  <djx-grid-row>
    <djx-grid-col xs="6" lg="[6, 0, 2]">
      <span>Width 6 at XS and 6 with 0 offset and switched order at LG</span>
    </djx-grid-col>
    <djx-grid-col xs="6" lg="[6, 0, 1]">
      <span>Width 6 at XS and 6 with 0 offset switched order at LG</span>
    </djx-grid-col>
  </djx-grid-row>
</djx-grid>

The value for the breakpoints has always this format: number or [ number, number?, number? ]

[ number, number?, number? ] translates to width, offset, order

Variables

NameDescriptionDefault
DJX_GRID.columnsThe max colums to render12
DJX_GRID.gutterMinMin width of the gutter20px
DJX_GRID.gutterMaxMax width of the gutter20px
DJX_GRID.marginMinMin left and right margin30px
DJX_GRID.marginMaxMax left and right margin70px

For more variables see here

0.2.0

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.3

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago