1.4.2 • Published 3 years ago

@invisionag/iris-react-grid v1.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago
import { GridContainer, GridX, Cell } from '@invisionag/iris-react-grid';

iris-react-grid offers a collection of layout components to place other components on a fully responsive grid. It's based on the XY Grid from ZURB's Foundation 6 for Sites.

Usage

Please do not apply other styles or classes to any of the following components as it can break the Foundation grid. Please use new wrapper elements inside Cell if you want to add new paddings, etc.

GridContainer

The GridContainer component provides the outer frame for all subsequent content.

In its standard version, the grid container will be centered at a max-width of 1200px.

Every single page inside injixo has to use that content container component to ensure consistency across apps.

There are no other direct children allowed than the GridX component.

Props

fluid

fluid?: boolean;

Adding the prop fluid results in a full width grid.


GridX

The GridX component is another wrapper provided by Foundation that allows us to divide horizontal space into columns. Inside this component only Cell is allowed. This component has no Props.


Cell

The Cell component allows us to place and adjust content on a horizontal axis.

Props

size

size: number | number[];

Adding numbers as array allows for a dynamic resizing based on Foundation's breakpoints (small, medium, large).

Example:

<Cell size={[12, 3, 1]} />

Results in having a cell at 12 column width on small, 3 column width on medium and 1 column width on large.

offset

offset?: number | number[];

Adding an offset to a cell provides an easy way to skip a certain number of columns. It follows the same array principle as in sizes.

Example:

<Cell offset={[0, 0, 2]} />

In this example we'd move our cell two columns to the right when the viewport is >= large.

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.19

4 years ago

1.3.17

4 years ago

1.3.16

4 years ago

1.3.15

4 years ago

1.3.14

4 years ago

1.3.13

4 years ago

1.3.12

4 years ago

1.3.11

4 years ago

1.3.10

4 years ago

1.3.9

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.5-alpha.0

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.0

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.1-alpha.4614

5 years ago

1.1.1-alpha.4612

5 years ago

1.1.1-alpha.4611

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.1-alpha.4576

5 years ago