npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-content-grid

v0.0.12

Published

A minimal grid system for React that implements responsive Rows and Columns. Create layouts easy and fast, without a complete CSS framework.

Downloads

12

Readme

React Content Grid

A minimal grid system for React that implements Rows and Columns. Contributions and feedback are very welcome. Thanks to Radium, which this module is based on.

This module is currently under development. See changelog at the end of this file for information about the current and previous versions.

Installation & Usage

  1. Install the module via npm:

npm install react-content-grid

  1. Include Row and Column Components where you need them:
//using ES6 modules
import { Row, Column } from 'react-content-grid';

//using CommonJS modules
var Row = require('react-content-grid').Row;
var Column = require('react-content-grid').Column;
  1. Make grids layouts!
   <Row>
     <Column width="8">
       //your stuff goes here
     </Column>
     <Column width="4">
       //or here
     </Column>
   </Row>

The grid works pretty much like any other grid from any frontend framework:

  • A row takes up 100% of the available width
  • Columns take up the number of columns specified in the width prop
  • It's responsive meaning columns can wrap on small screens

The width of a column can be specified via its props. If needed, different widths can be used for different screen sizes:

  • width
  • mediumWidth
  • smallWidth

They are all optional, expect integers and default to the full width of the parent row.

By default the grid follows the specifications from the next section. But they can easily be customized by passing props to the row component. That means each row can have its own specifications.

Row Specifications

Here's a full list of specifications that go into a row:

  • numberOfColumns

    default: 16

    The number of columns that make up one row.

  • maxWidth

    default: 1200

    The maximum width of the row in pixels. The row will horizontally centered on a bigger window.

  • mediumMaxWidth

    default: 1024

    The breakpoint in pixels up to which width the mediumWidth prop in a column should be applied.

  • smallMaxWidth

    default: 768

    The breakpoint in pixels up to which width the smallWidth prop in a column should be applied.

The specifications above correspond directly to props that can be passed to a row component.

Changelog

@0.0.5

first working version

@0.0.6

added basic documentation

@0.0.9

added support for max width to row

@0.0.10

fixed media query overwriting issue

@0.0.11
  • added support for classes of rows and columns
  • fixed raw text display name bug
@0.0.12
  • fixed small bug in columns media queries