shadcn.io is not affiliated with official shadcn/ui
Diagonal Split Showcase Hero Block for React
A split hero cut on a diagonal between solid rails: a copy panel with a Shine Button slanting over a tinted panel of three live numbers, each with its own bar sparkline.
Installation
Overview
A bold split hero with a diagonal seam, drawn on the same solid page rails as the pricing blocks. On one side, a copy panel holds a release badge, a two-line headline, a subtitle that leads with what the product is, a Shine Button and an outline Button, both as links. Its far edge is cut on a slant, and it overlaps a tinted panel that holds three numbers of a fictional deploy platform (deploys a day, median deploy, fast rollbacks) as rows of one hairline stack, each with a small bar sparkline in foreground tones. The two panels slide in from their own sides, the stats rise one after another, and the cut mirrors itself in a right-to-left layout. It's built from Badge, Status, Button, Shine Button and Guides, with a CSS clip path for the seam, CSS transitions for the entrance and your theme's tokens for every colour. The primary colour marks the one action. For bold brand statements, developer platforms, manifesto launches and any page that wants a memorable first screen.
FAQ
How do I change the angle of the diagonal?
The cut is the copy panel's clip-path: polygon(0_0,100%_0,88%_100%,0_100%) keeps the whole top edge and ends the bottom edge at 88% of the panel's width, so the seam leans 12% across. Lower 88 for a deeper slant, and change the right-to-left polygon (12%_100%) and the seam's line (x1="88") to match. The tinted panel tucks under the copy panel by -ms-24 and pads its content by ps-36; widen both together if you make the cut deeper, so the numbers never sit under it.
How do the two panels stay apart in both themes?
Nothing is forced dark. The copy panel is bg-background and the numbers panel a solid mix of --muted and the background under it, so in a light theme both are light and in a dark theme both are dark, and the slanted edge shows as a change of tone. A hairline in your border colour runs along the seam, the rows of numbers are ruled with divide-y, and the whole hero sits between the page's side rails with a top rule, like every block in this set.
How do I change the numbers and their sparklines?
Edit STATS: each has a value, written as you want it shown (48K, 11s, 99.9%), a label and bars, twelve Tailwind height fractions (h-2/5, h-3/4, h-full) from oldest to newest. The last bar is drawn in full strength and the others in a faint foreground tone, so the primary colour stays on the button. The bars are decoration, hidden from screen readers; the value and its label carry the fact. Each value is isolated with bdi, so 99.9% keeps its sign in a right-to-left layout.
Is the diagonal hero accessible for screen readers and keyboard users?
Yes. The cut is only a clip path, so it changes how the panel looks and nothing that's read: the badge, the h1, the subtitle and the two links read in order, then the numbers under their h2 as a description list, each value with its label. The seam's line and the sparklines are hidden from screen readers. Both calls to action are links with a visible focus ring, every text meets WCAG AA contrast, and with reduced motion the panels and rows appear in place.
How does the diagonal split adapt to small screens?
Below the lg breakpoint the two panels stack, the copy panel on top, and the cut is dropped: a slant across a narrow screen would eat into the text. The panels then meet on a straight line with a hairline, and the numbers panel loses its overlap and its extra padding. Both buttons are on the first screen of a phone, the rows of numbers follow below it, and nothing scrolls sideways down to 320px.
When should I use a diagonal split instead of a standard split hero?
Use it when the first impression should be a statement: a manifesto, a studio, a launch with a strong point of view. The slant pulls the eye to the copy, and the numbers on the other side back it up. Use a standard split hero when you need to show the product beside the copy, or when the copy is long: the cut takes some of the panel's width, so it suits a short headline and a short subtitle best.
Related
- “Pro
Split Quote Panel Hero
TestimonialsA reverse split hero that opens with a customer quote: a tinted panel on the start side in three ruled bands (quote, author, two results), and the headline and a Shine Button at the end.
- Pro
Two Columns Hero
Features and tablesA split hero for a deployment platform: an announcement pill, headline, a ruled checklist and a Shine Button with a second action, across a solid divider from a framed drawing of the deployments page.
- Pro
Metric Tiles Hero
Stats and live dataA compact left-aligned hero for an edge network with a live status pill, a Shine Button and an outline button at the end of the row, and four metric tiles below, each a ruled cell with a trend.
- Pro
Split Layout Image Hero
Product windowsA reverse split hero for an AI code assistant: an editor drawn from UI runs edge to edge to the start rail, with a file tree, code, a ghost suggestion and an assistant panel; a divider and the copy sit at the end.
- Pro
Concentric Rings Hero
BackdropsA 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
Split Panel Comparison Hero
Features and tablesA split hero for a status-page product: the headline and two calls to action beside a comparison table against a self-hosted page, in a hairline frame.