react-css-grid

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

Github星跟踪图

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

主要指标

概览
名称与所有者ramda/ramda-fantasy
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2014-12-02 19:08:53
推送于2022-01-31 13:41:16
最后一次提交2022-01-31 13:41:16
发布数10
最新版本名称v0.8.1 (发布于 2017-11-28 17:06:23)
第一版名称v0.2.0 (发布于 )
用户参与
星数1.5k
关注者数53
派生数93
提交数192
已启用问题?
问题数77
打开的问题数20
拉请求数87
打开的拉请求数1
关闭的拉请求数13
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?