0.2.0 • Published 2 years ago
@djx/grid v0.2.0
@djx/grid
Representing a configurable flexgrid
Installation
npm install --save @djx/gridUsage
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:
numberor[ number, number?, number? ]
[ number, number?, number? ]translates to width, offset, order
Variables
| Name | Description | Default | |
|---|---|---|---|
| DJX_GRID.columns | The max colums to render | 12 | |
| DJX_GRID.gutterMin | Min width of the gutter | 20px | |
| DJX_GRID.gutterMax | Max width of the gutter | 20px | |
| DJX_GRID.marginMin | Min left and right margin | 30px | |
| DJX_GRID.marginMax | Max left and right margin | 70px |
For more variables see here
0.2.0
2 years ago
0.1.10
3 years ago
0.1.9
3 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
5 years ago
0.0.11
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago