# Blockquote

> Displays quoted content with a left border accent. Inherits appearance from the parent by default, so it blends into themed containers.

Source: https://vaneui.com/docs/typography-components/blockquote

Import: `import { Blockquote, Card, Col, Row, Text } from "@vaneui/ui"`

Blockquote is for pull quotes, testimonials and excerpts from another source. A status message that follows a user action, such as an error or a saved confirmation, belongs in an [Alert](/docs/basic-components/alert) instead, and a highlighted phrase inside a sentence in a [Mark](/docs/basic-components/mark).

## Basic usage

Blockquote displays quoted content, shown here with an attribution line. The element renders as `<blockquote>` and inherits color from its surroundings.

```tsx demo
<Blockquote>
  <Text italic>The only way to do great work is to love what you do.</Text>
  <Text sm secondary> - Steve Jobs</Text>
</Blockquote>
```

## Sizes

Blockquote supports five sizes: `xs`, `sm`, `md` (default), `lg`, `xl`.

```tsx demo
<Col>
  <Blockquote xs primary>Size xs: The best way to predict the future is to create it.</Blockquote>
  <Blockquote sm primary>Size sm: The best way to predict the future is to create it.</Blockquote>
  <Blockquote primary>Size md: The best way to predict the future is to create it.</Blockquote>
  <Blockquote lg primary>Size lg: The best way to predict the future is to create it.</Blockquote>
  <Blockquote xl primary>Size xl: The best way to predict the future is to create it.</Blockquote>
</Col>
```

## Appearances

Apply appearance props to color the blockquote. The default is `inheritAppearance`, which picks up the parent color.

```tsx demo
<Col>
  <Blockquote primary>Primary appearance blockquote.</Blockquote>
  <Blockquote accent>Accent appearance blockquote.</Blockquote>
  <Blockquote secondary>Secondary appearance blockquote.</Blockquote>
  <Blockquote success>Success appearance blockquote.</Blockquote>
  <Blockquote danger>Danger appearance blockquote.</Blockquote>
  <Blockquote warning>Warning appearance blockquote.</Blockquote>
  <Blockquote info>Info appearance blockquote.</Blockquote>
</Col>
```

## Variants

Blockquote is `outline` by default: an accent border in the appearance's colour, and no background of its own. `filled` paints no surface either. It switches the quote to the "on this fill" colour and drops the accent border, for a quote sitting on a filled surface of the same appearance.

```tsx demo
<Col>
  <Blockquote info>outline info, on the page surface</Blockquote>
  <Blockquote danger>outline danger, on the page surface</Blockquote>
  <Card info filled>
    <Blockquote info filled>filled info, on a matching filled Card</Blockquote>
  </Card>
</Col>
```

To put a surface behind a quote, nest it in a filled `Card` rather than reaching for `filled` on the Blockquote itself.

## Italic

Italic is not a default. Opt in with the `italic` prop for traditional quotation styling.

```tsx demo
<Col>
  <Blockquote primary>Upright (default), no italic styling.</Blockquote>
  <Blockquote primary italic>Italic, traditional quotation styling.</Blockquote>
</Col>
```

## Source attribution

Pass `cite` to set the native `<blockquote cite>` attribute and render a visible source line below the quote. `Blockquote` has a single visual style, the reading-direction-start accent border (the `outline` default); it does not paint a background, so wrap it in a `Card` or `Section` to place a quote on a colored surface.

```tsx demo
<Col>
  <Blockquote primary cite="Ada Lovelace">
    That brain of mine is something more than merely mortal, as time will show.
  </Blockquote>
  <Blockquote info cite="Alan Turing">
    We can only see a short distance ahead, but we can see plenty there that needs to be done.
  </Blockquote>
</Col>
```

## Inside a Card

Blockquote inherits the parent appearance, so it blends into themed containers.

```tsx demo
<Row flexWrap>
  <Card primary>
    <Blockquote>Inherits primary from the card.</Blockquote>
  </Card>
  <Card success>
    <Blockquote>Inherits success from the card.</Blockquote>
  </Card>
  <Card danger>
    <Blockquote>Inherits danger from the card.</Blockquote>
  </Card>
</Row>
```

