Chrome Text

Pro

Liquid chrome text effect: inflated metal letters with sliding glints and sparkles.

textchromemetallicliquid metalheadlinetypographywebgl
Chrome Text component preview

Overview

Chrome Text is a React and Tailwind CSS chrome text effect that casts any headline in liquid chrome, in Next.js or any React app, with no dependencies. A distance field turns each glyph into a round metal tube, and a WebGL shader reflects a moving studio off it, so glints slide along polished strokes. The real text stays selectable underneath. Bevel, shine, contrast, light angle, tint and sparkles are props, and the light can follow the pointer. It rebuilds only when the text, font or size changes, sleeps off screen and holds still under reduced motion.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add chrome-text

Usage

Import ChromeText from @/components/wensity/chrome-text and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { ChromeText } from "@/components/wensity/chrome-text";
export default function Example() {
return (
<ChromeText as="h1" className="text-7xl font-bold tracking-tight">
Liquid chrome
</ChromeText>
);
}

Props

PropTypeDefaultDescription
as"span" | "p" | "div" | "strong" | "h1" | "h2" | "h3" | "h4""span"Element rendered around the text. Use h1 or h2 for headlines.
metal"silver" | "gold" | "graphite""silver"Polished silver, warm gold, or dark graphite chrome.
tintstring-Any hex color to tint the chrome with. Overrides metal.
bevelnumber0.7How round the strokes are, from 0.5 for a flat bevel to 2 for fully inflated.
shinenumber2Strength of the moving specular glint, from 0 for none to 2.
contrastnumber0.7Depth of the reflections, from 0 for soft satin to 1 for mirror chrome.
lightAnglenumber135Where the key light sits around the text, in degrees. 135 lights from the top left.
theme"auto" | "light" | "dark""auto"Adds a soft contact shadow on light pages. Auto follows the dark class on the html element.
speednumber0How fast the light drifts across the metal, from 0 for still to 3.
sparklesnumber3Number of star glints twinkling on the edges, from 0 to 6.
interactivebooleanfalseThe light follows the pointer, so glints slide under the cursor.

Featured in React hero section components and React 3D components.