Overview
A quote is a figure that holds a blockquote and a figcaption. The blockquote holds an optional title and the quoted text, between two large quote marks. The figcaption names the author with a small Persona.
Pick another component when:
Markup
The Power of DesignA well-crafted design system transforms how teams build products, creating consistency that users feel without necessarily seeing.
Variants
| Group | Option | Markup | On element | Use |
|---|---|---|---|---|
| Background | Card (default) | — | — | A card with a background and a border. For a quote on a plain page |
| Background | Transparent | .nds-transparent |
.nds-quote |
No background, no border and no side padding. For a quote inside a colored section or another card |
| Size | LG (default) | — | — | 48px marks and large text. Makes the quote a highlight of the page. On a phone it steps down to MD. Write nds-lg to keep LG on a phone |
| Size | MD | .nds-md |
.nds-quote |
40px marks, a smaller title, text and padding. For a quote in a narrow column. It stays MD on a phone |
| Size | SM | .nds-sm |
.nds-quote |
32px marks, a smaller title, body-size text and the least padding. For a quote inside an article, at the size of its text, or in a card or a side column |
| No title | No title | remove |
.nds-quote-title |
Leave out the title when a few words cannot sum up the quote |
| No author | No author | remove |
.nds-quote-author |
Leave out the author for a quote from a document, a publication or an unnamed source. Name the source in the title instead |
| No avatar | No avatar | remove |
.nds-avatar |
Show the name and the role only, when there is no photo of the author |
Built-in Features
-
Semantic Markup
<figure>,<blockquote>,<figcaption>and<cite>mark up the quote the way the HTML standard describes a quote with its source. -
Quote Marks
CSS draws the opening and closing marks, so screen readers skip them and they never block text selection. In English, the marks move to the other corners and mirror.
-
Persona Author
The author is a small Persona, so it shows the same avatar, name and role as everywhere else on the site.
-
Phone Layout
On phones, the marks move above and below the text, so the text takes the full width. A quote with no size class also steps down one size, to MD. A size you wrote stays as written.
-
CSS Knobs
Twelve custom properties set the background, the border, the radius, the padding, the marks, and the title and text type.
Best Practices
- Use a quote for one statement that supports the page: a testimonial, a research finding or a policy citation.
- Put the quote next to the text it supports. A quote with no context is hard to judge.
- Pick the size by the place: LG makes the quote a highlight of the page, MD fits a narrow column, and SM sits inside an article at the size of its text, or in a card or a side column.
- Add
cite="URL"on theblockquotewhen the source has a web address. It does not show, but it names the source for search engines and assistive tools. - Keep the title to one to six words. Leave it out rather than write a long one.
- Do not use a quote for help text or for the words of the interface. Write them as plain text.
- Keep the Persona at
nds-sm. A larger Persona takes attention from the quote. - Do not stack quotes one under another. For several testimonials, use a Swiper or a grid of Cards.
API
CSS Custom Properties
Set these on .nds-quote, or on a parent. A value you set wins over the size classes and the phone step.
| Property | Default | Controls |
|---|---|---|
--quote-background-default |
var(--background-card) |
Card background |
--quote-border |
var(--border-neutral-primary) |
Card border color |
--quote-radius |
var(--radius-lg) |
Card corner radius |
--quote-padding |
var(--spacing-2xl) (xl on MD, lg on SM) |
Side padding. The top and bottom padding is this plus --spacing-sm. It also sets how far the marks reach into the padding |
--quote-mark-color |
var(--text-primary-strong) |
Quote mark color |
--quote-mark-size |
48px (40px on MD, 32px on SM) |
Width and height of each quote mark |
--quote-title-FS |
var(--typo-display-xs-FS) (text-xl on MD, text-lg on SM) |
Title font size |
--quote-title-LH |
var(--typo-display-xs-LH) (text-xl on MD, text-lg on SM) |
Title line height |
--quote-title-color |
var(--text-display) |
Title color |
--quote-text-FS |
var(--typo-text-xl-FS) (lg on MD, md on SM) |
Quoted text font size |
--quote-text-LH |
var(--typo-text-xl-LH) (lg on MD, md on SM) |
Quoted text line height |
--quote-text-color |
var(--text-primary-paragraph) |
Quoted text color |
Tokens
It reads these shared tokens. A change to one also changes other components: see Tokens.
Source: the var() reads in _sass/components/_quote.scss.
| Token | Preview | Value |
|---|---|---|
--background-cardRead by --quote-background-default | var(--colors-base-white)Dark mode var(--background-default) | |
--text-displayRead by --quote-title-color | var(--colors-neutral-800)Dark mode var(--colors-neutral-100) | |
--text-primary-paragraphRead by --quote-text-color | var(--colors-neutral-700)Dark mode var(--colors-neutral-300) | |
--text-primary-strongRead by --quote-mark-color | var(--colors-primary-700)Dark mode var(--colors-primary-400) | |
--border-neutral-primaryRead by --quote-border | var(--colors-neutral-300)Dark mode var(--colors-neutral-600) |