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

brewhk-rgx

v0.2.4

Published

React grid system – constraint-based responsive grid with no CSS and no media queries

Downloads

1

Readme

Rgx

React grid system – constraint-based responsive grid with no CSS and no media queries.

Build Status

About

Rgx is an experimental, responsive grid system based on minimum and maximum widths and designed for content-out layout. Rgx is built purely in React and uses inline styles, with no CSS and no media queries. Each Grid row sets its child Cells to display inline block once the Grid is wide enough to fit all Cells’ minimum widths. Once set inline, each Cell’s width is based on the ratio of its own minimum width to the sum of minimum widths per row. Once a Cell hits its max-width, the remaining space is distributed to other Cells in the row. Since this isn’t based on viewport-based media queries, the Grid responds to its own width, similar to element queries.

Getting Started

npm i rgx
import React from 'react'
import { Grid, Cell } from 'rgx'

class Demo extends React.Component {
  render () {
    return (
      <Grid gutter={8}>
        <Cell min={256} max={320}>Min 256 Max 320</Cell>
        <Cell min={768}>Min 768</Cell>
      </Grid>
    )
  }
}

React.render(<Demo />, document.querySelector('#demo'))

Grid Component

Props

  • gutter - pixel value to set negative margins on the Grid component and padding on Cell components to create gutters.
  • min - pixel value to set a default min prop for child Cells

Cell Component

Props

  • min - pixel value to set the min-width at which a Cell is displayed inline.
  • max - pixel value at which the Cell should not expand. Remaining space is distributed to other Cells.
  • padding - sets left and right padding. This is used by the Grid component when the gutter prop is set and the Cell has no padding set.
  • width - fraction value used by the Grid component to set a width. This can also be set manually when used independently from the Grid component
  • inline - boolean value used by the Grid component to display a Cell inline.

Performance

I have yet to do any performance audits, and since the Grid component listens to window resize events, this probably has some performance issues. Any help in that area would be greatly appreciated.

MIT License