shadcn.io is not affiliated with official shadcn/ui
Centered CTA Dotted Background Hero Block for React
A showcase centered hero on a dot grid framed by hairlines: the dots light up near the pointer, with a release pill, a display headline, a Shine Button and an outline button.
Installation
Overview
A centered hero with a dotted grid behind the copy. The grid fills a hairline frame with + marks on its corners, set between the rails; the dots fade out toward the frame's edges so they never compete with the headline, and the ones near the pointer light up in the theme's foreground color as it moves. Inside sit an announcement pill for the latest release, a headline at display size, a muted sentence, a Shine Button as the one primary action and an outline button. It's built from our Dot Pattern, Guides, Announcement, Status, Shine Button and Button, with Lucide icons, Tailwind CSS and a CSS entrance. The fictional product is Skiff, a deploy platform. For developer tool launches, minimal SaaS sites, API products and any landing page that wants a quiet texture instead of a gradient.
FAQ
How do I change the dots' size, spacing and strength?
The frame's fill is a DotPattern. Its gap is the space between dots, in pixels (22 here), and dotSize each dot's diameter (2.5). dotColor takes any CSS color: here it's 15% of the theme's --muted-foreground, faint enough that the sentence over it stays above the 4.5:1 contrast. Raise it for stronger dots if your copy is larger or darker. fade decides where they fade out: radial (toward every edge, as here), top, bottom or none.
What lights up near the pointer, and can I turn it off?
Dots within 120 px of a mouse or pen pointer brighten, grow a little and get a soft halo, and the light fades out where the pointer leaves. The glow color is set to the theme's --foreground, so the primary color stays on the one button. Touch doesn't light the dots. Pass interactive={false} to turn it off, glowColor for another color, proximity for its reach, and intensity (subtle, medium or strong) for how bright it gets.
Why is the slow wave off?
DotPattern can also send a slow diagonal wave across the dots. A hero's background should stay still behind the headline, so this block passes speed={0}, which turns the wave off and leaves only the pointer light. Pass speed={1} for a pass every 12 seconds. Under reduced motion the wave stops anyway, and the light follows the pointer without gliding.
Is this hero accessible with the dots behind it?
The dots are decoration: hidden from screen readers and from the pointer's hit testing, so every click lands on the copy. They're faint behind the text, the pill blurs what's under it, and the headline, sentence and buttons keep their contrast in both themes. The headline is the block's one h1, and the pill and both calls to action are links named by their text.
Where do the buttons link to?
The pill, Get started and See how it works are links to #: point them at your changelog, your sign-up page and your product tour.
On Base UI, each button renders its link with render={<a href="/signup" />} and nativeButton={false}.
How does it fit on a phone?
The frame keeps its margin from the rails and its padding steps down. The headline steps down from text-6xl to text-4xl and drops its forced line break below the sm breakpoint, wrapping balanced instead. The two buttons wrap onto two centered rows when they run out of room, the pill shortens its message with an ellipsis, and the dots keep their spacing at every width.
Related
- Pro
Centered Crosshatch Background Hero
BackdropsA compact centered hero for a magazine on a crosshatch weave that fills the page column between the rails, with a pill, a headline, a Shine Button and an outline button.
- Pro
Centered Diagonal Line Grid Hero
BackdropsA 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
Centered Noise Texture Hero
BackdropsA compact centered hero on a fine paper texture inside a hairline frame, with an announcement pill, a two-line headline, three features and the Shine Button.
- Pro
Centered Radial Gradient Stats Hero
BackdropsA 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.
- Pro
Centered Minimal Hero
Type and motionA 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.
- Pro
Centered Tech Icon Row Hero
Logos and social proofA showcase centered hero for an integrations story, with a headline, a sentence, a Shine Button and six tool tiles below on shared hairlines, each with what the product does with the tool.