shadcn.io is not affiliated with official shadcn/ui
Quarterly Year Review Testimonials Block for React
A year in four quarters for a deploy platform, in a card in card: a Q1 to Q4 bar filled up to the chosen quarter, and under it that quarter's quote beside its deploys and uptime.
Installation
Overview
Show a year of customer progress with this testimonials block for React with Base UI. A raised panel sits inside a tinted shell with + marks on its corners. Its top strip is a bar of four segments, Q1 to Q4, running the full width: the chosen quarter is solid in your text colour, never the primary, and the quarters before it keep a soft tint. Below it a divider splits one quote from that quarter's two numbers, deploys a week and uptime, each with how it moved since the quarter before. The bar is a SegmentGroup, the numbers a DataList and the speaker an Avatar, so every colour comes from your theme's tokens. The copy speaks for Fernhill Cloud, a fictional deploy platform, and no year is printed, so the block never goes stale. On a phone the two numbers sit side by side under the quote. Made for customer stories, year-end reviews, quarterly business reviews and any page where results grow over time and the people behind them have something to say about each stretch.
FAQ
How do I change the quarters, the quotes and the numbers?
Edit the QUARTERS array at the top of the file. Each quarter has an id, the segment's label, the quote and the speaker's name, initials and role, plus its two numbers: deploys a week, and uptime in tenths of a percent (992 shows as 99.2%). The "more a week than Q1" and "points up on Q1" notes, and the sentence under the headline, are worked out from these numbers, so nothing else needs editing. To measure something different, rename the two DataListItemLabels and change the fields they read.
How does the bar work, and what is the tint?
The bar is a group of four radio buttons drawn as segments. The chosen quarter is the solid one, and a tint fills the quarters before it, so the bar reads as how far through the year you are. The tint is a separate decorative layer that grows with a 300ms CSS transition; it is hidden from assistive technology.
How do keyboards and screen readers use it?
The bar is one group named "Quarter", with each segment named "Quarter 1" to "Quarter 4". Tab reaches the group, and the arrow keys move between the segments and choose them. After a visitor changes quarter, a polite status line reads out that quarter's two numbers, such as "Q3: 22 deploys a week, 99.8% uptime"; nothing is announced on load. The quote is a figure with a blockquote and a caption, and the numbers are a description list.
Does the page jump when the quarter changes?
No. All four panels are laid over one another, and the tallest decides the height, so the block is the same size for every quarter, at every width. The three unseen panels are hidden from screen readers and from the tab order, and only the chosen one is shown. It fades in over 300ms, and under reduced motion it simply appears.
How does it fit a phone, and a right-to-left page?
The four segments share the width equally down to 320px, and the panel stacks the quote above its numbers below the lg breakpoint, the two numbers side by side. In a right-to-left page the bar fills from the right and Q1 sits at the right, the divider moves to the other side, and every number and quote keeps its marks in place because each sits in a bdi.
How do I show real numbers, and what if I only have three quarters?
Fetch your figures on the server and pass them in as the QUARTERS array: the bar, the tint, the panel and the notes all follow its length, but the tint steps assume four segments, so for another count change the FILL widths to match (w-1/3, w-2/3 for three). Keep the quotes honest: each one should be about the stretch it sits under.
Related
- Pro
Milestone Rail Testimonials
Results and figuresA horizontal rail of five milestones, from Day 1 to Year 1, in a hairline frame: pick one to read what a customer team said at that point, with the milestones already passed checked.
- Pro
Zigzag Story Timeline Testimonials
Rows and listsA zigzag story rail with four stage bands between the page's rails, from Evaluating to Steady state: a centre line with a dot on each rule, and each stage's name and its quote swapping sides row by row on wide screens, stacked on phones. A Shine Button sits in the header.
- Pro
Metric Testimonials
Results and figuresFour testimonials for a UI kit in one hairline band, each cell headed by its own big figure, a gain, a multiple, a drop or a new value worked out from a before and an after, with the quote and the person underneath.
- Pro
Sortable Results Table Testimonials
Results and figuresA results table of five customers with a before, an after and the change between them, whose column headers sort it, in a band between the rails: a split divider sets the quote of whoever is at the top of the table apart from the table, with + marks where it meets the band's rule.
- 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
Timeline Hero
Updates and timelinesA start-aligned hero with a headline, a Shine Button and an outline action over a closing band of four milestone rows on a vertical hairline, shipped, current and planned.