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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pure-web-components

v0.0.1

Published

Pure Web Components

Readme

About Pure Web Components

Web Components inspired by Pure CSS. 6 web components in 37KBs of uncompressed JS (without CSS or optional polyfills).

Components

Features

  • 🎛 6 minimal components
  • 🎨 Theming using CSS Variables
  • 💄 SASS/SCSS
  • 🌲 Works in any modern browser (see here)
  • 📲 E2E testing
  • 📸 Snapshot testing
  • 📘 Storybook
  • 🔷 Typescript
  • ⛓ JSX + VDOM

Documentation

You can find the documentation for all the web components in this library here. You can also browse the Storybook logo Storybook with examples of each component here.

Getting Started

git clone https://github.com/whoisryosuke/pure-web-components.git
cd pure-web-components
yarn
yarn story

To build the component for production, run:

yarn build

To run the unit tests for the components, run:

yarn test

Creating new components

yarn generate pure-component-name-here

You will be prompted by the Stencil CLI about what files you'd like to generate, then it'll output the component into your src/components/ folder.

Using these components

Script tag

  • Publish to NPM
  • Put a script tag similar to this <script src='https://unpkg.com/[email protected]/dist/pure-web-components.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, HTML etc

Node Modules

  • Run npm install pure-web-components --save
  • Put a script tag similar to this <script src='node_modules/pure-web-components/dist/pure-web-components.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, HTML etc

In a stencil-starter app

  • Run npm install pure-web-components --save
  • Add an import to the npm packages import pure-web-components;
  • Then you can use the elements anywhere in your template, JSX, HTML etc

In a React app

Found this guide that explains process well, with reasons why workarounds are used. Short answer: React doesn't pass props to Web Components correctly, so you have to use a combo of refs and utility class. It also handles events differently, using it's own form of synthetic events.

  1. Add the component(s) to the dependencies: npm install pure-web-components --save
  2. Import the component(s) using the Stencil loader (usually near the root of the app):
import { defineCustomElements } from "pure-web-components/dist/loader";

defineCustomElements(window);
  1. Use the component inside the app:
render() {
    return (
    <pure-form>
        <fieldset class="pure-group">
            <input type="text" class="pure-input-1-3" placeholder="Username">
            <input type="text" class="pure-input-1-3" placeholder="Password">
            <input type="text" class="pure-input-1-3" placeholder="Email">
        </fieldset>

        <fieldset class="pure-group">
            <input type="text" class="pure-input-1-3" placeholder="Another Group">
            <textarea class="pure-input-1-3" placeholder="Textareas can work here too"></textarea>
            <input type="text" class="pure-input-1-3" placeholder="Even More Stuff">
            <input type="text" class="pure-input-1-3" placeholder="Last Item">
        </fieldset>
        <pure-button type="submit" class="pure-input-1-3">Sign in</pure-button>
    </pure-form>
    )
}

Customizing the grid

Pure Web Components comes preloaded with 2-8, 12, and 24 column grids using class names formatted like .pure-u-1-4 (1/4 width or 1 part of a 4 column grid).

There are also responsive classes that use CSS media queries to only set the column width for certain viewports. For example, this button will be 1/2 width at mobile, or 1/3 at higher viewports: <div class="pure-u-sm-1-2 pure-u-md-1-3">. These classes require many viewport variations (each grid x column number x viewports = a lot of unused CSS without PurgeCSS). Because of this, only 2-5 and 12 columns are available responsively.

Adding more grid variations

You can enable more grids by editing pure-grid.scss and using the grid-generator SASS mixin. The mixin accepts the number of columns, and an optional breakpoint. These breakpoints are defined in the @mixin respond-from which outputs media queries - also located in the same file.

Todo

  • <pure-button> component
  • <pure-form> component
  • <pure-grid> component
  • <pure-grid> story examples
  • <pure-base> component + story examples
  • <pure-menu> component + story examples
  • [] <pure-menu> CSS dropdowns
  • <pure-table> component + story examples
  • [] <pure-button-group> component + swap out in other component stories
  • ✅ Create documentation
    • ✅ Test out Storybook Docs and MDX
    • ✅ Test out Gatsby using StencilJS and JSON output
  • [] Remove old browser polyfills (such as CSS duplicate properties for rgba vs hex)
  • [] Create more theming variables
  • [] Add more themes
    • [] Dark Mode
    • [] Bootstrap
    • [] Semantic UI