agentsclimarketplace

React liquid glass

Skill silicon-based-Lin/react-liquid-glass

Build Apple-style Liquid Glass or frosted-glass UI in React/Next.js. Use this skill whenever the user asks for glass surfaces, glassmorphism, liquid glass, refraction effects, frosted nav bars, transparent headers, or blurred floating UI — even if they don't name a specific library. Covers mobile header bars, bottom navs, tab bars, floating filters, and replacing homemade glass effects. Supports two paths: `simple-liquid-glass` (Apple-faithful refraction with lens/rim/shape modes) and React Bits `GlassSurface` (SVG displacement refraction with per-channel chromatic aberration). Both use SSR-safe portals, accessible controls, and browser fallbacks without Three.js/WebGL/canvas.From its SKILL.md

Install
npx -y skills add silicon-based-Lin/react-liquid-glass

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

9.1 KB, ~2.1k tokens by cl100k_base, as published. Nobody here has run it

React Liquid Glass

Overview

Use this skill to implement a production React glass component that behaves like a real UI surface, not a decorative blur card.

Two paths, both supporting refraction and chromatic aberration:

Path A — simple-liquid-glassPath B — React Bits GlassSurface
RefractionSVG filter pipeline, lens modes, rim light, shape adaptationSVG feDisplacementMap per RGB channel
Unique strengths20+ props, effectMode="auto", quality tiers, iosMinBlurPer-channel color offsets, source copied in (no runtime dep), mixBlendMode
Installnpm install simple-liquid-glassnpx shadcn@latest add @react-bits/GlassSurface-...
BrowserChrome/Edge real, Safari/Firefox frosted fallbackChrome/Edge SVG, Safari/Firefox CSS fallback

Gated Workflow

Two gates. Do NOT skip either.

Gate 1 — Path Selection

If the user has NOT named a path, ask:

Which glass path?

A — simple-liquid-glass (npm package) Apple-faithful. Lens modes (rim/standard), shape adaptation, quality tiers, 20+ tuning props. Best when maximum Apple fidelity or fine-grained control is needed.

B — React Bits GlassSurface (shadcn copy) Self-contained SVG displacement refraction with per-channel chromatic aberration. Source copied into project, no runtime dependency. Best when the project already uses React Bits, or the team prefers inlined source.

Key trade-off: Path A has more knobs (lens, shapeAdapt, quality). Path B gives per-channel color control (redOffset/greenOffset/blueOffset) and zero external dependencies.

Which fits your project? (A / B)

Skip this gate if the user's message names the library (e.g. "use react-bits glass", "use simple-liquid-glass").

Gate 2 — Prerequisites Check

Verify prerequisites BEFORE implementation. Report missing items; do not proceed until resolved.

First: check the project is React. Read package.json. If react is not a dependency, stop and tell the user this skill only supports React 18+ / Next.js 13+ projects.

Path A — simple-liquid-glass

#PrerequisiteHow to verifyIf missing
1React 18+ / Next.js 13+package.jsonreact >= 18 or next >= 13Stop
2Package managerpackage-lock.json / yarn.lock / pnpm-lock.yaml / bun.lockbAsk user which to use
3No Three.js conflictspackage.json has no three / postprocessing / @types/threeWarn about bundle bloat, ask to confirm
4Version to installCheck package.json and node_modules for existing simple-liquid-glass. If none, check npm for latest: npm view simple-liquid-glass version. Ask user to confirm version
5Build toolHas webpack / vite / turbopack / esbuildCustom build: verify SVG filter assets not stripped

Path B — React Bits GlassSurface

#PrerequisiteHow to verifyIf missing
1React 18+ / Next.js 13+package.jsonreact >= 18 or next >= 13Stop
2shadcn CLIcomponents.json exists in project rootRun npx shadcn@latest init, ask user to confirm
3CSS approachCheck for tailwind.config / postcss.configTailwind → pick TS-TW/JS-TW. No Tailwind → pick TS-CSS/JS-CSS
4Output directorycomponents.jsonaliases.ui (e.g. @/components/ui)Confirm with user
5No duplicateCheck if GlassSurface.tsx/.jsx exists in UI dirAsk: overwrite or use existing

Gate 2 output — present to the user:

