Quote

What someone said, with their name, what they do and their photo: a client, a review, the press.

When to use it

What someone said, with their name, what they do and their photo: a client's review, a line from the press.

When not to

Quotes inside a paragraph (write them in the text) and long testimonials.

Accessibility

The words are a block quote and the person is its caption, so screen readers read who said it right after it. Describe the photo by the person's name.

See it live

The component library shows this component in the default theme, in every variant: open it in the component library

The quote example as the component library shows it in the default theme

Where it is used

The starter sites that use it, each at a page that shows it:

Fields

What the component’s dialog asks for. In a Doc, keyed rows start with the key; rows in order follow the order below. Each row is a key and its value, in any order.

Field

Key

Kind

Required

Text

text

Text with headings, lists, links and bold

Yes

Name

name

Plain text, one line

No

Roles

roles

Plain text, one line

No

Photo

photo

An image from the assets, with its description

No

Variants

This component has no variants of its own; a theme can add some.

In Google Docs

A component is a table. Its first cell names it; the rows below hold its fields. This is the example table:

quote

text

The guides knew every path, and every story behind it.

name

Ana Ruiz

roles

Hiked the coast in May

photo

[Image]

In a page file

In a site kept as a folder or in Git, the same component is a block of the page’s JSON file:

JSON
{
  "name": "quote",
  "rows": [
    [
      "text",
      "The guides knew every path, and every story behind it."
    ],
    [
      "name",
      "Ana Ruiz"
    ],
    [
      "roles",
      "Hiked the coast in May"
    ],
    [
      "photo",
      {
        "image": "Portrait of Ana"
      }
    ]
  ]
}

Markup and classes

What the component writes takes these classes, for a theme’s CSS: the component’s own name, name__part for its parts and name--variant for each variant (the variant’s plain name is there too).

Class

What it marks

quote

The component

quote__by

A part of it

quote__name

A part of it

quote__photo

A part of it

quote__roles

A part of it

quote__text

A part of it

quote__who

A part of it

The HTML the example above writes, as the component library builds it in the default theme:

html
<figure class="quote">
  <blockquote class="quote__text"><p>The guides knew every path, and every story behind it.</p></blockquote>
  <figcaption class="quote__by"><img class="quote__photo" src="/assets/img/5521e01d770e-1600.webp" srcset="/assets/img/5521e01d770e-400.webp 400w, /assets/img/5521e01d770e-800.webp 800w, /assets/img/5521e01d770e-1600.webp 1600w" sizes="(max-width: 800px) 100vw, 800px" alt="Ana Ruiz" width="1800" height="900" fetchpriority="high" decoding="async"><span class="quote__who"><span class="quote__name">Ana Ruiz</span><span class="quote__roles">Hiked the coast in May</span></span></figcaption>
</figure>

Extending it

Its files in SeedPage. A theme or a site changes the markup by giving a file of the same name (the Liquid part), and a new component can extend this one.

  • src/components/quote.js
  • src/components/quote/quote.liquid