ComponentsEditorial

Quote

Testimonial parts: a grid, divided or masonry group whose one to four columns step on a parent Section; figures in default, centred or muted tile style; quotes in four sizes with a byline.

Open the preview in a new tab

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

Installation

pnpm dlx shadcn add @01orbital/quote
npx shadcn add @01orbital/quote
yarn shadcn add @01orbital/quote
bunx --bun shadcn add @01orbital/quote

Part of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).

It lands at components/editorial/quote.tsx, as source you own and edit.

The example also uses section. Install it too:

pnpm dlx shadcn add @01orbital/section
npx shadcn add @01orbital/section
yarn shadcn add @01orbital/section
bunx --bun shadcn add @01orbital/section

Usage

import {
  Quote,
  QuoteAuthor,
  QuoteAuthorName,
  QuoteAuthorRole,
  QuoteFigure,
} from "@/components/editorial/quote"
import {
  Section,
  SectionContent,
} from "@/components/editorial/section"

// Every word on the page. Change copy here, not in the markup.
const COPY = {
  quote:
    "Good conversations make room for the people behind every message. The kit gave us that room without a redesign.",
  name: "David Saint-Jacques",
  role: "Product design, Orbcore",
} as const

// One quote as a testimonial section: centred on the reading column.
export default function QuoteDemo() {
  return (
    <Section>
      <SectionContent width="sm">
        <QuoteFigure variant="centered">
          <Quote size="lg">
            <p>{COPY.quote}</p>
          </Quote>
          <QuoteAuthor>
            <QuoteAuthorName>{COPY.name}</QuoteAuthorName>
            <QuoteAuthorRole>{COPY.role}</QuoteAuthorRole>
          </QuoteAuthor>
        </QuoteFigure>
      </SectionContent>
    </Section>
  )
}

Anatomy

Quote is built from 8 parts. In the example they nest like this:

QuoteFigure
├─ Quote
└─ QuoteAuthor
   ├─ QuoteAuthorName
   └─ QuoteAuthorRole
  • QuoteFigure: One quote with its byline, as a figure. Holds an optional QuoteHeader, then Quote, then QuoteAuthor. Spare height goes between them, so the byline sits at the bottom.
  • Quote: The quoted text, as a blockquote. Put the copy in one or more p children without quote marks: it draws an opening mark before the first paragraph and a closing mark after the last.
  • QuoteAuthor: The byline, as a figcaption. Holds QuoteAuthorName and QuoteAuthorRole, one above the other. With a QuoteAuthorAvatar it becomes two columns: the avatar spans both rows and the name and role sit beside it. In a centered figure it shrinks to fit and keeps its text left-aligned.
  • QuoteAuthorName: The author's name, in semibold.
  • QuoteAuthorRole: The author's role or company, in muted text under the name.
  • QuoteGroup: A group of QuoteFigure quotes in cols columns (1 by default). The columns measure the enclosing Section, so place it inside one: two across from 42rem, then the full count from 64rem.
  • QuoteHeader: A row above the quote, for a company name or logo, in small type.
  • QuoteAuthorAvatar: Holds the author's picture in QuoteAuthor, beside the name and role.

API reference

QuoteFigure

One quote with its byline, as a figure. Holds an optional QuoteHeader, then Quote, then QuoteAuthor. Spare height goes between them, so the byline sits at the bottom.

centered centers its content and text. muted sets it on a faintly filled panel with rounded corners and 24px padding. Inside a QuoteGroup it takes the group's spacing and dividing lines.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Quote

The quoted text, as a blockquote. Put the copy in one or more p children without quote marks: it draws an opening mark before the first paragraph and a closing mark after the last.

size sets the text size and maximum width: sm small text with no width cap, md (the default) body text, lg a larger lead, and xl a centered pull quote in the display font. lg and xl step up once the section is 42rem wide. Pass marks={false} to draw no quotation marks, as in <Quote marks={false}><p>“Already marked.”</p></Quote>.

Prop

Type

It also accepts the HTML attributes of the element it renders.

QuoteAuthor

The byline, as a figcaption. Holds QuoteAuthorName and QuoteAuthorRole, one above the other. With a QuoteAuthorAvatar it becomes two columns: the avatar spans both rows and the name and role sit beside it. In a centered figure it shrinks to fit and keeps its text left-aligned.

It accepts the HTML attributes of the element it renders.

QuoteAuthorName

The author's name, in semibold.

It accepts the HTML attributes of the element it renders.

QuoteAuthorRole

The author's role or company, in muted text under the name.

It accepts the HTML attributes of the element it renders.

QuoteGroup

A group of QuoteFigure quotes in cols columns (1 by default). The columns measure the enclosing Section, so place it inside one: two across from 42rem, then the full count from 64rem.

The default variant is a grid with even gaps. divided removes the gaps and draws a line between figures: across the page while they stack, and down between them when cols is above 1 and the section is 42rem wide. masonry flows the figures into columns of uneven height.

Prop

Type

It also accepts the HTML attributes of the element it renders.

QuoteHeader

A row above the quote, for a company name or logo, in small type.

It accepts the HTML attributes of the element it renders.

QuoteAuthorAvatar

Holds the author's picture in QuoteAuthor, beside the name and role.

It accepts the HTML attributes of the element it renders.

Dependencies

npm: class-variance-authority, cn. The CLI installs them for you.

Registry pieces it installs with it:

  • font-hanken-grotesk

On this page