@clay-design-system/react

中文文档
0.24.0发布于 2026/11/10TypeScriptESM + CJS近 30 天下载 3084

React 19 section + atom components for monday.com marketing pages, plus the asset registries and the server-render / progressive-enhancement layer used by the static export. Styling is CSS Modules in @layer clay.components, consuming `@clay-design-syste

原始使用文档
文档目录3 节
  1. Entry points
  2. Source layout ( src/ )
  3. Scripts

@clay-design-system/react

React 19 section + atom components for monday.com marketing pages, plus the asset registries and the server-render / progressive-enhancement layer used by the static export. Styling is CSS Modules in @layer clay.components, consuming @clay-design-system/tokens only.

Entry points

ImportWhat
@clay-design-system/reactEvery section + atom (exact props: skills/web-design-brain/reference/COMPONENT_PROPS.md), FOOTER_DEFAULTS, asset constants (G2_BADGES, …). A thin barrel over per-module output: a bundler keeps only what you import
@clay-design-system/react/sections/<Name> · …/components/<Name>One section / component on its own (both map to dist/web/<Name>), e.g. …/sections/FeaturesSection, …/components/Button
@clay-design-system/react/styles.cssComponent CSS + clay-reveal / clay-stagger scroll utilities (one stylesheet for every component)
@clay-design-system/react/assetsThe asset resolver: iconUrl, logoUrl, agentUrl, badgeUrl, imageUrl, configureAssets (CDN URLs; see CDN assets)
@clay-design-system/react/logoslogoUrl, logoKeys, customerSvgMap, integrationSvgMap, productSvgByProduct (+ @clay-design-system/react/logos/manifest.json, key → CDN URL)
@clay-design-system/react/iconsiconSvgMap, iconMetadata, ICON_NAMES (all ~600 icons)
@clay-design-system/react/icon-svg · …/icons/data/<name>IconSvg (renders SVG markup you pass in) and one icon's markup as a string: the lean alternative to <Icon name>, which loads every icon
@clay-design-system/react/badgesbadgeUrl, badgeKeys
@clay-design-system/react/renderServer render of a page spec (used by apps/pages/scripts/build-static.js)
@clay-design-system/react/page-specPageSpec types + section schemas
@clay-design-system/react/brief-conformanceevaluateBriefConformance — checks a page plan against its brief
@clay-design-system/react/enhanceFramework-free enhance.js (tabs, sliders, accordions) shipped with static pages
@clay-design-system/react/bundles/*Section bundles (dist/bundles/): one canonical section's static HTML, CSS chunk, tokens, fonts and init(root) script with a manifest (sha256 of every file), to insert into an existing HTML page without React. Index: @clay-design-system/react/bundles/index.json; pilot: FaqSection
@clay-design-system/react/catalog.jsonSection/variant catalog (variants from the zod schemas)
@clay-design-system/react/page-spec.schema.json · …/page-spec.example.jsonThe PageSpec as JSON Schema (draft 2020-12, generated from the same zod schemas renderPageSpec parses) and a spec that passes it: validate a spec with any JSON Schema validator, no MCP needed. Unknown props, the layout-to-content coupling and Hard Rules C6/A11 are not in the schema; clay_validate_page checks them

Every subpath ships ESM (.js) and CJS (.cjs) with matching .d.ts / .d.cts. Images are never in the package: icons, logos and agent art and the trust/compliance badges come from the Clay CDN through src/assets (the brand folder is one setting). Subpaths under a section folder that are not the section itself (…/sections/<Name>/assets) are not exported.

Node: ^20.19.0 || >=22.12.0. require() of the package needs require(esm) (swiper is ESM-only), which Node runs unflagged from 20.19 and 22.12; see MIGRATION.md §1.

Source layout (src/)

assets/ (the CDN asset resolver) · web/ one folder per component (<Name>.tsx, .module.css, .stories.tsx, .test.tsx, index.ts) · logos/ · icons/ · visuals/agents/ (<AgentVisual>) · badges/ · ssr/ + enhance/ (static export) · page-spec/ · brief-conformance/ · handbook/ + wiki/ (generated agent corpora) · src/figma/connections.json (Figma frame registry) · docs/ (Storybook docs stories) · index.ts (barrel).

Scripts

pnpm --filter @clay-design-system/react build      # per-module library (ESM+CJS+types) + enhance bundle + catalog.json
pnpm --filter @clay-design-system/react test       # Vitest + Testing Library + axe
pnpm --filter @clay-design-system/react assets:index # regenerate src/assets/generated from cdn-manifest.json
pnpm --filter @clay-design-system/react lint       # stylelint — clay-ds/no-foundation-tokens only
pnpm --filter @clay-design-system/react typecheck

Adding a component: pnpm generate <Name> and the checklist in the root CLAUDE.md ("Adding a new component"). Usage docs: skills/web-design-brain/reference/SECTIONS.md.

版本与发布记录

@clay-design-system/react 共发布 19 个版本,首次发布于 2026/10/13;过去 12 个月发布了 19 个版本。

版本发布日期距今
0.24.0latest2026/11/10今天
0.23.02026/11/064 天前
0.22.02026/10/2218 天前
0.21.02026/10/2218 天前
0.20.12026/10/2119 天前
0.20.02026/10/2020 天前

关于 @clay-design-system/react 的常见问题

@clay-design-system/react 是什么?

React 19 section + atom components for monday.com marketing pages, plus the asset registries and the server-render / progressive-enhancement layer used by the static export. Styling is CSS Modules in @layer clay.components, consuming `@clay-design-syste

如何安装 @clay-design-system/react?

在项目目录运行 npm install @clay-design-system/react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18)、react-dom(>=18)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@clay-design-system/react 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@clay-design-system/react 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@clay-design-system/react 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^20.19.0 || >=22.12.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@clay-design-system/react 可以商用吗?

@clay-design-system/react 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@clay-design-system/react 的下载量有多少?

根据 npm 官方下载统计,@clay-design-system/react 在 2026/10/10 – 2026/11/08 这 30 天内被下载 3,084 次,日均约 103 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@clay-design-system/react 还在维护吗?

最新版本 0.24.0 发布于 2026/11/10(今天);至今共发布 19 个版本,其中过去 12 个月发布了 19 个;首次发布于 2026/10/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。