Ballmac UI home

Gradient Text

Text filled with a gradient of theme colors that slowly drifts, or a shiny variant that sweeps a glint of light across it on a pause. Static under reduced motion; plain text in forced colors.

Introducing Acme 3

The calm way to ship software

One place for previews, rollbacks and logs. No pager at 3 a.m.

Installation

$ pnpm dlx shadcn@latest add @ballmac/gradient-text

Usage

import { GradientText } from "@/components/ballmac/gradient-text"

The full example is in the Code tab above.

Examples

Shiny

Acme Plus

New every week

API reference

PropTypeDefault
as

The element to render.

GradientTextElement"span"
variant

"flow" drifts the gradient across the text; "shiny" keeps it still and sweeps a glint of light over it.

"flow" | "shiny""flow"
colors

Gradient colors as CSS colors or variables.

string[]["var(--chart-1)", "var(--chart-4)", "var(--chart-5)", "var(--chart-3)"]
duration

Seconds for one drift (flow) or one sweep (shiny).

number—
repeatDelay

Shiny only: seconds between sweeps.

number2.4
angle

Gradient angle in degrees.

number100
shineColor

Shiny only: color of the glint. White reads best over saturated colors.

string"rgb(255 255 255 / 0.95)"

Also accepts the standard attributes of its root element.

Use with AI

Wrap a few words: <GradientText>ship software</GradientText> inside a heading, or as="h2". variant="flow" (default) drifts the gradient; variant="shiny" adds a periodic white glint. Colors default to --chart-1/4/5/3. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Gradient Text (@ballmac/gradient-text) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Highlighting two or three words in a hero headline
  • Product or plan names (shiny)

Not for

  • Body text or long passages (contrast varies along the gradient)
  • A muted loading shimmer on status text (use shimmer-text)

Registry JSON: https://ui.ballmac.com/r/gradient-text.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils