23rd logo23rd

Shader Metal

Liquid metal ribbons in chrome, gold, copper, or graphite, lit by the pointer.

Preview

Installation

pnpm dlx shadcn@latest add @23rd/shader-metal

Or from the public GitHub registry:

pnpm dlx shadcn@latest add radiumcoders/23rd.dev/shader-metal

Usage

Pin it behind a relatively positioned section. The ribbons cross the middle, so copy sits best top-left.

"use client"

import { ShaderMetal } from "@/components/ui/shader-metal"

export function Hero() {
  return (
    <section className="relative isolate min-h-svh overflow-hidden bg-background">
      <ShaderMetal metal="gold" />
      <div className="relative z-10 mx-auto max-w-5xl px-6 pt-24">
        <h1 className="max-w-md text-4xl font-medium tracking-tight">
          Polished until it reflects the room
        </h1>
        <p className="mt-3 max-w-sm text-muted-foreground">
          The ribbons stay in the back. The key light follows the pointer.
        </p>
      </div>
    </section>
  )
}

Custom tint with more sheen:

<ShaderMetal color="#9FB7FF" iridescence={0.6} ribbons={4} />

Props

PropTypeDefault
metal"chrome" | "gold" | "copper" | "graphite"chrome
colorstringhex tint, overrides metal
ribbonsnumber3, 1–5
speednumber0.3
iridescencenumber0.2, 0–1 sheen
interactivebooleantrue
theme"light" | "dark" | "auto"auto
classNamestringReact only
classstringSvelte only