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-web

v1.1.1

Published

Modern JavaScript library for easy creation of liquid glass effect for Vue, React, VanillaJS

Readme

Liquid Web

Liquid Web is a modern JavaScript library for easy creation of Apple liquid glass effect for Vue, React, Vanilla JS

Simply plug it into your project and get a modern liquid glass effect.

Go to the website see it in action and customize your Liquid Glass effect!

Liquid Glass Gif

Table of Contents

Installation

npm install liquid-web

or connect via CDN:

<script src="https://cdn.jsdelivr.net/npm/liquid-web/liquid-core.min.js"></script>

Usage

VanillaJS example

import { LiquidWeb } from 'liquid-web';

new LiquidWeb('[data-liquid]', {
  /* ...options */
});
<div data-liquid>
  <button>I am liquid button!</button>
</div>

Vue example

<script setup lang="ts">
  import { LiquidWeb } from 'liquid-web/vue';
</script>

<template>
  <LiquidWeb
    :options="{ /* ...options */ }"
    :selector="div"
    @click="(instance) => console.log('Clicked!', instance)"
    @mouseEnter="(instance) => console.log('Mouse entered!', instance)"
    @mouseLeave="(instance) => console.log('Mouse left!', instance)"
  >
    <button>I am liquid button!</button>
  </LiquidWeb>
</template>

React example

import { LiquidWeb } from './dist/react/index.mjs';

export default () => {
  return (
    <div>
      <LiquidWeb
        options={{ ...options }}
        selector="div"
        onClick={(instance) => console.log('Clicked!', instance)}
        onMouseEnter={(instance) => console.log('Mouse entered!', instance)}
        onMouseLeave={(instance) => console.log('Mouse left!', instance)}
      >
        <button>I am liquid button!</button>
      </LiquidWeb>
    </div>
  );
};

Options

| Option | Type | Default | Description | | ------------- | ------------------------------------------------ | ---------- | ------------------------------------------------- | | el? | string \| HTMLElement | - | Element selector to apply liquid effect. | | init? | boolean | true | Whether to initialize the effect on load. | | scale? | number | 22 | Changes the intensity of the displacement effect. | | blur? | number \| string | 2 | Changes the intensity of the blur effect. | | saturation? | number \| string | 170 | Changes the intensity of the saturation effect. | | aberration? | number | 50 | Changes the intensity of the aberration effect. | | mode? | 'standard' | 'polar' | 'prominent' | 'shader' | standard | Toggles the glass effect. | | on? | LiquidWebEventListeners | - | Event listeners for the liquid effect. | | events? | LiquidWebEventListeners | - | Event listeners for the liquid effect. | | onAny? | LiquidWebEventCallback | - | Callback for any event. |

Events

LiquidWeb has a lot of useful events that you can listen to. Events can be assigned in two ways:

  1. Using on parameter on initialization:
const liquidweb = new LiquidWeb('[data-liquid]', {
  on: {
    init: (liquidweb) => {
      console.log('LiquidWeb initialized', liquidweb);
    },
    mouseEnter: (liquidweb) => {
      console.log('Mouse entered', liquidweb);
    },
  },
});
  1. Using the on method after initialization:
const liquidweb = new LiquidWeb('[data-liquid]', {
  init: false, // Disable auto-init
});

liquidweb.on('init', (liquidweb) => {
  console.log('LiquidWeb initialized', liquidweb);
});

liquidweb.on('mouseEnter', (liquidweb) => {
  console.log('Mouse entered', liquidweb);
});

liquidweb.init(); // Manually initialize the effect

| Event | Arguments | Description | | --------------------- | ------------ | ------------------------------------------------------------------------- | | beforeInit | (liquidweb ) | Event will be fired before the effect is initialized. | | init | (liquidweb ) | Event will be fired when the effect is initialized. READ MORE BELOW!!! | | afterInit | (liquidweb ) | Event will be fired after the effect is initialized. | | beforeDestroy | (liquidweb ) | Event will be fired before the effect is destroyed. | | destroy | (liquidweb ) | Event will be fired when the effect is destroyed. | | afterDestroy | (liquidweb ) | Event will be fired after the effect is destroyed. | | beforeUpdate | (liquidweb ) | Event will be fired before the effect is updated. | | update | (liquidweb ) | Event will be fired when the effect is updated. | | afterUpdate | (liquidweb ) | Event will be fired after the effect is updated. | | beforeUpdateEffects | (liquidweb ) | Event will be fired before the effects are updated. | | updateEffects | (liquidweb ) | Event will be fired when the effects are updated. | | afterUpdateEffects | (liquidweb ) | Event will be fired after the effects are updated. | | mouseEnter | (liquidweb ) | Event will be fired when the mouse enters the element. | | mouseLeave | (liquidweb ) | Event will be fired when the mouse leaves the element. | | mouseMove | (liquidweb ) | Event will be fired when the mouse moves over the element. | | mouseDown | (liquidweb ) | Event will be fired when the mouse button is pressed down on the element. | | mouseUp | (liquidweb ) | Event will be fired when the mouse button is released over the element. | | click | (liquidweb ) | Event will be fired when the element is clicked. |

Note that with liquidweb.on('init') syntax it will work only in case you set init: false parameter.

const liquidweb = new LiquidWeb('[data-liquid]', {
  init: false,
});

liquidweb.on('init', (liquidweb) => {
  console.log('LiquidWeb initialized', liquidweb);
});

liquidweb.init();

or

const liquidweb = new LiquidWeb('[data-liquid]', {
  on: {
    init: (liquidweb) => {
      console.log('LiquidWeb initialized', liquidweb);
    },
  },
});

Static Methods

| Static Method | Arguments | Description | | --------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | __instances__ | - | Returns an array of all LiquidWeb instances. | | init | el: HTMLElement | Initializes the LiquidWeb effect on a given element. | | getInstance | el: HTMLElement | string | Retrieves the LiquidWeb instance for a given element or selector. You can also get a copy as follows: document.querySelector('[data-liquid]')?.liquidWeb; |

My other works

Prismium - A modern JavaScript accordion library with smooth animations. Easily integrates with React, Vue, and vanilla JavaScript.