shadcn.io is not affiliated with official shadcn/ui
Spotlight Testimonial Card Block for React
One 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.
Installation
Overview
A single quote on a framed figure that reacts to the visitor, in a testimonials block for React with Base UI. A compact header names the story (Alderwick HVAC running forty technicians on Fieldnote, a fictional scheduling app) with a Shine Button at its end. Below it the quote sits in a panel drawn with solid hairlines and + marks on its four corners, between the page's rails. Move the pointer over the panel and a soft glow in your theme's text colour follows it, with a faint grid that appears only where the light falls; put a control inside the panel and the light settles on it when it takes keyboard focus. At rest, and on a touch screen, the glow simply sits near the top of the panel, so the first paint is already a finished design. It follows the theme in light and dark, uses no primary fill and is built from Frame Panel, Grid Pattern, Avatar, Guides and Shine Button, with Lucide's star, CSS gradients and masks and your theme's tokens. For landing pages and case-study teasers where one standout quote deserves a little life without any motion library.
FAQ
How do I change the quote and the person?
Edit QUOTE and AUTHOR at the top of the file, and point the link at the full story. Keep the quote to two sentences or so; the panel is sized for about thirty words at the large type size. Use the customer's exact words and ask them first.
How does the spotlight follow the pointer?
A small handler writes the pointer's position onto the panel as two CSS variables, --x and --y. Two decorative layers read them: a radial gradient made from your text colour at 10% with color-mix, and a grid masked by a radial gradient. There is no animation loop; the browser repaints when the variables change. When the pointer leaves, the variables are removed and the light returns to its resting place. The glow is greyscale, so it reads in every preset and keeps the Shine Button as the one primary control.
What about touch screens and keyboards?
Touch screens don't follow a finger, so the panel keeps its resting glow. For keyboards, the light moves to whichever control inside the panel has focus (the panel holds none, so the light stays at rest and the Shine Button in the header keeps the standard focus ring) and returns when focus leaves. The effect is decoration only: nothing is hidden or shown by it, and no control depends on it.
What does reduced motion change?
The light no longer follows the pointer or focus and stays at its resting place, and the entrance doesn't play.
How do screen readers read it?
The quote is a figure with a blockquote and a figcaption for the author, and the star row reads as "Rated 5 out of 5". The glow, the grid and the initials avatar are hidden from assistive technology. The Shine Button in the header reads as the single call to action. The panel's frame and + marks are lines drawn by Guides, which are hidden from assistive technology.
Does it work in right-to-left languages?
Yes. The quote sits in a bdi so its quotation marks stay at the ends of the sentence, the caption and header follow the reading direction, so the Shine Button moves to the start side. The light follows the pointer's real position on screen, so it needs no change.
Related
- Pro
Single Focus Testimonial Quote
One big quoteOne 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.
- 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
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
Featured Hero Testimonial
One big quoteA giant centred quote set as typography in a ruled band, with small avatar and icon chips sitting between its words like inline pictures, and a footer band that splits into the author and a Shine Button to the full story.
- “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
Left-Heavy Single Testimonial Hero
TestimonialsA split hero for a release management tool: copy and two calls to action beside one customer quote in a raised card in a card, with the customer's name, role and a before and after of their result.