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
關注者數52
派生數92
提交數192
已啟用問題?
問題數77
打開的問題數20
拉請求數87
打開的拉請求數1
關閉的拉請求數13
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?