shadcn.io is not affiliated with official shadcn/ui
Featured Quote With Metric Card Logos Block for React
A software company's quote for a cloud cost tool, with an inset before and after card under it: six minutes to eleven seconds, with two bars drawn to scale.
Installation
Overview
A featured-quote logo block with a result for React with Base UI. At the start, the customer's wordmark sits on a plate: an icon knocked out of a badge above the name in heavy type, with "Customer since 2022" and a fact about their spend at the foot. A hairline divider, with a + mark where it meets the top rule, separates it from the quote: a blockquote in two sentences, the person who said it with an avatar, and under them an inset card that backs the quote with a number. The card says "Time to find a cost spike", a badge with "97% faster", then "Before 6 min" and "After 11 s" either side of an arrow, and two bars drawn to scale, the after bar about three percent of the before bar. The arrow mirrors in a right-to-left page and the bars keep their direction. Built from Avatar, Badge and Guides, with a CSS transition for the entrance and your theme's tokens for every colour. For a story whose proof is a single before and after.
FAQ
How do I change the before and after?
Edit RESULT at the top of the file: a label for what was measured, the before and after as a display label and a number of seconds, and the faster badge text. The after bar's width is computed from the two numbers, so the bars always match the figures: change the seconds and the bars follow. Write the badge text yourself: it is a rounded percentage, and a hand-typed one that disagrees with the figures is the usual mistake.
How is the card marked up for screen readers?
The before and after are a description list: each term ("Before", "After") with its value, so a screen reader reads "Before, 6 min. After, 11 s". The two bars and the arrow are decoration and are hidden from assistive technology, because the figures already say it. The quote is a figure with a blockquote and a figcaption; the card is a sibling of the figure, so the caption stays the figure's last child.
What changes in a right-to-left page?
The columns swap sides, the arrow between the figures mirrors so it points from before to after, and the figures are wrapped in bdi so "6 min" and "11 s" keep their order. The bars stay left to right (dir="ltr"), because a bar's length is a magnitude and not text. The wordmark keeps its own direction, as a logo would.
Why does the plate sit above the quote on a phone?
On a phone the parts stack in reading order: the plate, a horizontal rule with + marks, then the quote and the card. From lg the plate sits at the start beside the quote, with a vertical hairline between them. The rails and the top rule come from the page spine, so the block lines up with its neighbours.
Related
- Pro
One flagship customer's wordmark plate beside a display-size quote and who said it, for a vet-clinic booking tool, split by a hairline divider.
- Pro
A survey tool customer's quote under a ruled band that carries a rating chip, five stars and 4.9 from 312 reviews, beside the customer's wordmark plate.
- Pro
A flagship customer's wordmark and quote for a customer feedback tool, with a closing band of three more customers, each a wordmark and a one-line result.
- Pro
A bento of five customers for a payments product: a flagship story across two columns beside four cells that alternate between a quote and a big figure, each led by the customer's wordmark.
- Pro
Before and After Testimonials
Results and figuresTwo quotes from one customer, the first week and month six, as two cells with a connector between them that holds the person and what changed, each change worked out from its before and after.
- Pro
Impact Ring Testimonials
Results and figuresFour impact rings in a reverse split: each result is a share worked out from the customer's own counts, drawn as a ring with its percentage inside, in cells that share hairlines beside a header with a Shine Button.