# gridsys

> Fixed-width, Swiss-style responsive React grid system

Latest version **1.0.0-beta.5** (published 2016-10-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install gridsys
pnpm add gridsys
yarn add gridsys
bun add gridsys
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.5 |
| Published | 2016-10-01 |
| First published | 2016-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brent Jackson |
| Maintainers | jxnblk |
| Keywords | react, react-component, grid, layout, style, css-in-js |

## Links

- npm: https://www.npmjs.com/package/gridsys
- npm.io page: https://npm.io/package/gridsys

## Dependencies (2)

- [ruled](https://npm.io/package/ruled.md) ^1.0.0
- [classnames](https://npm.io/package/classnames.md) ^2.2.5

## 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

- 1.0.0-beta.5 (latest) — 2016-10-01
- 1.0.0-beta.4 — 2016-09-29
- 1.0.0-beta.3 — 2016-09-22
- 1.0.0-beta.2 — 2016-09-22
- 1.0.0-beta.1 — 2016-09-19

## README

# Gridsys

[![Build Status](https://travis-ci.org/jxnblk/gridsys.svg?branch=master)](https://travis-ci.org/jxnblk/gridsys)

Fixed-width, Swiss-style responsive React grid system

Gridsys is intended for full-page layouts with fixed-width columns that collapse at narrow viewport widths.
Paired with a sensible type scale, gridsys can help create harmonious layouts with a natural visual rhythm.


## Features

- Responsive
- Configurable
- Consistent proportions
- Conforms to type scales
- Based on a 16px scale
- Simple API
- Nestable
- No external stylesheets
- Modern
- Swiss
- International
- Typographic

## Getting Started

```sh
npm i gridsys
```

```js
import React from 'react'
import { Container, Grid } from 'gridsys'

const App = () => {
  return (
    <Container>
      <Grid span={2}>
        <h1>Grid</h1>
      </Grid>
      <Grid span={3}>Span 3</Grid>
      <Grid>Span 1</Grid>
    </Container>
  )
}
```


## `<Container />`

Wrapper component for centering Grid cells across multiple breakpoints.

**Props**

- `debug` (boolean) - shows an outline and background grid for debugging visual layout


## `<Grid />`

Fixed-width grid cell with built-in gutters

**Props**

- `span` (number) - number of columns for the grid cell to span
- `align` (string) - vertical alignment
- `height` (number) - fixed height in pixels
- `gutter` (number) - gutter (padding) in pixels
- `debug` (boolean) - shows outlines for debugging


## `<GridGroup />`

Grid component with no gutters useful for nesting.
Uses the same props as the Grid component.


## Context Configuration

The grid system can be configured with React context.

```js
class App extends React.Component {
  getChildContext () {
    return {
      gridsys: {
        gutter: 16,
        columnWidth: 320,
        columnCount: 5,
        debug: true
      }
    }
  }
  render () {
    <Container>
      <Grid span={3}>
        <h1>Span 3</h1>
      </Grid>
      <Grid span={2}>
        <p>Span 2</p>
      </Grid>
    </Container>
  }
}

App.childContextTypes = {
  gridsys: React.PropTypes.object
}
```

- `gutter` (number) - gutter (padding) in pixels for each Grid component
- `columnWidth` (number) - width in pixels for each Grid width. Spans are mutiplied by this number
- `columnCount` (number) - total number of columns for the grid system to span
- `debug` (boolean) - show outlines and background grid for debugging layout


MIT License

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