Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Blockquote

Since 0.1.0-alpha.22
Sets a quotation apart, with who said it and where.

Blockquote: a quotation set apart from the text around it, with who said it and where under it. With Author or Source, it's a figure: the quote in a blockquote, the attribution in a figcaption after it, as the HTML spec asks (attribution doesn't go inside the quote). Without either, it's a bare blockquote.

Author and source

Put the quote in a Blockquote. To say who said it, set Author; for the work it's from, Source. Cite links the source.

Static

Preview

The Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.
Ada Lovelace, Notes on the Analytical Engine

Code

Usage.razor
<Blockquote Author="Ada Lovelace" Source="Notes on the Analytical Engine" Cite="https://www.fourmilab.ch/babbage/sketch.html">
    The Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.
</Blockquote>

Add this example to a page with the izzy CLI:

bash
izzy add component Blockquote --at <file>:<line>

Looks

Variant sets the look: a line at the start (Bar, the default), a tinted panel (Subtle) or neither (Plain). Accent colors the line and the tint.

Static

Preview

We closed the quarter with first replies under an hour, down from six, without adding anyone to the team.
Priya Raman, Head of Support
We closed the quarter with first replies under an hour, down from six, without adding anyone to the team.
Priya Raman, Head of Support
We closed the quarter with first replies under an hour, down from six, without adding anyone to the team.
Priya Raman, Head of Support

Code

Looks.razor
<Stack Gap="6" Grow>
    <Blockquote Author="Priya Raman, Head of Support">
        We closed the quarter with first replies under an hour, down from six, without adding anyone to the team.
    </Blockquote>
    <Blockquote Variant="BlockquoteVariant.Subtle" Accent="Accent.Primary" Author="Priya Raman, Head of Support">
        We closed the quarter with first replies under an hour, down from six, without adding anyone to the team.
    </Blockquote>
    <Blockquote Variant="BlockquoteVariant.Plain" Author="Priya Raman, Head of Support">
        We closed the quarter with first replies under an hour, down from six, without adding anyone to the team.
    </Blockquote>
</Stack>

Pull quote

For a line lifted out of an article, center it with Align, enlarge it with Size and add QuoteMark. With the mark, the quote takes the heading font.

Static

Preview

The support team moved from a shared inbox to a queue in March. Each ticket now has an owner from the moment it arrives, and the team sees what's waiting by age instead of by who shouted last.

Nobody has to ask who's on it anymore.

Within six weeks, the median first reply fell from six hours to 48 minutes.

Code

PullQuote.razor
<Stack Gap="5" Grow>
    <TextBlock>
        The support team moved from a shared inbox to a queue in March. Each ticket now has an owner from the
        moment it arrives, and the team sees what's waiting by age instead of by who shouted last.
    </TextBlock>
    <Blockquote Variant="BlockquoteVariant.Plain" Align="TextAlign.Center" QuoteMark Accent="Accent.Primary" Size="TextSize.Xl">
        Nobody has to ask who's on it anymore.
    </Blockquote>
    <TextBlock>
        Within six weeks, the median first reply fell from six hours to 48 minutes.
    </TextBlock>
</Stack>

A customer's words

For a testimonial, set Role to the person's role and company, and Avatar to show their initials, or AvatarSrc for a photo. The name sits over the role, beside the avatar.

Static

Preview

The invoices go out on the first of the month without anyone touching them. That alone paid for the year.
Priya RamanOperations manager, Contoso

Code

Testimonial.razor
@* A customer's words on a pricing page, with who said them. *@
<Blockquote Variant="BlockquoteVariant.Subtle" Author="Priya Raman" Role="Operations manager, Contoso" Avatar MaxWidth="Length.Rem(32)">
    The invoices go out on the first of the month without anyone touching them. That alone paid for the year.
</Blockquote>

Details

Cite is the address the quote comes from: it goes on the blockquote's cite attribute, which browsers don't show, and links the Source (or the Author when there's no Source) so readers can follow it. Source is the title of a work and renders in a cite element; a person's name never does, so Author is plain text. For quotes inside Markdown or other rich content, Prose styles a raw blockquote the way Bar looks.

Mode support

What works in each mode, Blockquote
FeatureStaticInteractive
EverythingYesYes

Static: static server-side rendering, with no circuit and no WebAssembly. Interactive: Server, WebAssembly or Auto.

Accessibility

  • It renders a blockquote; with an attribution, inside a figure whose figcaption holds it, so the attribution is tied to the quote and isn't read as part of it.
  • The dash before the attribution and the QuoteMark are decoration, hidden from screen readers.
  • The bar and tint are decoration too: the quote reads the same without them, also in forced colors.

Parameters

Blockquote parameters
PropTypeDefault
ChildContentThe quotation: text, or paragraphs for a longer one.RenderFragment?
AuthorWho said or wrote it, shown under the quote after a dash.string?
SourceThe title of the work it comes from, such as a book, article or talk, shown after the Author in a cite element.string?
CiteThe address the quote comes from.string?
VariantThe look.BlockquoteVariantBlockquoteVariant.Bar
AccentA color for the bar, the tint and the quote mark, such as Accent.Primary or Accent.Of("#0d9488").Accent?
QuoteMarkAdds a large quote mark above the quote, as for a pull quote.boolfalse
AlignWhere the quote and its attribution sit.TextAlignTextAlign.Start
SizeThe text size of the quote; the attribution is a step smaller.TextSize?
MinSizeThe smallest the quote gets on a narrow screen: with Size, it scales between the two with the screen's width, as a Heading's MinSize does.TextSize?
RoleWhat the Author does, such as "Engineering lead, Northwind", shown under their name.string?
AvatarShows the Author's avatar beside their name: their initials, or AvatarSrc.boolfalse
AvatarSrcA photo of the Author, shown beside their name (it shows the avatar on its own).string?

See also

  • Prose: styles plain HTML, such as rendered Markdown.
  • TextBlock: sets paragraphs, captions and labels in the library's text styles.
  • Card: groups media, a header, body sections, actions and a footer in a box.
  • Blocks that use it: Testimonials.

Connection lost

Rejoining the server…