Skip to content

PlBlockquote

Somebody else's words, set apart from your own. An accent rule down the leading edge, the quote at a heading's scale, and (when there is one) an attribution in the markup the HTML spec asks for.

React
tsx
import { PlBlockquote } from 'plass-ui';

<PlBlockquote author="Ada Lovelace" source="Notes on the Analytical Engine">
  Simplicity is hard.
</PlBlockquote>;
dart
import 'package:plass_ui/plass_ui.dart';

const PlBlockquote(
  author: Text('Ada Lovelace'),
  source: Text('Notes on the Analytical Engine'),
  child: Text('Simplicity is hard.'),
);

Props

PropTypeDefaultDescription
variantshared'solid' | 'glass' | 'ghost''ghost'What the sheet is made of. As on any container, the sheet is never dyed — a quote holds somebody else’s words. ghost, the default, is a rule in the margin and nothing else
sizeshared'xs' | 'sm' | 'md' | 'lg' | 'xl''md'The quote’s type scale — a heading’s size with a paragraph’s leading
colorshared'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info''primary'Semantic colour role. Arbitrary colour values are not accepted
densityshared'default' | 'compact''default'Padding only — never the height, never the type scale
elevationshared0 | 1 | 2 | 30Drop shadow depth. 0 means no shadow at all
authorReactNodeWho said it. Its presence is what turns the quote into a figure with a figcaption, which is the markup the HTML spec asks for
sourceReactNodeWhere it is from — a book, a talk, a page. Rendered inside a cite, which is for the title of a work and, per the spec, never for a person’s name
citestringURL of the document the quote came from. Lands on the blockquote’s own cite attribute — machine-readable and shown to nobody
iconReactNode | falseThe mark drawn before the quote. Omit it for the house glyph, pass a node to replace it, pass false to take it away
childrenReactNodeWhat was said
PropTypeDefaultDescription
variantsharedPlassVariantPlassVariant.ghostWhat the sheet is made of. As on any container, the sheet is never dyed — a quote holds somebody else’s words. ghost, the default, is a rule in the margin and nothing else
sizesharedPlassSizePlassSize.mdThe quote’s type scale — a heading’s size with a paragraph’s leading
colorsharedPlassColorPlassColor.primarySemantic colour role. Arbitrary colour values are not accepted
densitysharedPlassDensityPlassDensity.standardPadding only — never the height, never the type scale
elevationsharedint0Drop shadow depth. 0 means no shadow at all
authorWidget?Who said it. Its presence is what turns the quote into a figure with a figcaption, which is the markup the HTML spec asks for
sourceWidget?Where it is from — a book, a talk, a page. Rendered inside a cite, which is for the title of a work and, per the spec, never for a person’s name
iconWidget?The mark drawn before the quote. Omit it for the house glyph, pass a node to replace it, pass false to take it away
showIconbooltrueWhether a mark is drawn at all. React says this with icon={false}; Dart has no value that is neither null nor a widget, so it gets its own name
childWidget?What was said

Every native <figure> attribute passes straight through, onto the wrapper rather than onto the <blockquote> inside it. color is excluded from the pass-through because it is a Plass prop here.

There is no cite: it is a machine-readable URL on an element Flutter does not have, read by nobody and by nothing. Use source for the part a reader should see.

icon is a Widget? and showIcon is the switch beside it. React says both with one three-way prop, which Dart has no value for. There is null and there is a widget, and nothing that means "take it away".

What the shared axes (variant size color density elevation) mean across the library is in prop conventions.

Examples

author and source

author is a person and source is a work. That is not a naming preference. <cite> is the element for the title of a work and, per the spec, never for the name of a person, so the two cannot share a slot.

An attribution is about the quote and is not part of what was said, which is why passing one turns the wrapper into a <figure> with a <figcaption> outside the <blockquote>. Without one the wrapper is a plain <div>: a <figure> with no <figcaption> in it is a figure of nothing.

cite is the URL, and it lands on the <blockquote>'s own attribute, machine-readable and shown to nobody.

React

variant

The sheet is never dyed, exactly as on a PlCard. A quote holds somebody else's words, and words on a tinted pane are words on a background nobody chose them against, so the family reaches the rule and stops.

ghost is the default and the one that belongs in running prose: a rule in the margin and nothing else, which is what a quote has looked like since long before there were surfaces to put one on.

React

color

React

size

React

Accessibility

  • The quote is a real <blockquote> and the attribution a real <figcaption> outside it. A name inside the quote claims the speaker said their own name.
  • The quotation mark is decorative and aria-hidden. So is the em dash before the author. A screen reader announcing "em dash" before a name is reading the typography rather than the text.
  • Nothing is drawn on the <blockquote> element itself. blockquote is one of the handful of tags a host stylesheet still styles by name, and moving the surface and the rule onto the wrapper is what lets a host reset undo its own version without also undoing this one.
  • The quote and its attribution are one semantics node, read in order, with the attribution after the words rather than inside them. A name inside the quote claims the speaker said their own name.
  • The quotation mark is drawn rather than typed and is excluded from semantics. So is the em dash before the author. A screen reader announcing "em dash" before a name is reading the typography rather than the text.
  • The rule is painted beside the text rather than as a border on it, which is what keeps the corners on that edge square: a 2px rule that curves away from the text it marks is a bracket, not a margin rule.

Differences from the React build

ReactFlutterWhy
<figure> / <figcaption> / <blockquote>one semantics nodeFlutter has no document markup to get right, so what the React build spends care on (which element the attribution lives in) has no counterpart. What survives is the reading order.
citeA URL on an element that does not exist, read by nobody. source is the part a reader sees.
icon={false}showIcon: falseDart has no value that is neither null nor a widget, so "take it away" gets its own name.
childrenchildFlutter's name.
className, styleThere is no class list and no style attribute to pass through.

The quotation mark is the same drawing in both, unit for unit out of the same 16-unit box. A real would be set in whatever face the page uses and would change shape, weight and baseline with it, and at 2em it is the largest single glyph in the component.

Released under the MIT License