Skip to content

Blockquote

A semantic quote: a figure wrapping a blockquote, with an optional visible attribution and an optional machine-readable source URL.

Import

import { Blockquote } from "@hyzer-labs/ui"

Demo

With no cite, the figure wraps a bare quote and no <figcaption> renders.

Throw flat, trust the fade: the disc does the work on a hyzer line.
<Blockquote>
	Throw flat, trust the fade: the disc does the work on a hyzer line.
</Blockquote>

Props

NameTypeDefaultNote
childrenSnippetRequired. The quoted content.
citestring | SnippetVisible attribution, rendered in a <cite> outside the quote.
citeUrlstringSource URL — sets the blockquote cite attribute; never rendered as text.
align'start' | 'center' | 'end''start'Aligns the attribution row under the quote; the quote body is untouched.
intentIntentSee Foundation → Colors & Intent.
intentScope'line' | 'full''line'Only relevant with intent set. line colors just the accent line; full also colors the quote text. Attribution stays muted either way.
classstringMerged after the hz-blockquote class.

Theme hooks

What this component promises your CSS. The reference theme styles exactly these — from @layer hz-theme, so your unlayered rules win. See Styling Components for the how.

Root class: .hz-blockquote

Data attributes

HookValuesStyles
data-align'start' | 'center' | 'end'Aligns the attribution row only — the quote body is deliberately left alone. Default start.
data-intentany registered intentPresent only when intent is set. Colors only the accent line (border-inline-start) — no intent leaves the accent line at its default border color.
data-intent-scope'line' | 'full'Present only when intent is set (mirrors data-intent — meaningless without an intent to scope). line (default) matches data-intent alone; full also colors the quote text. The attribution row is never affected.

Custom properties

HookValuesStyles
--hz-blockquote-border-width<length> — default var(--hz-border-width-heavy)Thickness of the inline-start accent line. Defaults to the heaviest border-width token; override with any length or a lighter token. The attribution row indent tracks it automatically.
--hz-blockquote-font-size<length> — default var(--hz-font-size-xl)Font size of the quote body. Read, never declared, so it can be set per instance or inherited from any ancestor — the docs site tunes it down to body size for its doctrine notes.

Part classes

HookValuesStyles
.hz-blockquote-quotechild elementThe quote itself, carrying the accent bar.
.hz-blockquote-attributionchild elementThe attribution line.
.hz-blockquote-citechild elementThe cite element.

Accessibility

The root is always a <figure> wrapping a <blockquote>. When cite is provided, the attribution renders in a <figcaption><cite> outside the quote, so screen readers do not announce it as part of the quotation itself.

No ARIA is added: the native figure/blockquote/figcaption/cite elements carry all the semantics.

The decorative em-dash before the attribution is a theme ::before pseudo-element, so it never enters the accessible name.

References: MDN: <blockquote>