Veil UI
Components

Blockquote

A quoted passage with an optional attribution.

Installation

$ npx veil-ui@latest add blockquote

Usage

import { Blockquote } from "@/components/ui/blockquote";

<Blockquote cite="Veil UI docs">
  <p>The same code you would write yourself.</p>
</Blockquote>;

Examples

Basic

Components are added as source files, not hidden behind a runtime.

With citation

The same code you would write yourself.

Veil UI docs

API reference

PropTypeDefaultDescription
citestring—Source attribution, rendered in a footer with cite.
...propsBlockquoteProps—All native blockquote attributes.

Accessibility

  • Uses a native <blockquote> with the attribution inside a <footer> and <cite>, matching the HTML content model.
  • Keep quoted paragraphs inside the blockquote and avoid styling it as a heading.

Vue and plain HTML

This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add blockquote --framework vue or switch the framework in components.json.

<script setup lang="ts">
import { cn } from "@/lib/utils";

import type { BlockquoteProps } from "./types";

const props = defineProps<BlockquoteProps>();
</script>

<template>
  <blockquote
    data-slot="blockquote"
    :cite="props.cite"
    :class="
      cn(
        'border-l-2 pl-4 text-sm italic text-muted-foreground',
        props.class,
      )
    "
  >
    <slot />
    <footer v-if="props.cite" class="mt-2 text-xs not-italic">
      <span aria-hidden="true">— </span>
      <cite>{{ props.cite }}</cite>
    </footer>
  </blockquote>
</template>

On this page