Metallic Button

A button framed by a chrome rim with a reflection that sweeps across.

Preview

"use client";

import { ArrowUpRight, Sparkles } from "lucide-react";
import { MetallicButton } from "@/components/motion/button";

export function ButtonMetallicPreview() {
  return (
    <div className="flex flex-wrap items-center justify-center gap-3 px-6 py-10">
      <MetallicButton>
        Continue
        <ArrowUpRight className="size-4" />
      </MetallicButton>
      <MetallicButton size="sm">
        <Sparkles className="size-3.5" />
        Generate
      </MetallicButton>
      <MetallicButton size="icon" aria-label="Magic tools">
        <Sparkles className="size-4" />
      </MetallicButton>
    </div>
  );
}

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/button-metallic

API Reference

className?
string

Classes merged onto the root element.

Default—
size?
"sm" | "md" | "lg" | "icon"

Height and padding; "icon" is a square icon-only button. Default: "md"

Defaultmd
pressScale?
number

Scale while pressed. Default 0.97: subtle, so the press reads as feedback, not a squash.

Default—
sound?
boolean

Play a soft press sound. Off by default; a `SoundProvider` can mute it app-wide.

Default—
paused?
boolean

Stops the traveling reflection while preserving the chrome rim.

Defaultfalse
Also on React Native. Spring press, ripple, icons and a stateful variant.

More in Button

Updated