shadcn.io is not affiliated with official shadcn/ui
Single Focus Testimonial Quote Block for React
One long customer quote for a release-automation tool, cut into sentences: hover, tap or focus a sentence and the others recede. A split with a header rail, a solid divider and the quote set large, with a Shine Button at its foot.
Installation
Overview
A single customer voice, read one sentence at a time. The block is a split: a rail at the start holds the headline, a line on who is speaking and a how-to pinned to its foot, and a solid divider (with + marks where it meets the top rule) sets it apart from the quote on the other side. The quote is set large; point at a sentence, tap it, or tab in and use the arrow keys, and that sentence stays at full strength while the rest settle back to your theme's muted text colour. At rest every sentence is at full contrast. The speaker and one Shine Button to the full story sit under the quote. On a phone the parts stack under a rule. It's built from Avatar, Guides and Shine Button with CSS transitions only and your theme's tokens. For landing pages and case-study openers where one long testimonial is the proof.
FAQ
How do I change the quote?
Edit SENTENCES and AUTHOR at the top of the file. Each entry in SENTENCES is one sentence and keeps its trailing space, so the quote reads as one paragraph. Three sentences is the sweet spot; more than five makes the focus effect feel fussy. Use the customer's exact words and ask them first.
How is the split drawn?
The page column is a two-column grid from lg: a 20rem rail and the quote. The quote's column carries the divider as a start border, and a Guides with marks="start" puts the + mark where it meets the top rule. Each column has its own vertical padding, so the divider runs the full height. Below lg the columns stack, with a rule and + marks between them.
How does the keyboard work?
Tab moves into the quote and stops once, on one sentence. The arrow keys move between sentences (Down and the reading-direction arrow go forward, Up and the other arrow go back), Home and End jump to the first and last, and Escape leaves the quote. The Shine Button is the next tab stop.
What happens on a touch screen?
There is no hover, so tapping a sentence focuses it and the others recede. Tap elsewhere to bring them all back to full strength.
Where does the button go?
It is the block's one primary control: point its href at the full story.
On Base UI, the link renders through render={<a href="…" />} with nativeButton={false}.
Related
- Pro
Spotlight Testimonial Card
One big quoteOne customer quote for a field-service app on a figure framed by hairlines with + marks on its corners, lit by a pointer-following spotlight: a soft glow and a grid that shows only where the light falls, which also follows keyboard focus on any control you place inside it. A Shine Button in the header row links to the full story.
- Pro
Keyword Highlight Testimonials
Filter and searchFive customer quotes about a UI kit, set large in ruled bands under keyword chips: pick one and every quote that mentions it marks the words, lights a bar and counts where it comes up.
- Pro
Highlight Quote Testimonial
One big quoteA full customer review of Copperline, a code-review tool, beside its best sentence pulled out large with the author: the same sentence carries a marker stroke in the review. One hairline band, split in two, with a Shine Button link in the header.
- Pro
Large Quote Testimonial
One big quoteAn oversized quote whose type scales with its own container, in a band with the attribution running vertically in a rail at the end edge.
- “Pro
Featured Testimonial Hero
TestimonialsA compact start-aligned hero with a headline, a Shine Button and an outline action over a closing band that holds one customer's quote, large, beside their rating, name, role and the number it is about.
- Pro
Blockquote Testimonial
One big quoteA statement quote in serif type between hairlines, with its author and cited source beneath, a Copy quote button that copies the quote together with its attribution, and one Shine Button.