Component Registry
@cloudflare/kumoComponent Registry
供 LLM 和代码生成工具使用的、AI 可读的组件元数据。从 TypeScript 类型和组件变体自动生成。
概述
组件注册表是一个机器可读的 JSON 文件,描述了所有 Kumo 组件的 props、变体、示例和语义化令牌。它是为 AI 代理、代码生成器和其他工具设计的。
访问注册表
通过 CLI
# List all components
npx @cloudflare/kumo ls
# Get docs for a specific component
npx @cloudflare/kumo doc Button
通过 HTTP API
# JSON endpoint
curl https://kumo-ui.com/api/component-registry
通过 jq(本地)
# Get Button props
jq '.components.Button.props' packages/kumo/ai/component-registry.json
# List components by category
jq '.search.byCategory' packages/kumo/ai/component-registry.json
注册表内容
注册表包含:带类型和默认值的组件 props、带描述的可选变体、来自 stories 的真实代码示例、使用的语义颜色令牌,以及复合模式的子组件。
52components
9categories
v1.0.0