# @djx/grid

> Configurable flexgrid made with lit-element

Latest version **0.2.0** (published 2023-08-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install @djx/grid
pnpm add @djx/grid
yarn add @djx/grid
bun add @djx/grid
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-08-16 |
| First published | 2020-05-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dorfjungs.account, schmidtsonian, joshuakeck |
| Keywords | flexbox, grid, flexgrid, lit-element |

## Links

- npm: https://www.npmjs.com/package/@djx/grid
- Repository: git@git.dorfjungs.io:dorfjungs/djx-litbase
- npm.io page: https://npm.io/package/@djx/grid

## Dependencies (3)

- [lit](https://npm.io/package/lit.md) ^2.0.2
- [tslib](https://npm.io/package/tslib.md) ^1.11.1
- [@djx/scss](https://npm.io/package/@djx/scss.md) ^0.2.0

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2023-08-16
- 0.1.10 — 2023-01-31
- 0.1.9 — 2023-01-31
- 0.1.8 — 2022-12-14
- 0.1.7 — 2022-12-14
- 0.1.6 — 2022-12-14
- 0.1.5 — 2022-12-14
- 0.1.4 — 2022-08-29
- 0.1.3 — 2021-11-10
- 0.1.2 — 2021-11-10
- 0.1.1 — 2021-11-04
- 0.1.0 — 2021-11-04
- 0.0.12 — 2021-03-10
- 0.0.11 — 2021-02-10
- 0.0.9 — 2020-08-10
- … 8 more at https://npm.io/package/@djx/grid/versions

## README

# @djx/grid
Representing a configurable flexgrid

## Installation
```sh
npm install --save @djx/grid
```

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

```js
import '@djx/grid';
```

You can then use it like normal web components in your markup:
```html
<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
| 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](../scss/README.md)

---
_Source: https://npm.io/package/@djx/grid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
