Giter VIP home page Giter VIP logo

deku-grid's Introduction

deku-grid

Deku components for a grid based on suitcss/components-grid

Usage

import { Grid, Cell } from 'dominicbarnes/deku-grid';


export function render({ props }) {
  return (
    <Grid gutter>
      <Cell size="1of3">Nav</Cell>
      <Cell size="2of3">Main</Cell>
    </Grid>
  );
}

Dependencies

This automatically includes suitcss/components-grid and suitcss/utils-size.

Grid

This is the main container for your grid, includes the Grid class only by default.

Attributes

gutter

When this boolean flag is set, the Grid--withGutter class will be added.

center

When this boolean flag is set, the Grid--alignCenter class will be added.

right

When this boolean flag is set, the Grid--alignRight class will be added.

middle

When this boolean flag is set, the Grid--alignMiddle class will be added.

bottom

When this boolean flag is set, the Grid--alignBottom class will be added.

Cell

This is the main container each of for your grid cells, includes the Grid-cell class only by default.

Attributes

size

This is a required attribute, as excluding it makes little sense. (however, it won't throw an error) It can be any of the following values:

  • fit
  • fit-alt
  • fill
  • fill-alt
  • full
  • {X}of{Y} (eg: "1of2", "2of3", "5of6")

center

When this boolean flag is set, the Grid-cell--center class will be added.

deku-grid's People

Contributors

dominicbarnes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jameszmartin

deku-grid's Issues

Consider s/Grid/Arrange

I've have been using something like Arrange for a while and I sort of have the feeling that a Grid is redundant.

Arrange is more powerful and paired up with utils-size gives you the same tools to build layouts that you get from Grid (without the awkward font-size reset thing :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.