Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Centered Diagonal Line Grid Hero Block for React

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.

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 large centered hero on a diagonal line grid, for React with Base UI. Thin lines cross at 45 degrees behind the copy, and a radial mask fades them out toward the edges of the page, so the texture reads as technical without competing with the text. On top of it: an announcement link, a display headline, one sentence, a ShineButton and an outline Button, both links. Under them, three checked features sit in ruled rows that run from rail to rail, the first rule with a + mark on each rail. The grid is our Grid Pattern, drawn in a foreground tone, so it follows every theme and dark mode. It's built from Grid Pattern, Guides, Announcement, Status, Shine Button and Button, with Lucide icons, Tailwind CSS and a CSS entrance that stays still under reduced motion. Made for developer tools, API products and infrastructure that want an architectural backdrop. The copy is for Halyard, a made-up typed API platform: replace it with your own.

FAQ

How do I change the grid's density, color or fade?

The lines are our GridPattern, a square grid drawn by one SVG pattern, turned 45 degrees so they run diagonally. It sits in an oversized layer (-inset-full) inside a clipping wrapper, so the turned square covers the whole section at any width. cellSize sets the spacing (32px here), lineColor the color, color-mix(in oklab, var(--foreground) 18%, transparent), and strokeDasharray turns the lines into dashes or dots. The fade is a radial mask-image on the wrapper, opaque near the middle and transparent at the edges: widen the ellipse to show more of the grid.

Does the background get in the way of reading or of screen readers?

No. The grid's layer is aria-hidden and ignores the pointer, so it's never announced, focused or clicked, and its lines are faint enough that every text keeps at least 4.5:1 contrast in every theme, light and dark. The announcement has a solid background, so its small text never sits on a line, and so do the feature rows. The headline is the page's one h1, the features are a list with their check marks hidden, and the announcement and both buttons are links named by their text. On Base UI, each button renders its link with render={<a href="#" />} and nativeButton={false}.

How do I edit the feature rows?

Edit the FEATURES array: each string is one row. The rows are a list with divide-y, so every row boundary is a solid hairline from rail to rail, and the first rule is drawn by a Guides layer so its + marks land on the rails. Text is centered on desktop and starts at the check mark on a phone, where a longer feature wraps with its check mark on the first line. The check marks use the foreground color: the theme's primary color is kept for the main button.

How does the line grid hero adapt to small screens?

The headline grows from text-4xl on phones to text-5xl and then text-6xl from the lg breakpoint. The two buttons stack, centered, and sit on the first screen with the feature rows below them. The grid keeps its spacing at every width: it tiles, it doesn't stretch.

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

It's CSS. The announcement, the headline, the sentence, the buttons and the feature rows each start transparent and 16px low through Tailwind's starting: variant (@starting-style), and rise into place when they first render, about 75 ms apart. The grid doesn't move. With reduced motion there is no transition, so everything renders at rest at once, and nothing runs in a script.

When should I use a line grid hero instead of a gradient or a crosshatch hero?

Use the line grid when you want a clean technical texture that suggests precision, behind copy that sits in the middle of the page. The crosshatch hero draws a denser grid that clears the middle and shows at the edges, and a gradient hero trades the texture for a soft glow, for a warmer, more consumer feel.

  • Pro

    A 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

    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.

  • Pro

    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.

  • Pro

    A showcase hero for a browser racing engine: one panel between solid page rails where a perspective floor grid rolls toward you under a beta pill, a headline, a Shine Button and an outline button.

  • Pro

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