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

glasskit-js

v1.3.0

Published

Drop-in Apple/Figma 'Liquid Glass' for any element — switch between pure CSS, SVG displacement (live backdrop), cross-browser clone-mode, or WebGL. Real refraction, chromatic aberration, specular highlight. Zero dependencies. Class + <liquid-glass> web co

Readme

Glasskit

Drop-in Apple / Figma "Liquid Glass" for the web.

npm version minzipped size zero dependencies types included license MIT

The only liquid-glass tool that lets you switch the rendering engine (pure CSS · SVG displacement · cross-browser clone · WebGL), apply it to any element/shape, and use it from vanilla JS, a web component, or React — with zero dependencies.

🎛️ Try the generator → — tune it visually and copy the code in any framework.

npm i glasskit-js

npm: glasskit-js · global: Glasskit · web component: <glass-kit>


Usage

<!-- vanilla / CDN -->
<script src="https://unpkg.com/glasskit-js"></script>
<script>
  const g = Glasskit.apply(document.querySelector('#card'), {
    mode: 'auto', frost: 8, refraction: 90, dispersion: 0.5
  });
  g.update({ frost: 12 });  // hot-update   ·   g.destroy();
</script>
<!-- web component (registered automatically) -->
<glass-kit mode="auto" refraction="90" dispersion="0.5"
           style="width:340px;height:210px;border-radius:30px">Glass</glass-kit>
// React
import Glass from 'glasskit-js/react';
<Glass as="button" mode="auto" refraction={90} dispersion={0.5}
       style={{ borderRadius: 999, padding: '14px 28px' }}>Get tickets</Glass>

Modes — the switch nobody else gives you

| Mode | Real refraction | Browsers | Refracts | Best for | |------|:---:|---|---|---| | css | ✗ (blur) | all | live backdrop | default product UI, mobile, Safari/FF | | svg | ✓ | Chromium | live backdrop | the "wow" surface on Chrome/Edge | | svg-clone | ✓ | all | a cloned DOM element | cross-browser refraction over DOM | | webgl | ✓ | all | an img/canvas/video | hero over a fixed background/video | | auto | — | — | — | Chromium→svg, else svg-clone if background set, else css |

svg-clone is the cross-browser trick: Safari/Firefox don't allow an SVG filter in backdrop-filter, so it clones the background element and filters the clone instead. It refracts DOM, not <canvas> pixels — use webgl for canvas/video backgrounds.

Params ↔ Figma's Glass panel

| Figma slider | Option | | Optical extras | Option | |---|---|---|---|---| | Frost | frost | | curvature (sphere→squircle) | curvature | | Refraction | refraction | | convex↔concave | convexity | | Depth | depth | | tint | tint, tintOpacity | | Dispersion | dispersion | | corner radius | radius | | Splay | splay | | face gloss | sheen, sheenColor, sheenAngle | | Light (angle / %) | lightAngle / lightIntensity | | drop shadow | shadow |

  • tint takes either "r,g,b" (paired with tintOpacity) or a full CSS gradienttint="linear-gradient(180deg, rgba(255,255,255,.2), rgba(19,19,19,.22))".
  • sheen is the diagonal face gloss (0 = off). sheenColor takes "r,g,b" or any CSS color (rgb()/rgba()/hsl()/hex/named). sheenAngle rotates the gloss in degrees; omit it (or null) to follow lightAngle.
  • radius sets border-radius on the element and the refraction map — radius={999} alone gives you a pill; no need to also set it in style.
  • shadow is any CSS box-shadow ("none" removes it); the inner light border/bezel follow lightIntensity.

Shapes

Any rounded rectangle (incl. pills & circles) works with zero extra code — a ResizeObserver regenerates the refraction map on resize. Arbitrary outlines (blobs, SVG paths) keep the blur/tint/highlight via clip-path, but refraction edges assume a rounded box; supply a custom displacement map for true custom outlines.


Built something with it, or want to hack on the engine, generator, or benchmark? See CONTRIBUTING.md.

License

MIT — see LICENSE.