An open API service indexing awesome lists of open source software.

https://github.com/fakundo/react-grid-is-good

React grid system
https://github.com/fakundo/react-grid-is-good

Last synced: 6 months ago
JSON representation

React grid system

Awesome Lists containing this project

README

          

# React Grid System

[![npm](https://img.shields.io/npm/v/react-grid-is-good.svg?maxAge=2592000)](https://www.npmjs.com/package/react-grid-is-good)

### Installation
```
npm install react-grid-is-good
```

### Features
- inline styles
- flex
- responsive
- custom breakpoints with your own names
- automatically breaks overflowing rows
- based on Bootstrap styles

### Examples
```js
import React, { Component } from 'react';
import { Grid, Span, Visible, Hidden } from 'react-grid-is-good';

class GridComponent extends Component {
render() {
return (



#1
#2



#1
#2



#1
#2
#3
#4
#5



#1
#2



#1
#2



#1
#2



I am visible when breakpoint is "tablet" or "mobile"


I am hidden when breakpoint is "md" or "lg"


);
}
}
```

### Component properties
#### Grid

- **`breakpoint`** `{string} [breakpoint]`
- **`size`** `{number} [size=12]`
- **`gutter`** `{number} [gutter=0]`
- **`align`** `{string} [align='left']`
- **`valign`** `{string} [valign='top']`
- ...props based on your breakpoint, for example if you pass `breakpoint="desktop"` and `sizeDesktop="12"` then size will be `12`

#### Span

- **`size`** `{string} [size=1]`
- **`pull`** `{string} [pull=0]`
- **`push`** `{string} [push=0]`
- **`offset`** `{string} [offset=0]`
- **`break`** `{boolean} [break=false]`
- **`align`** `{string} [align='left']`
- **`valign`** `{string} [valign='top']`
- ...props based on your breakpoint

#### Visible

- **`breakpoint`** `{string} [breakpoint]`
- ...your breakpoints to set visibility`

#### Hidden

- **`breakpoint`** `{string} [breakpoint]`
- ...your breakpoints to set visibility`

### How to use
You should wrap all components and pass to them your own "breakpoint" property.
This property can be calculated the way you like.