Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Centered Shimmer Text Headline Hero Block for React

A compact centered hero whose second headline line glints as a light runs through it, with a launch pill, the Shine Button and four stats in cells below.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A compact centered hero where the headline is the centerpiece, for React with Base UI, shown here for Tidewater, a deploy platform. A launch pill links to the release, then a bold two-line headline whose second line, "extraordinary", glints as a light runs through it from its first letter to its last, over a faint monochrome glow. A promise, the filled Shine Button, an outline Button and a short trust line follow. Below, four stats in tabular figures sit in separate cells whose hairlines run a little past their corners, with a + mark at each top start corner. It's built from Shimmering Text, Announcement, Badge, Status, Guides, Shine Button and Button, with Tailwind CSS: the shimmer and the entrance are CSS, and both rest for visitors who ask for reduced motion. For product launches, creative tools and developer platforms, where the words should carry the page.

FAQ

How do I change the shimmer's speed and colours?

The second line is a ShimmeringText. duration is one pass of the light plus its short rest, in milliseconds: 3000 here, a calm glint, where its default of 2000 suits a loading label. baseColor is the text's colour at rest, var(--foreground) so the line reads as part of the headline, and shimmerColor the colour each letter takes as the light passes, var(--muted-foreground). Both take any CSS colour, so a theme token keeps the effect right in light and dark. Add wave and each letter also lifts a little as the light reaches it.

How does the light run through the word?

ShimmeringText splits the word into one span per letter, and each letter runs the same short colour keyframes, delayed by its place in the word, so the light travels from the first letter to the last and one pass takes the same time whatever the word's length. It animates color only: no gradient clipped to the text, no canvas and no JavaScript timer, so it works with any colour format your theme uses and renders the same from the server.

Do screen readers read the headline correctly?

Yes. The page has one h1, read as "Build something extraordinary": ShimmeringText gives the word once as visually hidden text and hides the letter-by-letter spans from assistive technology, so the word is never spelled out. With reduced motion turned on in the system, the letters rest in their base colour and the entrance doesn't move. The stats are a description list, so each value is read with its label, and the pill is one link named by its whole sentence.

How does this hero adapt to small screens?

The headline steps down from text-6xl to text-4xl and keeps "extraordinary" on a line of its own. The two actions stack on a phone, and the Shine Button ends about 350 px down the first screen. The four stats form a two-by-two grid on a phone and one row from the lg breakpoint; the cells keep a gap as wide as their overshoot, so their lines meet between them.

When should I use a shimmer headline instead of a standard centered hero?

Use it for a launch, a rebrand or a creative tool, when the headline itself is the strongest thing you have to show and one word deserves the eye. Keep the light on a single word or a short phrase: running through a whole sentence, it becomes noise. Use a standard centered hero, or one with a product shot, when a screenshot explains the product better than the words do.

  • Pro

    A start-aligned statement hero whose headline ends on two words that fade from the text color toward the page, with a Shine Button, an outline button and a ruled band of three proof cells.

  • Pro

    Typewriter Hero

    Type and motion

    A compact centered hero whose headline types four words in turn behind a caret, with a Shine Button, a second action and a closing band with an avatar row and a pause button.

  • Pro

    Typing Animation Hero

    Type and motion

    A compact hero whose descriptive sentence types itself out once, behind a caret, in a framed box under a static headline, with a Shine Button, a second action and a ruled list of plan facts.

  • Pro

    A compact, centred hero for a design tool on solid rails: concentric rings breathe behind a headline, a Shine Button and an outline button, over a ruled band of three stats.

  • Pro

    Animated Counter Hero

    Stats and live data

    A compact centered hero for an invoicing app with an announcement pill, a Shine Button and a second action, over a hairline band of four figures that count up when they scroll into view.

  • Pro

    Centered Minimal Hero

    Type and motion

    A compact centered type-only hero: a two-line headline with a muted second line, one sentence, a Shine Button and a second action, on faded rails.