Back to elements
ElementData DisplayFree

Blockquote React component

A quote with its author: a rule on the left, a large quotation mark, a framed card or a big centred pull quote, revealed as it scrolls into view with a highlighter sweeping across the phrase that matters.

When to use the Blockquote component

Use Blockquote for testimonials, quotes in articles and case studies, and pull quotes that break up long pages. The highlight draws the eye to the one phrase you want people to remember.

Use the card style in grids of testimonials, the bar style inside running text, and pull for a single statement between sections.

Installation

Add the Blockquote component to your project with the shadcn CLI. It lands in components/blockquote.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add https://reactframe.com/r/blockquote.json

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Props

<Blockquote /> accepts 11 props, all optional.

  • children

    The quote. A string can have a phrase marked with highlight.

    React.ReactNode
    Default: "The best interfaces disappear. People shouldn't notice the tool, only that the work got …
  • author
    string
    Default: "Maya Chen"
  • role
    string
    Default: "Head of Design, Northwind"
  • avatar

    Author photo URL; initials are used when it's missing.

    string
  • cite

    Source URL, linked from the author line and set as the cite attribute.

    string
  • variant

    bar: rule on the left. mark: large quotation mark. card: framed. pull: large and centred.

    "bar" | "mark" | "card" | "pull"
    Default: "bar"
  • highlight

    A phrase inside the quote to mark with a highlighter sweep.

    string
    Default: "only that the work got easier"
  • accent

    Colour of the bar, mark and highlight.

    string
  • animateIn

    Play the reveal the first time the quote scrolls into view.

    boolean
    Default: true
  • theme
    "dark" | "light"
    Default: "dark"
  • className
    string

FAQ

How do I highlight part of the quote?
Pass the quote as text and set highlight to a phrase that appears in it. A marker sweeps under that phrase when the quote comes into view, even across line breaks.
Is the source linked?
Set cite to the source URL. It becomes the blockquote's cite attribute and the author's name links to it.
When does the animation play?
Once, the first time 40% of the quote is on screen. Set animateIn={false} to show it straight away; reduced motion shows the final state.

Related components

Basic Table
Free
List Group
Free
Chat Bubble
Free
Variant Swatches
Free
Content Switch
Free
Floating Label Input
Free