Shiny Text

A zero-JS CSS gradient mask that sweeps a high-contrast specular gleam across headings, status pills, or feature callouts at configurable speed and angle.

#gradient#sheen#badge#css
Luminous Glass Specular

Customize

3.2s
#FFFFFF
#8E84A2

Installation

$pnpm dlx yourbrand@latest add @yourbrand/ShinyText-TS-TW
Usage (synced with live props)
<ShinyText
  text="Luminous Glass Specular"
  speed={3.2}
  shineColor="#FFFFFF"
  baseColor="#8E84A2"
/>

Source Code

ShinyText.tsx
"use client";

import React from "react";

export interface ShinyTextProps {
  text?: string;
  speed?: number;
  shineColor?: string;
  baseColor?: string;
}

export function ShinyText({
  text = "Luminous Glass Specular",
  speed = 3.2,
  shineColor = "#FFFFFF",
  baseColor = "#8E84A2",
}: ShinyTextProps) {
  return (
    <span
      className="inline-block bg-clip-text text-3xl font-medium tracking-tight text-transparent"
      style={{
        backgroundImage: `linear-gradient(120deg, ${baseColor} 35%, ${shineColor} 50%, ${baseColor} 65%)`,
        backgroundSize: "220% 100%",
        animation: `shinySweep ${speed}s linear infinite`,
      }}
    >
      {text}
    </span>
  );
}

Props API

PropTypeDefaultDescription
textstring"Luminous Glass Specular"Text to illuminate.
speednumber3.2Seconds per shine pass.
shineColorstring (hex)"#FFFFFF"Specular beam color.
baseColorstring (hex)"#8E84A2"Unlit resting text color.