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

liquid-glass-mk

v1.1.5

Published

A React library for beautiful liquid glass effects with customizable hover animations

Readme

Liquid Glass MK

A beautiful React library for creating liquid glass effects with customizable animations and cursor effects.

Features

  • Beautiful liquid glass effects with backdrop blur
  • Smooth hover animations with customizable scaling
  • Highly customizable with props
  • Responsive and mobile-friendly
  • TypeScript support
  • Zero dependencies (except React)
  • Cursor effect utility for enhanced user experience

Installation

npm install liquid-glass-mk

Usage

LiquidGlass Component

Basic Usage

import { LiquidGlass } from "liquid-glass-mk";

function App() {
  return (
    <LiquidGlass>
      <p>Your content here</p>
    </LiquidGlass>
  );
}

Advanced Usage

import { LiquidGlass } from "liquid-glass-mk";

function App() {
  return (
    <LiquidGlass
      glassRadius="2rem"
      glassBlur={15}
      glassSaturate="180%"
      glassBrightness={1.2}
      glassBorder={2}
      glassAlpha={0.2}
      glassBg="255, 255, 255"
      className="p-6 text-white"
      style={{ margin: "20px" }}
    >
      <h2>Advanced liquid glass effect</h2>
      <p>This has custom styling and effects</p>
    </LiquidGlass>
  );
}

Custom Styling with Tailwind CSS

import { LiquidGlass } from "liquid-glass-mk";

function App() {
  return (
    <LiquidGlass
      glassAlpha={0.3}
      glassBlur={20}
      glassRadius="1rem"
      className="bg-red-500 text-white p-4 rounded-lg shadow-lg"
      onClick={() => console.log("Clicked!")}
    >
      <h2>Custom Styled Glass</h2>
    </LiquidGlass>
  );
}

LiquidGlass Cursor Effect

Basic Cursor Effect

import { useLiquidGlassCursor } from "liquid-glass-mk";

function App() {
  useLiquidGlassCursor();

  return (
    <div>
      <h1>Move your mouse to see the cursor effect!</h1>
    </div>
  );
}

Advanced Cursor Effect

import { useLiquidGlassCursor } from "liquid-glass-mk";

function App() {
  useLiquidGlassCursor({
    size: 120,
    blur: 15,
    intensity: 0.3,
    zIndex: 9999,
  });

  return (
    <div>
      <h1>Custom cursor effect</h1>
    </div>
  );
}

API Reference

LiquidGlass Props

| Prop | Type | Default | Description | | ----------------- | -------------------------------------- | ----------------- | ----------------------------------------------- | | children | React.ReactNode | - | Content to display inside the glass effect | | glassRadius | number \| string | "md" | Border radius (px, rem, em, vh, vw, %) | | glassBg | string | "255, 255, 255" | RGB background color (format: "r,g,b") | | glassAlpha | number | 0.16 | Background opacity (0-1) | | glassBlur | number \| string | 2 | Backdrop blur amount (px, rem, em, vh, vw) | | glassSaturate | number \| string | 1.8 | Color saturation (number or "180%") | | glassBrightness | number | 1.05 | Color brightness multiplier | | glassBorder | number \| string | 1 | Border width (px, rem, em, vh, vw) | | className | string | - | Additional CSS classes (Tailwind CSS supported) | | style | React.CSSProperties | - | Custom inline styles | | ref | React.Ref<HTMLDivElement> | - | Ref to the glass element | | onClick | (event: MouseEvent) => void | - | Click handler | | onMouseEnter | (event: MouseEvent) => void | - | Mouse enter handler | | onMouseLeave | (event: MouseEvent) => void | - | Mouse leave handler | | ... | React.HTMLAttributes<HTMLDivElement> | - | All standard HTML div attributes |

useLiquidGlassCursor Options

| Option | Type | Default | Description | | ----------- | -------- | ------- | ----------------------------------- | | size | number | 100 | Size of the cursor effect in pixels | | blur | number | 20 | Blur amount for the cursor effect | | intensity | number | 0.1 | Opacity intensity (0-1) | | zIndex | number | 9999 | Z-index of the cursor element |

Examples

Complete Example with Both Components

import { LiquidGlass, useLiquidGlassCursor } from "liquid-glass-mk";
import { useEffect } from "react";

function App() {
  useLiquidGlassCursor({
    size: 80,
    blur: 10,
    intensity: 0.2,
  });

  return (
    <div
      style={{
        background: "linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1)",
        minHeight: "100vh",
        padding: "20px",
      }}
    >
      <LiquidGlass
        glassAlpha={0.2}
        glassBlur={25}
        glassRadius="2rem"
        glassSaturate={2.0}
        className="p-8 text-white mb-6"
        onClick={() => console.log("Glass clicked!")}
      >
        <h1>Welcome to Liquid Glass</h1>
        <p>Move your mouse to see the cursor effect!</p>
      </LiquidGlass>

      <LiquidGlass
        glassAlpha={0.2}
        glassBlur={15}
        glassRadius="1rem"
        glassBg="255, 0, 0"
        className="p-6 text-white"
      >
        <h2>Custom Styled Glass</h2>
        <p>This glass has custom background color</p>
      </LiquidGlass>
    </div>
  );
}

Development

This repository includes a development environment for testing and showcasing the library features.

Running the Development Server

# Clone the repository
git clone https://github.com/93minki/liquid-glass-mk.git
cd liquid-glass-mk

# Install dependencies
npm install

# Start the development server
npm run dev

The development server will start at http://localhost:5173 and you can see various examples of the LiquidGlass component and cursor effects in action.

Note: The development files (App.tsx, main.tsx, etc.) are not included in the published npm package. They are only used for development and testing purposes.

License

MIT