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

@ephasme/glassy

v1.0.0

Published

A React component for creating a liquid glass effect.

Readme

@ephasme/glassy

A React component that recreates Apple's stunning Liquid Glass effect, bringing realistic glass refraction and chromatic aberration to your web applications.

npm version license

✨ Features

  • 🔮 Realistic refraction - Mimics actual glass optical properties
  • 🌈 Chromatic aberration - Subtle color separation for authentic glass look
  • Performance optimized - Uses SVG filters with backdrop-filter for smooth rendering
  • 🎛️ Highly customizable - Fine-tune depth, blur, scale, and aberration effects
  • 📱 Responsive - Automatically adapts to element dimensions and fit in the DOM flow nicely
  • 🎯 TypeScript ready - Full type definitions included

🚀 Installation

npm install @ephasme/glassy
yarn add @ephasme/glassy
pnpm add @ephasme/glassy

📖 Usage

import { LiquidGlass } from "@ephasme/glassy";

function App() {
  return (
    <div style={{ position: "relative", backgroundColor: "#f0f0f0" }}>
      {/* Background content */}
      <img src="/background-image.jpg" alt="Background" />

      {/* Liquid Glass overlay */}
      <LiquidGlass
        width={300}
        height={200}
        style={{
          position: "absolute",
          top: 50,
          left: 50,
          borderRadius: "20px",
          border: "1px solid rgba(255, 255, 255, 0.3)",
        }}
      >
        <div style={{ padding: "20px", color: "white" }}>
          <h2>Liquid Glass Effect</h2>
          <p>Content appears over the glass</p>
        </div>
      </LiquidGlass>
    </div>
  );
}

🎛️ API Reference

Props

| Prop | Type | Default | Description | | --------------------- | ------------------------- | ------------ | ------------------------------------- | | width | CSSProperties['width'] | Required | Width of the glass element | | height | CSSProperties['height'] | Required | Height of the glass element | | style | CSSProperties | Required | CSS styles (excluding width/height) | | depth | number | 3.5 | Depth of the refraction effect (0-10) | | depthBlur | number | 25 | Blur intensity for the depth mask | | chromaticAberration | number | 5 | Chromatic aberration intensity (0-20) | | scale | number | 90 | Scale of the displacement effect | | blur | number | 2 | General blur applied to backdrop | | children | ReactNode | - | Content to render inside the glass | | ref | Ref<HTMLDivElement> | - | Ref to the glass container element |

Example with Custom Settings

<LiquidGlass
  width={400}
  height={300}
  depth={5} // More pronounced refraction
  depthBlur={30} // Softer depth transition
  chromaticAberration={8} // Stronger color separation
  scale={120} // Larger displacement scale
  blur={3} // More background blur
  style={{
    borderRadius: "25px",
    background: "rgba(255, 255, 255, 0.1)",
    backdropFilter: "brightness(1.1)",
  }}
>
  <div>Your content here</div>
</LiquidGlass>

🌐 Browser Support

The Liquid Glass effect relies on modern web technologies:

  • Full support: Chromium-based browsers (Chrome, Edge, Opera)
  • Partial support: Firefox (basic functionality)
  • No support: Safari (backdrop-filter with SVG filters not supported)

⚠️ Important Considerations

  1. Performance: SVG filters can be computationally intensive. Use sparingly for best performance.
  2. Responsive design: Consider how the effect scales on different screen sizes.

🙏 Credits

This library was inspired by and built upon the excellent work of:

  • Adrien Gautier - His comprehensive Medium article provided the foundational understanding of SVG displacement filters and their application to liquid glass effects.

  • rdev - The liquid-glass-react repository offered valuable insights into React implementation patterns and effect variations.

While neither approach perfectly aligned with my specific requirements, both resources were instrumental in understanding the underlying techniques. This library represents a custom implementation that combines and extends their concepts. Many thanks to both contributors for sharing their knowledge!

📄 License

MIT © Loup Peluso

🐛 Issues & Contributing

Found a bug or want to contribute? Please visit our GitHub repository to report issues or submit pull requests.