2.0.0-0 • Published 7 years ago

react-css-grid v2.0.0-0

Weekly downloads
400
License
MIT
Repository
-
Last release
7 years ago

React CSS Grid

React layout component based on CSS Grid Layout and built with styled-components

Build Status

http://jxnblk.com/react-css-grid

npm i react-css-grid
// Example usage
import React from 'react'
import Grid from 'react-css-grid'

class App extends React.Component {
  render () {
    return (
      <Grid
        width={320}
        gap={24}>
        <div>Column</div>
        <div>Column</div>
        <div>Column</div>
        <div>Column</div>
      </Grid>
    )
  }
}

Features

  • Responsive grid layout with zero media queries
  • Simple API for handling tiled layouts
  • Customizable column width and gutters

Props

width (number or string)

Sets the width at which child elements will break into columns. Pass a number for pixel values or a string for any other valid CSS length.

<Grid width={512} />

gap (number or string)

Sets the gutter (grid-gap) between columns. Pass a number for pixel values or a string for any other valid CSS length.

<Grid gap={16} />

align (string)

Sets align-items to control child element alignment.

Browser Support

See http://caniuse.com/#feat=css-grid

Related

MIT License

2.0.0-0

7 years ago

1.0.0-beta.1

8 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago