Component Registry
@cloudflare/kumo

概述

组件注册表是一个机器可读的 JSON 文件,描述了所有 Kumo 组件的 props、变体、示例和语义化令牌。它是为 AI 代理、代码生成器和其他工具设计的。

查看 JSON API

访问注册表

通过 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