组件

Typography

The type scale and a Prose wrapper for the notebook: script headings with a hand-drawn rule, body text in the hand at 17 px on a 1.7 line, blue felt links, marker bullets, mono code chips. Prose styles markup you did not write (markdown, CMS html, MDX).

安装

terminal
npx shadcn@latest add @wobko/typography

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

示例

The scale

Every part in one page: headings with hand rules, a lead line, body text, a list, a quotation, inline code and the small sizes.

Prose: raw markup

Plain HTML you did not style, straight from a markdown renderer: Prose gives it the notebook's type, spacing, links, lists, code and quotations.

An article on paper

The parts composed into a real page, with a mark or two from the marks family.

A plain table in prose

Official `typography-table` without its classes: a bare `<table>` inside Prose. The head is written in the script face over a felt rule and every row has a pencil line under it. Reach for the Table component when the table is data rather than text.

API 参考

H1

Page title: script 48 px bold, with a double hand-drawn rule.

属性类型默认值说明
rulebooleantrueDraw the rule under the heading.
seedstring | number-Picks which of the three hands draws the rule. Default: from useId().

H2

Section title: script 36 px bold, with a single pencil rule.

属性类型默认值说明
rulebooleantrueDraw the rule under the heading.
seedstring | number-Picks which of the three hands draws the rule.

List

A bulleted list with marker-colored bullets; `ordered` makes it a numbered <ol> with script numerals. Children are <li>s.

属性类型默认值说明
orderedbooleanfalseRender an <ol>.

无障碍

  • Real elements with their real semantics: h1 to h4, p, ul/ol, blockquote, code. Nothing here changes the outline or the reading order.
  • Body text is the hand at 17 px in ink on paper (14:1); muted text is the muted-foreground token (4.5:1 or better on paper and on the desk); links are blue felt (7:1) and bold with a thick underline, never color alone.
  • The hand-drawn heading rule is a baked alpha mask painted by ::after; browsers without mask support keep a plain pencil border. Windows high contrast paints the rule with system text color.
  • Line length is capped at 64 characters in Prose; long words wrap and code blocks scroll sideways (a table wider than the column needs a scrolling wrapper of its own).

源码

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

正在加载源码