Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Blockquote Testimonial Block for React

A 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.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

One customer quote, set the way a good article sets a quotation, for React with Base UI. A compact header introduces the story (here a team at Fernbrook that moved a whole frontend onto Loomkit, a component library). Below it a wide band between the page's solid hairlines holds the quote in serif type at display size, with plus marks where the band meets the rails. A second band beneath it holds the author's initials avatar, name, role and company, the source it came from, a Copy quote button that puts the quote on the clipboard along with who said it and where (and shows a check while it says "Copied"), and the one Shine Button, a link to the full story. On a phone the bands stack and the buttons wrap under the author. It's built from Copy Button, Shine Button, Avatar and Guides, with CSS transitions only and your theme's tokens. For case study pages, press kits and anywhere one considered quote is worth quoting again.

FAQ

How do I change the quote, the author and the source?

Edit QUOTE, AUTHOR and SOURCE at the top of the file. The text the button copies is built from the same three, so the clipboard always matches what's on the page: the quote in quotation marks, then a line with the author's name, role and company, then the source.

What exactly does the Copy quote button do?

It writes the quote and its attribution to the clipboard, and for three seconds the copy icon and label are replaced by a check and "Copied". A polite status inside the button tells screen reader users "Quote copied". If the browser refuses, for example on a page that isn't served over HTTPS or where clipboard access is blocked, the button shows a cross and announces that it couldn't copy.

How are the bands drawn?

The quote's band has a hairline above and below it, with a Guides marks="corners" rules="none" sides={false} putting a plus where each meets the page's rails. The caption row draws its own top rule with Guides marks="top" rules="top" sides={false}, so its plus marks land on the line instead of a pixel off, as a border-t would put them. All of it is decorative and takes your theme's colours.

How do screen readers read it?

The heading is the section's h2. The quote is a figure with a blockquote and a figcaption holding the author and a cite with the source. The avatar is hidden because the name is written beside it. The button is named "Copy quote" at all times; the label that swaps to "Copied" is visual only, since the status line already says it.

Does it work in right-to-left languages?

Yes. The padding and the layout use the inline sides, so the author sits at the start and the buttons at the end in Arabic or Hebrew, and the quote sits in a bdi so its quotation marks stay at the ends of the sentence.

Where does the serif type come from?

The quote uses your theme's font-serif. Point that token at the serif you load, or swap the class on the quote for font-sans if your brand doesn't use one.

  • Pro

    A magazine-style testimonial: a compact header with a Shine Button, then one long quote in two serif columns that open with a drop cap, on a page framed by hairline corners with + marks, with an em-dash byline and the publication it appeared in.

  • Pro

    A pull quote from a retailer's checkout case study between two double rules, in serif type with its opening quotation mark hanging into the margin and a small-caps attribution.

  • Pro

    An 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

    A customer letter set as plain prose with no card and no avatar, beside a header with one Shine Button and a hairline divider: a salutation, two paragraphs and a closing, signed by a name that writes itself in.

  • Pro

    A split call to action led by one customer quote, with a marker stroke drawn across its key phrase and the author beneath in the wide cell, and the headline and a Shine Button to the full story in the narrow one.

  • Pro

    A 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.