Coder Social home page Coder Social logo

react-simple-flexgrid's Introduction

react-simple-flexgrid

A stupid simple flexbox grid system for React. The goal is to provide a minimal approach to a grid system using flexbox, some browser watching magic, and some other goodies to allow all react users get beautiful layouts easily.

Table of Contents

Installation

yarn add react-simple-flexgrid

Usage

  <Grid>
    <Row>
      <Column xs={1} hideSm>
        <p>Column with a flex value of 1 and will not show when the browser is considered "small"</p>
      </Column>
      <Column xs={2}>
        <p>Column with a flex value of 2</p>
      </Column>
      <Column xs={1} md={3}>
        <p>Column with a flex value of 1 on the smallest screen and a flex value of 3 on a medium screen</p>
      </Column>
    </Row>
  </Grid>

Components

Grid

The grid component is the base flex component used to contain Row components, similar to the many popular grid frameworks.

prop type default value description
nogutter bool false Passed to the Columns in a Grid to remove the horizontal padding
rowpadding number 5 Set the vertical padding of rows in pixels

Row

The row is the immediate and only child in a Grid, used to vertically separate content. Its immediate children are Column components

prop type default value description
nogutter bool false Passed to the Columns in a Grid to remove the horizontal padding
rowpadding number 5 Set the vertical padding of rows in pixels
stack bool false flag to change the flex-direction to column instead of the default row

Column

License

MIT © Miguel Caballero

react-simple-flexgrid's People

Contributors

mcabs3 avatar

Watchers

 avatar  avatar

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.