shadcn.io is not affiliated with official shadcn/ui
Crosshair Quad Tile Grid Stats Block for Radix UI
Four support-desk figures in the four quadrants of a crosshair, with a hairline cross at the centre where a round badge names the quarter, each with its value and its change on the quarter before.
Installation
Overview
A crosshair KPI grid for React with Radix UI. A compact header states the quarter's headline ("Customers rated 94.2% of our replies satisfied in Q3") and the band below it is cut into four quadrants by one vertical and one horizontal hairline that cross at its centre, under a small round badge that names the quarter. The vertical line reaches up to the band's top rule, and the horizontal line is a rule with a + on each rail, so the cross is part of the page's drawing. Each quadrant is a label, a value that rolls up, and the change on the quarter before as an arrow and a signed number: customer satisfaction, median first reply, open backlog and reopened tickets for a support desk. Every value, change and the headline number are computed from one typed pair of quarters. On a phone the four quadrants become four rows, each under its own rule, and the centre badge is hidden. It's built from Guides, Badge and SlidingNumber.
FAQ
How do I change the figures and the quarters?
Edit QUARTER, BEFORE and KPIS at the top of the file. A figure has a label, this quarter's value, the previous one, a suffix, its decimals and a change kind: points for a rate (+1.4 pts) or unit for a count in the figure's own unit (−5 min). The values, the signs, the arrows and the headline are read from them. The quarter names are plain text, so the copy never goes stale.
How is the cross drawn?
It is made of the page's own lines, not a picture. The band's top rule comes from Guides, the second row of cells has a Guides rule on top (with a + at each rail and one at the centre), and the second column has a start border that runs from the top rule to the foot. The round badge is absolutely positioned with inset-0 and m-auto, which centres it on the crossing with no offsets, so it stays centred in right-to-left pages and at any height.
What happens on a phone?
The grid becomes one column of four rows. The vertical line and the centre badge go away, and each row after the first gets its own rule with + marks on the rails, so the horizontal lines survive. The DOM order never changes: satisfaction, first reply, backlog, reopens.
Is it accessible?
Yes. The four quadrants are list items, each with a heading for its label. The badge is decorative and hidden from assistive technology, because the quarter is also written in the header and in each change ("vs Q2"). The arrows are hidden too, since the sign says the same; the minus is a true minus sign, read as "minus". Numbers sit in bdi elements, and signed changes are kept left to right.