Liquid Metal
A premium button component with a mesmerizing liquid chrome border effect using WebGL shaders. Perfect for CTAs and hero sections.
Loading Preview...
Install using CLI
npx shadcn@latest add "https://www.vengenceui.com/r/liquid-metal.json"Install Manually
1
Install dependencies
2
Add util file
lib/utils.ts
3
Copy the source code
Copy the code below and paste it into components/ui/liquid-metal.tsx
Usage
Color Themes
All available color themes in one view: Chrome, Blue, Gold, Prism, and Emerald.
Loading Preview...
Props
LiquidMetalButton
| Prop Name | Type | Default | Description |
|---|---|---|---|
| children | React.ReactNode | - | The button text/content. |
| icon | React.ReactNode | - | Optional icon displayed on the left side of the button. |
| size | 'sm' | 'md' | 'lg' | 'md' | Size variant of the button. |
| borderWidth | number | 4 | Width of the liquid metal border in pixels. |
| metalConfig | LiquidMetalProps | - | Configuration object for the liquid metal shader effect. |
| className | string | - | Additional CSS classes for the button container. |
| disabled | boolean | false | Whether the button is disabled. |
metalConfig (LiquidMetalProps)
| Prop Name | Type | Default | Description |
|---|---|---|---|
| colorBack | string | '#888888' | Base background color of the liquid metal effect. |
| colorTint | string | '#ffffff' | Tint/highlight color for the chrome reflections. |
| speed | number | 0.4 | Animation speed of the fluid movement (0.1 - 2.0 recommended). |
| repetition | number | 4 | Pattern complexity (1 - 10). |
| distortion | number | 0.15 | Wave distortion amount (0 - 1). |
| scale | number | 1 | Scale of the effect texture. |
Credits
This component was created by Anshu.