Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Centered Radial Gradient Stats Hero Block for React

A compact centered hero under a soft monochrome glow, with the side rails fading in from the top, an announcement link, a Shine Button, an avatar row and a band of three figures.

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 that opens the page, for React with Base UI. A soft glow of the theme's foreground color, a single CSS radial gradient, lifts from the top edge behind the headline, and the two side rails of the page fade in from nothing at the same point. An announcement link, a two-line headline and one sentence of copy lead to the one main action, a ShineButton with a light that sweeps across it on hover, and an outline Button beside it. A row of avatars and the number of teams follow. Under them a band runs from rail to rail, ruled with a solid hairline and a + mark on each rail, and shows three figures between dividers. The page's other blocks keep the same rails, so they stack into one drawing. It's built from Announcement, Status, Shine Button, Button, Avatar and Guides, with Lucide icons, Tailwind CSS and a CSS entrance that stays still under reduced motion. Made for developer platforms and SaaS landing pages where confident type and a few numbers do the work. The copy sells Larkspur, a made-up edge deploy platform: replace it with your own.

FAQ

How do I change the glow's color, strength or shape?

The glow is one radial-gradient on an aria-hidden layer at the top of the section, so it runs the full width of the page. It mixes var(--foreground) into transparent with color-mix(in oklab, …) at 11%, which reads as a soft shade in a light theme and a soft light in a dark one. Raise or lower the percentage to change the strength, and change ellipse 55% 80% at 50% 0% to change its size and where it is anchored. The glow is monochrome on purpose: the theme's primary color is kept for the one main action. Use the tokens as they are: the theme's colors are oklch values, so hsl(var(--foreground)) would be an invalid color and draw nothing.

How do I edit the stats band?

Edit the STATS array: each entry is a value, shown as written (38, 99.99%, 11 s) in tabular figures, and a label under it. The band is a description list in three equal columns with divide-x, so the dividers follow the layout in right-to-left languages, while each value stays left to right (dir="ltr"). Its top rule and the two + marks come from a Guides layer, not a border, so they land exactly on the crossing with the rails. The figures in the demo are samples: swap in numbers you can stand behind. On a phone the three columns stay in a row, with the labels wrapping onto two lines.

How do I show my own users in the avatar row?

Edit the MEMBERS array: each avatar is an image src and the initials its AvatarFallback shows while the image loads, or if it fails. AvatarGroup overlaps them and rings each one in the page's background color so they stay apart. Only show photos of people who agreed to it. The row is hidden from screen readers, since the sentence beside it carries the claim, so update the number in that sentence too.

Is this gradient hero accessible?

Yes. The headline is the page's one h1. The glow is decorative and hidden from assistive technology, and it's light enough that the copy and the stat labels keep at least 4.5:1 contrast in every theme. The announcement and both calls to action are links, each named by its text, and the stats are a description list, so each figure is read with its label. On Base UI, each button renders its link with render={<a href="#" />} and nativeButton={false}.

How does the entrance work, and what happens with reduced motion?

It's CSS. Each part starts transparent and 12px low through Tailwind's starting: variant (@starting-style), and a transition brings it to rest when it first renders: the announcement, then the headline, the sentence, the buttons, the avatar row and the stats band, each a little later. The Shine Button's light only moves on hover, focus or press, and with reduced motion it fades in where it stands. With reduced motion, motion-reduce:transition-none removes the entrance and everything renders at rest. The block has no state and runs no script.

When should I use a gradient hero instead of a pattern or a split hero?

Use the gradient when you want a quiet lift of light behind the headline, with proof underneath, and no artwork. Use a line grid hero when you want a technical texture, and a split hero when you have a product screenshot to show beside the copy.

  • Pro

    A centered showcase hero over a quiet monochrome mesh that drifts slowly behind the section, with a Shine Button, an outline button and a framed window of a moodboard canvas that runs on below the fold.

  • Pro

    A split hero between solid rails: a headline with a Shine Button and an outline button on one side, and on the other a framed panel where soft orbs of the theme's foreground drift slowly behind three stats.

  • Pro

    Hero With Stats

    Stats and live data

    A split hero with a headline, a Shine Button and a second action beside a rail of four key figures on shared hairlines, each with its period and a small bar trend.

  • Pro

    A large centered hero over a diagonal line grid that fades toward its edges, with an announcement link, a Shine Button and three checked features as ruled rows between the rails.

  • Pro

    Avatar Stack Side Rail Hero

    Logos and social proof

    A compact hero for a community: a headline, a Shine Button and a second action beside a side rail of proof: a stack of member avatars over a line of social proof, then three stats in ruled rows.

  • 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.