Introducing Nyx UI v1.2.0

Liquid Metal Button

Buttons that behave like mercury when clicked. A fluid effect that reacts to the mouse pointer.

Installation

Usage

import { LiquidMetalButton } from "@/components/ui/liquid-metal-button";
<LiquidMetalButton theme="silver" size="md">
  Click Me
</LiquidMetalButton>
 
<LiquidMetalButton
  theme="gold"
  variant="outline"
  textured={true}
>
  Metallic Effect
</LiquidMetalButton>
 
<LiquidMetalButton
  theme="custom"
  customColors={{
    base: "rgb(30, 50, 100)",
    highlight: "rgb(100, 150, 255)",
    shadow: "rgb(10, 20, 40)",
    text: "rgb(240, 240, 255)"
  }}
>
  Custom Theme
</LiquidMetalButton>

Props

Liquid Metal Button

PropTypeDefaultDescription
variantstring"default"Button variant: "default", "outline", "ghost"
sizestring"md"Button size: "xs", "sm", "md", "lg", "xl", "2xl"
themestring"silver"Color theme: "silver", "gold", "copper", "mercury", "steel", "emerald", "sapphire", "custom"
customColorsobjectundefinedCustom colors for "custom" theme (base, highlight, shadow, text, border, glow)
clickEffectbooleantrueEnable click animation
hoverAnimationbooleantrueEnable hover animation
texturedbooleanfalseApply textured effect
iconReact.ReactNodeundefinedIcon displayed before children
iconAfterReact.ReactNodeundefinedIcon displayed after children
classNamestring""Additional CSS classes
childrenReact.ReactNodeundefinedContent of the button