liquid-glass-js
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…
от siddu1004★ 43 звезды на GitHub
Установить liquid-glass-js в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
liquid-glass-js
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
- Copy
reference/container.js,reference/button.js,reference/glass.cssandreference/styles.cssinto the user's project (keepcontainer.jsbeforebutton.js, sinceButtonextendsContainer). - Load
html2canvasbefore them. The library uses it to capture the page for the refraction. - Create glass with the classes, as
reference/readme.mdshows:
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.elementto a ref, since the library works on DOM nodes. - Read
reference/container.jsbefore changing behaviour: the shader and the uniforms are in it.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- reference/button.js
- reference/container.js
- reference/glass.css
- reference/readme.md
- reference/styles.css
FAQ
Что делает скилл liquid-glass-js?
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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл liquid-glass-js запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…