## With rich content

Blockquotes can contain multiple paragraphs and nested components.

```tsx demo
<Blockquote primary>
  <Text fontBold>Steve Jobs</Text>
  <Text>Innovation distinguishes between a leader and a follower. Stay hungry, stay foolish.</Text>
</Blockquote>
```

## Testimonial pattern

Use blockquotes with attribution for testimonials and customer quotes.

```tsx demo
<Col>
  <Card info>
    <Blockquote>
      <Text italic>VaneUI cut our migration time in half. The boolean props API is concise and the theming covers our cases.</Text>
      <Text sm fontBold> - Sarah Chen, Lead Engineer</Text>
    </Blockquote>
  </Card>
  <Card success>
    <Blockquote>
      <Text italic>We shipped our new dashboard in half the time thanks to VaneUI components.</Text>
      <Text sm fontBold> - Alex Rivera, Product Manager</Text>
    </Blockquote>
  </Card>
</Col>
```

## Frequently asked questions

### Does Blockquote add quotation marks?

No. Blockquote renders the text as you pass it, with an accent border on the start edge, and adds no quotation marks before or after it. When the design calls for marks, type them into the quoted text. Screen readers announce the `<blockquote>` element as a quote, so the marks are visual only.

### How do I remove the accent border?

Pass `noBorder`. The accent border is the `borderStart` default, a border on the start edge that moves to the right under `dir="rtl"`, and `noBorder` resets every side. Without a border, the quote has nothing to set it apart from the text around it, so give it another cue, such as `italic`, a larger size prop or a filled `Card` around it.

### How do I link a quote to its source?

`cite` renders plain text, not a link, and also sets the native `cite` attribute to that same text. For a source the reader can open, leave out `cite` and add your own line at the end of the quote, for example a `<Text sm secondary>` that holds a [Link](/docs/typography-components/link) to the article or talk.

## Props

