Raft Design System

Components · Data Display

Quote

Text someone else wrote, shown outside Markdown behind the 2px quote bar and in the body text colour, so it reads apart from the values Raft writes around it.

ExperimentalAlso called Blockquote, Quoted text, Quote bar
import { Quote } from "@botiverse/raft-ui/wip";

Quote shows text that a person or an agent wrote, where Raft shows it outside a message: a task's title in a panel, a note a Worker left, an agent's reason in a request. The quote bar says whose words they are, so they never read as Raft's own label or value beside them.

quote/compositions/preview

When to use

SituationUse
Plain text a person or an agent wrote, shown in a panel, a list or a dialog among Raft's own wordsQuote
A quote someone typed in a message (> in Markdown)MarkdownBlockquote (Markdown), in foreground-muted, as the rest of the message's Markdown draws
A message linked from another message: its author, place, time and first linesMessageQuotedPreview
A reply quoting a message or a passage of one, in the composer or the sent messageThe quote chip (Conversation)
Raft's own values: a ref, a handle, an id, a status, a time, a commandPlain text, no quote
Text someone wrote that is the row's name or the page's title (a channel's name, a task's title in a row)The component's own name or title part: it is the item's name there, not something quoted about it

Anatomy

  • Quote: a blockquote behind the quote bar, holding the quoted text. Required.

The bar is the one every quote in Raft draws: 2px of line-seam on the left and the text 10px after it (Shape). MarkdownBlockquote, MessageQuotedPreview and an action card's hint draw theirs from the same recipe, so every quote bar looks the same. Quote has no fill and no corner.

Whose words they are, a caption or a term, sits outside the quote, in the page's own voice.

quote/compositions/on-a-page

Behavior

  • The text is in foreground, the body text colour, and upright: it is the content someone reads, at the base tier (Typography), not helper text. A quoted message is grey because it supports the message it sits under; this text is the thing being shown.
  • It takes the size and line height of the text around it, so a quote in a description list's value has the value's text-callout. Set the size on the container, not on the quote.
  • It keeps the line breaks the writer wrote and breaks a long word or address where it has to, so a pasted path or link never widens its container.
  • It takes its whole line, also in a wrapping flex row such as a description list's value, and shrinks with it (min-w-0).

Content

  • Put in it only what a person or an agent wrote, as they wrote it: a title, a description, a note, a reason, a file's name, a value Raft could not check. Don't add to it, trim it or translate it.
  • Don't put Raft's own words in it: the panel's terms, a ref, a handle, an id, a status, a time or a command Raft printed are plain text beside it. A label inside the quote bar would read as something someone wrote.
  • Name whose words they are outside the quote: a DescriptionList term, a caption or a heading.
  • It is text only. Nothing in it is a link or a button: someone else's words can't be one of Raft's controls.

Accessibility

  • It is a native blockquote, which screen readers announce as a quote.
  • When the quoted text comes from a page with an address, pass it as cite. Browsers don't show it, so also name the source where people can see it.
  • To tie a visible caption to the quote, put both in a figure and the caption in its figcaption, as above. In a description list, the term already names it.

Rules

  • Show someone else's text with Quote and Raft's own values as plain text, so the two never look alike.
  • Keep the body colour. Don't make a Quote grey: grey is for helper text and for the quoted message under a message.
  • Use Quote only outside Markdown. Inside rendered Markdown, a quote is MarkdownBlockquote.

API

Quote

ExperimentalText someone else wrote, shown outside Markdown: a `<blockquote>` behind the 2px quote bar, in the body text colour. It takes the size of the text around it, keeps the line breaks the writer wrote and takes its whole line.

Takes the attributes of its element.