writing-registry-meta
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese- The meta file must be in JSON format.
- The meta file must be located in the same directory as the registry file.
- The meta file must have the same name as the registry file, but with a .meta.json extension.
- The meta file must contain the following fields:
- : The registry name in kebab-case, same as file name without extension.
name - : The name of the registry usually the same as the component name in Pascal case.
title - : always
type."registry:item" - : IMPORTANT! Describe the registry in detail to help LLM understand what the interface looks like and its purpose. Start with "Integrated [library name]" if using third-party libraries (e.g., Base UI). Focus on visible features (buttons, labels, states) and accessibility. DO NOT list individual Material UI components.
description - : Additional metadata about the registry
meta- : one of "primitive", "ai"
category - : The extra class name to add to the preview container.
previewClassName
IMPORTANT! after writing/updating a meta file, run to populate the registry index.
pnpm registry:build- 元文件必须为JSON格式。
- 元文件必须与registry文件位于同一目录中。
- 元文件的名称必须与registry文件相同,但扩展名为.meta.json。
- 元文件必须包含以下字段:
- :registry的kebab-case格式名称,与不带扩展名的文件名相同。
name - :registry的名称,通常与Pascal case格式的组件名称相同。
title - :固定为
type。"registry:item" - :重要!详细描述registry以帮助LLM理解其接口外观和用途。如果使用第三方库(例如Base UI),请以“Integrated [library name]”开头。重点关注可见功能(按钮、标签、状态)和可访问性。请勿列出单个Material UI组件。
description - :关于registry的额外元数据
meta- :取值为"primitive"或"ai"之一
category - :要添加到预览容器的额外类名。
previewClassName
重要提示!编写/更新元文件后,运行来填充registry索引。
pnpm registry:build