Path: [A / B]
Prerequisites: [N/N met]
Missing: [list, or "none"]
Ready: [Yes / No — resolve missing items first]

Proceed only after user confirms or all prerequisites are met.

Implementation Workflow

After both gates pass:

  1. Install — use the exact version/variant confirmed in Gate 2:
    • Path A: npm install simple-liquid-glass@<confirmed-version> (pin exact version, do not use latest).
    • Path B: npx shadcn@latest add @react-bits/GlassSurface-<confirmed-variant> (variant from Gate 2 prerequisite 3).
  2. Read the relevant reference doc before coding:
  3. Replace homemade glass wrappers only in the requested surface. Preserve existing filtering, routing, ARIA labels, and state transitions.
  4. Render fixed mobile glass navs through a client-only portal to document.body.
  5. Keep the portal host clean: no transform, filter, backdrop-filter, opacity animation, clip, mask, or layout containment on the element that owns the fixed glass surface.
  6. Support the expected product shape. For mobile category headers, use a full-width row while the header is expanded, then switch to a rounded floating pill only after scroll collapse if that is the desired interaction.
  7. Add focused tests for SSR safety, portal rendering, accessibility state, target size, and fixed-position layout stability.
  8. Validate with lint, typecheck, unit tests, build, and Playwright screenshot/layout checks when a browser-rendered effect is involved.

Path Migration

If the user wants to switch paths after initial implementation:

  1. The portal host, accessibility markup, scroll-state logic, and tests are portable — keep them.
  2. Replace only the glass component import and its props. Use the prop mapping table in the reference doc to translate values.
  3. Re-run visual checks — the two libraries produce different visual results even with equivalent prop values, so expect tuning.
  4. Remove the old library (uninstall npm package or delete copied component file).

Guardrails

  • Do not install three, postprocessing, @types/three, canvas engines, or screenshot-capture libraries to implement this effect.
  • Do not make the glass surface a normal sticky child inside a transformed or filtered ancestor.
  • Do not rely on scroll-sync screenshots or DOM cloning for refraction.
  • Do not hide controls behind decorative glass. Buttons and links remain semantic and keyboard accessible.
  • Do not leave a design mismatch untested. Capture the initial and scrolled states separately when the shape changes.
  • Do not mix the two paths in the same glass surface. Pick one library per surface.
  • Different surfaces in the same project CAN use different paths (e.g. header nav uses Path A, bottom bar uses Path B), but prefer consistency unless there's a specific reason to mix.
  • Do not use Path B when the design requires rim lighting, shape adaptation, or lens modes — those are Path A only.

Common Acceptance Checks

  • The component is SSR-safe and returns nothing until mounted when it needs document.body.
  • The fixed host stays visually stable during scroll.
  • The active item exposes aria-current and, for buttons, aria-pressed.
  • Touch targets are at least 44px high.
  • Reduced motion disables non-essential transforms or transitions.
  • Path A: Chrome/Edge get the real effect, Safari/iOS/Firefox get a frosted fallback via effectMode="auto".
  • Path B: Chrome/Edge get SVG displacement refraction, Safari/Firefox get CSS backdrop-filter fallback — both built-in, no config needed.

Troubleshooting: "Effect Not Working"

When the user reports the glass effect looks wrong, flat, or not as expected — ask these questions before changing code:

  1. Which browser and OS? — The effect degrades by environment. If they're on Safari/Firefox, they're seeing the CSS fallback by design, not a bug.
  2. Is backdrop-filter supported? — In DevTools, check if the computed backdrop-filter is applied. If not, the browser hit the third degradation layer (semi-transparent background, no blur).
  3. Is the host inside a transformed/filtered ancestor?position: fixed breaks inside transform, filter, or backdrop-filter ancestors. The glass host moves with scroll instead of staying fixed.
  4. Is the browser zoom at 100%? — Non-100% zoom can misalign SVG displacement maps on some browsers.
  5. Is hardware acceleration enabled?backdrop-filter often requires GPU compositing. Check chrome://gpu or equivalent.

If the user confirms they're on a fallback environment and wants the real effect, they need to switch to a supported browser (Chrome/Edge). If they're on Chrome/Edge and still see no effect, then investigate the code.

What ships with it: 7 files

2963.6 KB alongside SKILL.md

agents/

examples/

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.