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

@shinobi5/grid-layout

v0.1.1

Published

Web component for CSS layout with zero dependencies

Downloads

4

Readme

Usage

  <head>
    <script 
      src="https://unpkg.com/@shinobi5/[email protected]/lib/grid-layout.js" 
      defer 
    ></script>
  </head>
  <body>
    <main>
      <grid-layout 
        breakpoints="400px, 800px, 1200px"
        space="5px, 10px, 20px, 40px" 
        cols="1, 2, 3, 4" 
        col="1fr, 1fr 2fr, 2fr"
        rowsrange="auto, 200px"
        align="center"
        justify="start-end"
      >
        <div>item 1</div>
        <div>item 2</div>
        <div>item 3</div>
        <div>item 4</div>
      </grid-layout>
    </main>  
  </body>

API

As this component is still a v0 version there's a good chance this API will change as I start to use the component and discover improvements that are needed. Consider this API unstable at this stage

Options are set via attributes on the <grid-layout>. HTML attributes can only accept a single type: String.

Note: for attributes that accept a list of values applied at each breakpoint, the first value in the list is the initial value (the value applied before the first breakpoint)

| Option | Type | Description | |--------|--------|--------| | align| String | Value is passed to align-items and align-content | breakpoints| String | A list of comma separated breakpoint values (breakpoint values are applied tomin-width media queries) | cols| String | A comma separated list of columns at each breakpoint | col| String | A comma separated list of column settings at each breakpoint | justify| String | Value is passed to justify-items and justify-content | rowsrange| String | A comma separated list of values passed to minmax for grid-auto-columns | space| String | A comma separated list of gap values at each breakpoint

Browser support

Layout component uses the shadowDOM to encapsulate the styles and CSS Grid Layout for the container properties. This means no support for IE11.

Development

Project requires deno and velociraptor to be installed

Start server at localhost:1234

vr start

Compile component

vr build