| Prop | Category | Default | Description |
| --- | --- | --- | --- |
| `primary` | Appearance |  | Primary color appearance (gray) |
| `accent` | Appearance |  | Accent color appearance (rose) |
| `secondary` | Appearance |  | Secondary color appearance (gray) |
| `tertiary` | Appearance |  | Tertiary color appearance |
| `success` | Appearance |  | Success color appearance (green) |
| `danger` | Appearance |  | Danger color appearance (red) |
| `warning` | Appearance |  | Warning color appearance (amber) |
| `info` | Appearance |  | Info color appearance (cyan) |
| `inheritAppearance` | Appearance | yes | Inherit appearance from parent — suppresses own data-appearance/data-variant, uses parent's CSS variables |
| `fontSans` | Font Family | yes | Sans-serif font family (default) — emits font-sans |
| `fontSerif` | Font Family |  | Serif font family — emits font-serif |
| `fontMono` | Font Family |  | Monospace font family — emits font-mono |
| `fontHeading` | Font Family |  | Heading font family (defaults to sans, customizable via --font-heading) — emits font-heading |
| `italic` | Font Style |  | Italic font style |
| `notItalic` | Font Style |  | Not italic (normal) font style |
| `fontThin` | Font Weight |  | Thin font weight (100) — emits font-thin |
| `fontExtralight` | Font Weight |  | Extra light font weight (200) — emits font-extralight |
| `fontLight` | Font Weight |  | Light font weight (300) — emits font-light |
| `fontNormal` | Font Weight |  | Normal font weight (400) — emits font-normal |
| `fontMedium` | Font Weight |  | Medium font weight (500) — emits font-medium |
| `fontSemibold` | Font Weight |  | Semibold font weight (600) — emits font-semibold |
| `fontBold` | Font Weight |  | Bold font weight (700) — emits font-bold |
| `fontExtrabold` | Font Weight |  | Extra bold font weight (800) — emits font-extrabold |
| `fontBlack` | Font Weight |  | Black font weight (900) — emits font-black |
| `inheritColor` | Inherit Color |  | Inherit text color from parent via CSS variable cascade (suppresses data-appearance emission) |
| `noInheritColor` | Inherit Color |  | Keep own text color; do not inherit from parent |
| `inheritSize` | Inherit Size |  | Inherit font-size and line-height from the nearest parent typography element |
| `noInheritSize` | Inherit Size |  | Keep own font-size; do not inherit from parent |
| `trackingTighter` | Letter Spacing |  | Tighter letter spacing (-0.05em) |
| `trackingTight` | Letter Spacing |  | Tight letter spacing (-0.025em) |
| `trackingNormal` | Letter Spacing |  | Normal letter spacing (0) |
| `trackingWide` | Letter Spacing |  | Wide letter spacing (0.025em) |
| `trackingWider` | Letter Spacing |  | Wider letter spacing (0.05em) |
| `trackingWidest` | Letter Spacing |  | Widest letter spacing (0.1em) |
| `margin` | Margin |  | Enable margin on all sides |
| `marginX` | Margin |  | Enable only horizontal (inline) margin |
| `marginY` | Margin |  | Enable only vertical (block) margin |
| `marginT` | Margin |  | Enable only top margin |
| `marginB` | Margin |  | Enable only bottom margin |
| `noMargin` | Margin | yes | Disable margin (reset to 0) |
| `xs` | Size |  | Extra small size |
| `sm` | Size |  | Small size |
| `md` | Size | yes | Medium size (default) |
| `lg` | Size |  | Large size |
| `xl` | Size |  | Extra large size |
| `skeleton` | Skeleton |  | Show the component as a loading placeholder in its own size and shape. On a container, every component inside it becomes a placeholder too |
| `srOnly` | Sr Only |  | Hide visually and keep it for screen readers (sr-only) |
| `textLeft` | Text Align |  | Align text to left (physical side, does not flip under RTL) |
| `textCenter` | Text Align |  | Align text to center |
| `textRight` | Text Align |  | Align text to right (physical side, does not flip under RTL) |
| `textJustify` | Text Align |  | Justify text |
| `textStart` | Text Align | yes | Align text to the reading-direction start (left in LTR, right in RTL) |
| `textEnd` | Text Align |  | Align text to the reading-direction end (right in LTR, left in RTL) |
| `underline` | Text Decoration |  | Add underline decoration below text |
| `lineThrough` | Text Decoration |  | Add strikethrough/line-through decoration across text |
| `noUnderline` | Text Decoration |  | Remove ALL text-decoration — underline, line-through, and overline (text-decoration: none) |
| `overline` | Text Decoration |  | Add overline decoration above text |
| `uppercase` | Text Transform |  | Transform text to uppercase |
| `lowercase` | Text Transform |  | Transform text to lowercase |
| `capitalize` | Text Transform |  | Capitalize first letter of each word |
| `normalCase` | Text Transform |  | Normal text case (no transformation) |
| `truncate` | Truncate |  | Single line truncation with ellipsis |
| `lineClamp2` | Truncate |  | Truncate at 2 lines with ellipsis |
| `lineClamp3` | Truncate |  | Truncate at 3 lines with ellipsis |
| `lineClamp4` | Truncate |  | Truncate at 4 lines with ellipsis |
| `lineClamp5` | Truncate |  | Truncate at 5 lines with ellipsis |
| `noTruncate` | Truncate |  | Remove truncation |
| `filled` | Variant |  | Filled variant - solid background with contrasting text color |
| `outline` | Variant | yes | Outline variant - transparent background with border and colored text (default) |
| `ghost` | Variant |  | Ghost variant - transparent background, no border, appearance-colored text, tinted hover background |
| `breakNormal` | Word Break |  | Reset breaking - overflow-wrap and word-break normal |
| `breakWords` | Word Break |  | Break long words to prevent overflow - overflow-wrap: break-word |
| `breakAll` | Word Break |  | Break between any two characters - word-break: break-all |
| `breakKeep` | Word Break |  | Do not break CJK text - word-break: keep-all |

Layout and utility props (Border, Cursor, Display, Height, Hide, Items, Justify, Overflow, Position, Responsive Sizing, Responsive Width, Show, Whitespace, Width) are listed on [Common Props](https://vaneui.com/docs/reference/common-props.md).
