liquid-metal-border

Add animated liquid-metal WebGL borders to React controls using the metal-fx package.

5.7k|685|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/MengTo/Skills --skill liquid-metal-border
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: liquid-metal-border
Source: https://github.com/MengTo/Skills/tree/main/agent-skills/web-design/liquid-metal-border
Command: npx skills add https://github.com/MengTo/Skills --skill liquid-metal-border

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires metal-fx.

What problem does it solve?

Adding premium animated metallic borders to React buttons, tabs, chips, and cards normally requires custom WebGL shader work and careful state, accessibility, and performance handling. This Skill provides a complete implementation playbook for the metal-fx package so the effect is installed, tuned, and verified correctly.

Core Features & Use Cases

  • Guided metal-fx Integration: Install, import, and wrap a single semantic host element with the MetalFx component using presets like chromatic, silver, and gold.
  • State-Driven Borders: Drive border strength, glow, and pause behavior from real active, selected, hover, and focus states while preserving aria-pressed semantics and focus outlines.
  • Tuning and Troubleshooting: Configure ring thickness, shader scale, radius, reflections, themes, reduced motion, and SSR behavior, with a failure-diagnosis section for common rendering issues.
  • Use Case: A developer wants the selected tab in a React settings page to show an animated liquid-metal ring that pauses when idle, respects reduced motion, and keeps a visible focus outline for keyboard users.

Quick Start

Ask your agent to use the liquid-metal-border skill to add a restrained chromatic metal-fx active border to a selected React button with reduced-motion support.

Frequently Asked Questions about liquid-metal-border

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a liquid metal border to a React button?

Install the metal-fx package, import the MetalFx component, and wrap a single semantic button element with it. Choose a preset like chromatic, silver, or gold, then tune strength and ringCssPx to control the border's intensity and thickness.

How to animate a border only on active or selected state in React?

Keep one mounted MetalFx instance and drive its strength prop from component state, using low values like 0.1-0.2 when idle and 0.75-0.9 when selected. Pair this with aria-pressed or aria-selected so the state is exposed semantically, and pause the shader when not highlighted.

Does metal-fx work with Next.js and server-side rendering?

Yes, metal-fx is SSR-safe and mounts its WebGL pipeline after hydration. In a Next.js App Router project, render it from a Client Component because the component uses client-side React hooks.

Why did my focus outline disappear after adding MetalFx?

The normalizeHostStyles prop defaults to true and removes the child's outline, background, border, and shadow. Set it to false and define your own :focus-visible outline in CSS to restore a visible keyboard focus ring.

Why are metal-fx reflections not showing in light mode?

Reflections are intentionally dark-mode only and are skipped automatically in light mode. Pass explicit element refs via reflectionTargets and verify the effect under the app's real dark theme rather than relying on the auto setting.

How do I reduce the performance cost of animated WebGL borders?

Mount the effect only on primary or stateful surfaces, pause non-active instances, omit reflections unless needed, and prefer disableGlow for dense toolbars. The package shares one WebGL context and pauses offscreen instances via IntersectionObserver.