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

@piksl/grid

v1.5.0

Published

- Establish a set of column `<Col />` in the horizontal space defined by row `<Row />`.

Downloads

27

Readme

@piksl/grid

  • Establish a set of column <Col /> in the horizontal space defined by row <Row />.

  • Your content elements should be placed directly in the <Col />, and only <Col /> should be placed directly in<Row />.

  • The column grid system is a value of 1-12 to represent its range spans. For example, three columns of equal width can be created by <Col xl={4} />.

  • If the sum of <Col /> spans in a row are more than 12, then the overflowing <Col /> as a whole will start a new line arrangement.

API

Container

| Prop | Description | Type | Default | | ------------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------- | ------- | | minHeight | Minimum height of the <Container /> | string | - | | background | Background of the <Container /> | string | - | | backgroundColor | Background-color of the <Container /> | string | - | | backgroundImage | Background-image of the <Container /> | string | - | | backgroundSize | Background-size of the <Container /> | cover contain string | - | | backgroundPosition | Background-position of the <Container /> | string | - | | justify | Vertical alignment children of the <Row /> inside | flex-start flex-end center space-between space-around space-evenly | - | | className | The classname of the <Container /> | string | - | | id | The id of the <Container /> | string | - | | ref | The ref that is passed to the <Container /> | any | - | | padding | Top and/or bottom padding of the <Container /> Use it like [top] or [top, bottom] | [number] [number, number] | - |

Row

| Prop | Description | Type | Default | | --------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------- | | fluid | Makes the <Row /> fluid | boolean | false | | backgroundColor | Background-color of the <Row /> | string | - | | justify | Horizontal alignment of the <Col /> inside | flex-start flex-end center space-between space-around space-evenly | - | | align | Vertical alignment | flex-start flex-end center stretch | - | | wrapReverse | Reverse the order at wrap | boolean | false | | padding | Top and/or bottom padding of the <Row /> Use it like [top] or [top, bottom] | [number] [number, number] | [20, 20] | | margin | Top and/or bottom margin of the <Row /> Use it like [top] or [top, bottom] | [number] [number, number] | [0, 0] | | borderRadius | Border-radius of the <Row /> | string | - | | className | The classname of the <Row /> | string | - | | id | The id of the <Row /> | string | - |

Col

| Prop | Description | Type | Default | | --------- | ----------------------------------------------------------------------- | -------------------------------------------------- | ------- | | xs | Span of the <Col /> when window.innerWidth <= 576px | 1 2 3 4 5 6 7 8 9 10 11 12 | 12 | | sm | Span of the <Col /> when window.innerWidth between 577px and 768px | 1 2 3 4 5 6 7 8 9 10 11 12 | 12 | | md | Span of the <Col /> when window.innerWidth between 769px and 992px | 1 2 3 4 5 6 7 8 9 10 11 12 | 12 | | lg | Span of the <Col /> when window.innerWidth between 993px and 1200px | 1 2 3 4 5 6 7 8 9 10 11 12 | 12 | | xl | Span of the <Col /> when window.innerWidth > 1200px | 1 2 3 4 5 6 7 8 9 10 11 12 | 12 | | minWidth | Minimum width of the <Col /> | string | - | | maxWidth | Maximum width of the <Col /> | string | - | | className | The classname of the <Col /> | string | - | | id | The id of the <Col /> | string | - |

The breakpoints of responsive grid follow BootStrap 4 media queries rules (not including occasionally part).

ConfigProvider

Wrap the <ConfigProvider /> around the components where you would like to use <Container />, <Row /> and <Col /> with a different styling then the default, without adjusting the properties continually.

Usage example

To create a layout like the example image below, the could would look like:

<Container justify="flex-end" >
    <Row
        justify="space-between"
        align="flex-start"
    >
        <Col xl={6} />
        <Col xl={3} />
    </Row>
</Container>

@piksl/grid example