QuoteBlock
SM · 950B gzip budgetA real blockquote/cite pair, not a styled div.
- Category
- Data display
- Budget
- sm, single-purpose control
- External runtime
- React / React DOM only
axe fixtureSSR rendersource scanbundle budget
Preview
Live fixtureThe Analytical Engine has no pretensions to originate anything.
Try the component here. Locale-aware formatting and direction follow the selected language; example content and labels are not automatically translated. Overlay demos use interactive launchers.
Install
npx shadcn@latest add https://gear5-ui.vercel.app/r/quote-block.jsonCopies the source into your project. Pulls in 1 shared registry item: cn.
New here? Set up Tailwind and import aliases first →Source & props
Edit on GitHub ↗Prop types and inline documentation are included below. This is repository source; the installer rewrites shared imports for your project.
import { cn } from "../lib/cn";
export interface QuoteBlockProps {
children: React.ReactNode;
citation?: string;
className?: string;
}
/**
* `<blockquote>` with `<cite>` for the attribution — a border-left visual
* treatment on a plain `<div>` carries none of this to a screen reader,
* which announces `<blockquote>` as a distinct region.
*/
export function QuoteBlock({ children, citation, className }: QuoteBlockProps) {
return (
<figure className={cn("border-s-4 border-neutral-300 ps-4 text-start dark:border-neutral-700", className)}>
<blockquote className="text-neutral-800 italic dark:text-neutral-200">{children}</blockquote>
{citation && <figcaption className="mt-2 text-sm text-neutral-500 dark:text-neutral-400">— {citation}</figcaption>}
</figure>
);
}
What CI checks
Quality contract- Bundled, minified and gzipped against its tier budget
- Audited by axe in the state previewed above
- Rendered through react-dom/server with no browser globals
- Scanned for network calls, dangerous sinks, and unguarded animation