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

untitled-grid

v1.0.1

Published

Untitled grid can be a standard 12 column grid system or a versatile grid utility.

Downloads

3

Readme

Untitled Grid

Untitled grid can be a standard 12 column grid system or a versatile grid utility.

Usage

npm install untitled-grid

or

yarn add untitled-grid

Auto columns

Evenly distribute items in a row without props.

<Row>
  <Col></Col>
  <Col></Col>
  <Col></Col>
</Row>

Responsive properties

All properties are applied within breakpoint props.

Breakpoints are mobile first, so the xs prop will apply to all sizes, until larger breakpoint is used.

You can also use custom breakpoints.

Use the span property to define the width of cols.

<Row>
  <Col
    xs={{ span: 12 }}
    sm={{ span: 6 }}
    md={{ span: 4 }}
    lg={{ span: 2 }}
  ></Col>
  ...
</Row>

Justify

Justify items in a row to the left, right, or center.

<Row xs={{ justify: "start" }}>
  <Col xs={{ span: 2 }}></Col>
  <Col xs={{ span: 2 }}></Col>
  <Col xs={{ span: 2 }}></Col>
</Row>
<Row xs={{ justify: "center" }}>
  <Col xs={{ span: 2 }}></Col>
  <Col xs={{ span: 2 }}></Col>
  <Col xs={{ span: 2 }}></Col>
</Row>
<Row xs={{ justify: "end" }}>
  <Col xs={{ span: 2 }}></Col>
  <Col xs={{ span: 2 }}></Col>
  <Col xs={{ span: 2 }}></Col>
</Row>

Align

The height of a row is always determined by the content. Where the height differs, align other items to the top, middle or bottom of a row.

<Row xs={{ justify: "top" }}>
  <Col></Col>
  <Col></Col>
  <Col></Col>
</Row>
  <Row xs={{ justify: "middle" }}>
  <Col></Col>
  <Col></Col>
  <Col></Col>
</Row>
  <Row xs={{ justify: "bottom" }}>
  <Col></Col>
  <Col></Col>
  <Col></Col>
</Row>

Offsets

Offset columns.

<Row>
  <Col xs={{ span: 3 }}></Col>
  <Col xs={{ span: 3, offset: 6 }}></Col>
  <Col xs={{ span: 3, offset: 3 }}></Col>
  <Col xs={{ span: 3 }}></Col>
</Row>

Custom Columns

Only need 100 columns or only 2? Define any number of columns.

<Row cols={2}>
  <Col xs={{ span: 2 }}></Col>
  <Col xs={{ span: 1 }}></Col>
  <Col xs={{ span: 1 }}></Col>
</Row>

##Custom Breakpoints The default breakpoints are { xs: 0, sm: 768, md: 1024, lg: 1920 }, you can override these using the breakpoints prop.

Changing the breakpoints will change the props accepts.

<Row breakpoints={{ mobile: 0, tablet: 768, screen: 1024 }}>
  <Col
    mobile={{ span: 12 }}
    tablet={{ span: 6 }}
    screen={{ span: 3 }}
  ></Col>
  <Col
    mobile={{ span: 12 }}
    tablet={{ span: 6 }}
    screen={{ span: 3 }}
  ></Col>
  <Col
    mobile={{ span: 12 }}
    tablet={{ span: 6 }}
    screen={{ span: 3 }}
  ></Col>
  <Col
    mobile={{ span: 12 }}
    tablet={{ span: 6 }}
    screen={{ span: 3 }}
  ></Col>
</Row>

Nested Grids

You can nest rows. Nested rows will inherit context such as breakpoints,rootEM, and gutters from the parent grid.

<Row breakpoints={{ mobile: 0, tablet: 768, screen: 1024 }}>
  <Col mobile={{ span: 12 }} tablet={{ span: 6 }}>
    <Row>
      <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
      <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
    </Row>
  </Col>
  <Col mobile={{ span: 12 }} tablet={{ span: 6 }}>
    <Row>
      <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
      <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
    </Row>
  </Col>
</Row>

Reverse & Order

Reverse all items in a row or set the order of a specific column.

<Row reverse={true}>
  <Col xs={{ span: 4 }}>
    <div css={example}>1</div>
  </Col>
  <Col xs={{ span: 4, order: -1 }}>
    <div css={example}>2</div>
  </Col>
  <Col xs={{ span: 4 }}>
    <div css={example}>3</div>
  </Col>
</Row>

rootEM

If you have changed the default font-size on the html element your breakpoints might be off. Change the rootEM in Untitled Grid to fix this.

Why? Breakpoints in Untitled Grid are defined with pixels but applied using em units because em units respond correctly when the page is zoomed. To convert from pixels to em units, you can divide pixels by the base font-size which is sometimes called the rootEM.

<Row rootEM={18}>
  ...
</Row>

Grid provider

Use a grid provider to set default properties for all grids in an application. These can be overwitten locally on the component if required.

import { GridProvider } from "untitled-grid";

<GridProvider breakpoints={{ mobile: 0, tablet: 768, screen: 1024 }}>
  <Row>
    <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
    <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
  </Row>
  <Row>
    <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
    <Col mobile={{ span: 12 }} tablet={{ span: 6 }}></Col>
  </Row>
</GridProvider>