Skip to content
Back to skills

Liquid Glass Js

ASecurity

Add Apple Liquid Glass-style buttons and containers to a web page with liquid-glass-js, a plain JavaScript and WebGL library with real-time refraction, blur and nested glass. Use when the user wants a glassmorphism or liquid glass button, pill, circle or panel with a refraction effect, a glass UI that samples the page behind it, or help tuning edge, rim, blur and tint of a glass effect. Not for a plain CSS backdrop-filter blur.

  • 3 stars
  • 0 votes
  • 4 copies
  • 9 views
  • Added October 25, 2026
ai-agentsjavascriptjavareactnodeawsgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned October 25, 2026

npx -y skills add siddu1004/SFP --skill liquid-glass-js --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Liquid Glass Js?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Liquid Glass Js
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/siddu1004-liquid-glass-js/badge)](https://www.skillsdirectory.com/skills/siddu1004-liquid-glass-js)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: liquid-glass-js
description: Add Apple Liquid Glass-style buttons and containers to a web page with liquid-glass-js, a plain JavaScript and WebGL library with real-time refraction, blur and nested glass. Use when the user wants a glassmorphism or liquid glass button, pill, circle or panel with a refraction effect, a glass UI that samples the page behind it, or help tuning edge, rim, blur and tint of a glass effect. Not for a plain CSS backdrop-filter blur.
---

# liquid-glass-js

[liquid-glass-js](https://github.com/dashersw/liquid-glass-js) draws glass buttons and containers with WebGL shaders that refract and blur the page behind them. It has no build step and no npm package: the library is two source files, `container.js` and `button.js`, plus two small stylesheets. They are bundled in `reference/` with the project's README, so use them from there.

## Use it

1. Copy `reference/container.js`, `reference/button.js`, `reference/glass.css` and `reference/styles.css` into the user's project (keep `container.js` before `button.js`, since `Button` extends `Container`).
2. Load `html2canvas` before them. The library uses it to capture the page for the refraction.
3. Create glass with the classes, as `reference/readme.md` shows:

```javascript
const button = new Button({ text: 'Save', size: 28, type: 'pill', tintOpacity: 0.3, onClick: () => {} })
document.body.appendChild(button.element)

const container = new Container({ borderRadius: 24, type: 'pill' })
container.addChild(button)          // nested glass samples the parent
document.body.appendChild(container.element)
```

Shapes are `'rounded'`, `'circle'` and `'pill'`. The tuning parameters (edge, rim and base intensity, blur radius, tint) and their ranges are in the README's table.

## Things to check

- It needs WebGL 2 and a local server (WebGL and canvas capture do not work from a `file://` page): `npx serve .`.
- The glass shows whatever is behind it, so put it over an image or a gradient. On a flat colour there is nothing to refract.
- It samples the page with `html2canvas`, so cross-origin images need CORS headers or they will not appear in the effect.
- For a React app, create the instances in an effect after mount and add `button.element` to a ref, since the library works on DOM nodes.
- Read `reference/container.js` before changing behaviour: the shader and the uniforms are in it.

Files in this skill

  • SKILL.md2.3 KB
  • reference/button.js24.4 KB
  • reference/container.js25.3 KB
  • reference/glass.css1 KB
  • reference/readme.md10.1 KB
  • reference/styles.css705 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.