All Projects → swiftcarrot → react-grid

swiftcarrot / react-grid

Licence: MIT license
react grid component

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-grid

react-github-contribution-calendar
A React component for GitHub-like heatmap calendar
Stars: ✭ 100 (+488.24%)
Mutual labels:  react-component
griding
🧱 lean grid & responsive for react
Stars: ✭ 18 (+5.88%)
Mutual labels:  react-component
Registration-and-Login-using-MERN-stack
Simple Registration and Login component with MERN stack
Stars: ✭ 210 (+1135.29%)
Mutual labels:  react-component
Figicons
📦 150+ packaged & ready icons, designed in Figma. Ships with support for custom line icons.
Stars: ✭ 20 (+17.65%)
Mutual labels:  react-component
react-octicon
A GitHub Octicons icon React component
Stars: ✭ 76 (+347.06%)
Mutual labels:  react-component
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+400%)
Mutual labels:  react-component
react-amap
基于 React 封装的高德地图组件,助你轻松的接入高德地图到 React 项目中。
Stars: ✭ 73 (+329.41%)
Mutual labels:  react-component
react-mason
React Masonry grid
Stars: ✭ 13 (-23.53%)
Mutual labels:  react-component
react-dice-complete
Complete dice rolling functionality and animations
Stars: ✭ 60 (+252.94%)
Mutual labels:  react-component
react-native-tabbar
A tabbar component for React Native
Stars: ✭ 59 (+247.06%)
Mutual labels:  react-component
react-super-styled
Responsive JSX layouts with Styled Components
Stars: ✭ 77 (+352.94%)
Mutual labels:  react-component
whatsapp-clone-react
Build a WhatsApp Clone with React JS and FireBase.
Stars: ✭ 38 (+123.53%)
Mutual labels:  react-component
best-of-react
🏆 A ranked list of awesome React open-source libraries and tools. Updated weekly.
Stars: ✭ 364 (+2041.18%)
Mutual labels:  react-component
react-notification-alert
React bootstrap 4 notification alert
Stars: ✭ 34 (+100%)
Mutual labels:  react-component
vscode-exts
Visual Studio Code Extensions
Stars: ✭ 33 (+94.12%)
Mutual labels:  react-component
React-Jupyter-Viewer
A react component to embed .ipyb notebooks in a blog or something
Stars: ✭ 50 (+194.12%)
Mutual labels:  react-component
insect
🛠 Highly customisable, minimalistic input x select field for React.
Stars: ✭ 33 (+94.12%)
Mutual labels:  react-component
react-scroll-trigger
📜 React component that monitors scroll events to trigger callbacks when it enters, exits and progresses through the viewport. All callback include the progress and velocity of the scrolling, in the event you want to manipulate stuff based on those values.
Stars: ✭ 126 (+641.18%)
Mutual labels:  react-component
React-Express-JWT-UserPortal
React.js & Express.js User portal Using Core UI, JWT, JWT Token, Refresh Token, Role & Permission management, User manamgenet, Event Log.
Stars: ✭ 22 (+29.41%)
Mutual labels:  react-component
picker
📅 All Date Pickers you need.
Stars: ✭ 185 (+988.24%)
Mutual labels:  react-component

react-grid

npm npm Build Status codecov styled with prettier

React grid component

Installation

npm install react-grid --save
yarn add react-grid

Demo

https://swiftcarrot.dev/react-grid

Basic Usage

import React from 'react';
import { Container, Row, Col } from 'react-grid';

function App() {
  return (
    <Container>
      <Row>
        <Col />
        <Col />
      </Row>
    </Container>
  );
}

API

bootstrap css class component
.container <Container/>
.container-fluid <Container fluid/>
.row <Row />
.row.no-gutters <Row noGutters />
.col <Col/> (<Col xs />)
.col-sm <Col sm />
.col-md-auto <Col md="auto" />
.col-6 <Col xs={6} />
.col-md-6 <Col md={6} />
.col.order-12 <Col order={{xs:12}} />
.col-md-4.offset-md-4 <Col md={4} order={{md:4}} />

Container

<Container />
<Container fluid/>

Row

<Row />

Col

<Col />
<Col xs={1}/>
<Col offset={{ xs: 1 }}/>
<Col order={{ xs: 1 }}/>
<Col order={{ xs: 'first', md: 'last' }}/>

Customize

with props

// grid.js
import {
  Container as ReactContainer,
  Row as ReactRow,
  Col as ReactCol
} from 'react-grid';

const styles = {
  breakpoints: { xs: 0, sm: 576, md: 768, lg: 992, xl: 1200 },
  containerMaxWidths: { sm: 540, md: 720, lg: 960, xl: 1140 },
  columns: 12,
  gutterWidth: 30
};

export const Container = props => <ReactContainer {...props} styles={styles} />;
export const Row = props => <ReactRow {...props} styles={styles} />;
export const Col = props => <ReactCol {...props} styles={styles} />;

// app.js
import { Container, Row, Col } from './grid';

const App = () => (
  <Container>
    <Row>
      <Col />
      <Col />
    </Row>
  </Container>
);

breakpoints

react-grid implments breakpoint functions similar to bootstrap grid:

  • mediaBreakpointUp
  • mediaBreakpointDown
  • mediaBreakpointBetween
  • mediaBreakpointOnly
/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { mediaBreakpointUp } from 'react-grid';

const App = () => (
  <div
    css={css`
      ${mediaBreakpointUp('sm')} {
        font-size: 12px;
      }
    `}
  />
);

// or

const App = () => (
  <div
    css={{
      [mediaBreakpointUp('sm')]: {
        fontSize: 12
      }
    }}
  />
);

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].