组件

Quote

A pull quote with big hand-drawn quotation marks and an attribution. A real figure, blockquote and figcaption, with marker or felt marks drawn in the gutters: an opening pair at the top, a closing pair at the bottom.

安装

terminal
npx shadcn@latest add @wobko/quote

第一次使用?先把 registry 加进 components.json。 如何安装

示例

Default

A pull quote: marker marks in the gutters, the words in the script font, the source below.

Sizes, pens and the rule

Three sizes of marks (the padding grows with them), felt pens instead of marker, and a pencil rule down the edge that runs between the marks of a longer quotation.

A testimonial card

A quote on a taped index card with the customer's signature under it: three hand-made parts that share a pen. The words sit on the card's printed rules.

API 参考

QuoteText

The <blockquote> (accepts `cite`) and the ink host: the marks are drawn in its inline padding, which grows with `size`. The browser's own opening quotation mark stands in until the drawing exists.

属性类型默认值说明
size"sm" | "md" | "lg""md"The size of the quotation marks (24, 32 or 46 px) and the room they get.
tone"marker" | "ink" | "blue" | "red" | "green" | "pencil" | "orange""marker"The pen of the marks. Marker is the terracotta felt.
weight"fine" | "regular" | "brush""regular"How heavy the strokes are.
rulebooleanfalseA quiet pencil rule down the start edge between the pairs of marks.
animatebooleanfalseDraw the marks on the first time the quotation scrolls into view.
showbooleantrueShow or hide the marks.
delaynumber-Milliseconds before the drawing starts.
seedstring | number-Pins the hand.

无障碍

  • Real semantics: <figure> > <blockquote cite> + <figcaption>. Assistive technology announces a quotation and its source.
  • The quotation marks are drawings (aria-hidden), not characters in the text, so they are not read aloud or copied with the words.
  • The marks live in the blockquote's padding and never overlap the words; RTL mirrors the whole drawing.
  • Reduced motion zeroes the draw-on.

源码

CLI 会复制进你项目的文件。

正在加载源码