react-css-grid

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

Github stars Tracking Chart

React CSS Grid

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

Build Status
GitHub

Demo

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

MIT License

Main metrics

Overview
Name With Ownerramda/ramda-fantasy
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-12-02 19:08:53
Pushed At2022-01-31 13:41:16
Last Commit At2022-01-31 13:41:16
Release Count10
Last Release Namev0.8.1 (Posted on 2017-11-28 17:06:23)
First Release Namev0.2.0 (Posted on )
用户参与
Stargazers Count1.5k
Watchers Count53
Fork Count93
Commits Count192
Has Issues Enabled
Issues Count77
Issue Open Count20
Pull Requests Count87
Pull Requests Open Count1
Pull Requests Close Count13
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private