- 参考 InDesign 与经典严肃风排版传统(NYT / The Times / FAZ),基于 24 列栅格、CSS Grid + - Multi-column 双层机制构建。 -
-- 参考 InDesign 与经典严肃风排版传统(NYT / The Times / FAZ),基于 24 列栅格、CSS Grid + - Multi-column 双层机制构建。 -
-
- pnpm add newspaperui-components newspaperui-theme
-
pnpm add newspaperui-components newspaperui-theme
The library's visual weight system — borrowed from InDesign's paragraph styles — drives all typography from a single data source. Change one value in the visual-weights mapping, and every Headline, Subhead, and BodyText component updates globally. This is design-token architecture taken to its logical conclusion.
+Typography details that most web frameworks ignore are first-class citizens here: true OpenType small caps (not faked with text-transform), old-style figures that blend with body text, hanging punctuation, proper paragraph indentation (no space between paragraphs, first-line indent from paragraph two), and drop caps that actually work with CSS ::first-letter.
+The multi-column flow is real CSS columns — text reflows naturally across 2, 3, or 4 columns with hairline rules between them. Pull quotes span all columns. Figures break cleanly. Orphans and widows are controlled. This is how InDesign works, translated to the browser.
+Four preset themes ship out of the box: Classic NYT (warm off-white, Cormorant Garamond masthead), The Times (ink-blue accent), Modern Dark (warm brown-black), and Swiss Modern (Helvetica-clean). The Create page lets you customize every token and export a CSS file for your project.
+Multi-language support is built in from day one. Chinese layouts use Noto Serif SC with restrained red accents (masthead and kickers only). Japanese layouts support both horizontal (yokogumi) and traditional vertical (tategumi) writing modes. German blackletter mastheads use UnifrakturMaguntia.
+The responsive system uses CSS media queries injected per-Section, so column counts adapt to viewport width without JavaScript. Font sizes use clamp() for fluid scaling between mobile and desktop. No runtime overhead, no layout shift.
+- {demo.description} -
-- NewspaperUI 借鉴 InDesign - 段落样式系统的设计 token 思想,把字体、字号、字重、行高、颜色、间距统一收敛到视觉权重映射表(visualWeights)。组件从单一数据源读取样式,修改一处即全局生效。 -
-- 排版机制采用 Hybrid 双层:CSS Grid 负责大块布局,CSS Multi-column 负责正文流。这是报纸排版传统在 Web - 上的最佳还原。 -
-
- 4 packages:newspaperui-theme、newspaperui-utils、
- newspaperui-components(18 components)、@newspaperui/docs。
-
Built with pnpm workspaces + Turborepo. Vite for libraries, Next.js 15 for docs.
-