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

@illinois-toolkit/ilw-grid

v1.0.0-beta

Published

Illinois Toolkit: Creates a grid of items that you can use to display information.

Downloads

149

Readme

ilw-grid

Links: ilw-grid in Builder | Illinois Web Theme | Toolkit Development

Overview

The grid is used to organize a large group of components in a grid. Items in the grid are arranged from left to right until the row is full, then from left to right again in a new row below the previous row.

You can define the width of a grid item, and this along with the container width will determine the number of columns and rows. For example, if you define the width of an individual item as 250px and you are in a 1200px width container, you will get roughly four items per row (250 * 4 = 1000).

If you set the innerwidth higher than the container width, then it will shrink down to the container width.

There will be an automatic 10px gap (gutter) between the columns and rows. This gap does not include outside padding.

This uses the grid CSS property, along with the minmax and repeat rules.

This will automatically style the components inside the grid to the height of the largest item in the row.

Attributes are:

  • innerwidth: standard length / percentage CSS, defaults to 350px
  • width: no width attribute will make it fit the container, full will break the container and go full width, auto will break the container, but only for the background, and page will go full width but only for the background.
  • theme: blue, orange, blue-gradient, orange-gradient, gray, white. Defaults to white. This is only the background of the grid.
  • padding: standard length / percentage CSS of padding around the grid. Defaults to 0 0 40px 0 to accommodate cards;
  • gap: a length / percentage CSS of padding between the columns. Defaults to none.

Code Examples

<ilw-grid>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
   <ilw-card>...</ilw-card>
</ilw-grid>

Accessibility Notes and Use

Items inside the grid should remain in semantic order. Do not attempt to change the order of the components by using CSS direction: rtl or ordering.

The items in the grid are in an unordered list so assistive technology can help the end user navigate through a large list of items.

This is using the manual slot assignment process using the MutationObserver interface to watch for changes in the DOM.

External References

  • https://developer.mozilla.org/en-US/docs/Web/CSS/grid
  • https://www.nngroup.com/articles/using-grids-in-interface-designs/ (see Example 3: Modular Grid)
  • https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries
  • https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#slotassignment
  • https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe