Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

styled-css-grid

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-css-grid

A tiny CSS grid layout for React, built with styled-components

  • 0.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.2K
increased by14.34%
Maintainers
1
Weekly downloads
 
Created
Source

styled-css-grid 🍱

Travis Prettier npm semantic-release License JS.ORG

A tiny (~2kb) CSS grid layout for React, built with styled-components 💅.

examples

See the website.

installation

Install React and styled-components, then:

$ yarn add styled-css-grid

usage

import React from "react";
import { Grid, Cell } from "styled-css-grid";

const MyGrid = () => (
  <Grid columns={2} gap="2px">
    <Cell>foo</Cell>
    <Cell height={2}>bar</Cell>
    <Cell width={2}>baz</Cell>
  </Grid>
);

api

Cell

A cell. Not too much to say...

Props:

  • width: Cell width in units, default is 1.
  • height: Cell height in units, default is 1.
  • left: The grid-column-start CSS property. Not provided by default.
  • top: The grid-row-start CSS property. Not provided by default.
  • middle: Vertically align the contents of the cell. Default is false.
  • center: Horizontally align the text contents of the cell. Default is false.

Grid

Wrap your cells in Grid. Pretty simple.

Props:

  • columns: Number of columns to draw, default is 12.
  • gap: Gap between cells. Default is "8px".
  • minRowHeight: Minimum height of each row. Default is "20px".
  • flow: The grid-auto-flow CSS property. Default is "row".

Keywords

FAQs

Package last updated on 30 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc