注册表
运行你自己的组件注册表。
注意:此功能目前处于实验阶段。通过测试和发送反馈帮助我们改进它。如果你有任何疑问,请联系 联系我们。
¥Note: This feature is currently experimental. Help us improve it by testing it out and sending feedback. If you have any questions, please reach out to us.
你可以使用 shadcn
CLI 运行自己的组件注册表。运行你自己的注册表允许你将自定义组件、钩子、页面和其他文件分发到任何 React 项目。
¥You can use the shadcn
CLI to run your own component registry. Running your own registry allows you to distribute your custom components, hooks, pages, and other files to any React project.

将代码分发到任何 React 项目。
¥Distribute code to any React project.
注册表项自动与 shadcn
CLI 和 Open in v0
兼容。
¥Registry items are automatically compatible with the shadcn
CLI and Open in v0
.
要求
¥Requirements
你可以根据需要自由设计和托管自定义注册表。唯一的要求是你的注册表项必须是符合 注册表项架构规范 的有效 JSON 文件。
¥You are free to design and host your custom registry as you see fit. The only requirement is that your registry items must be valid JSON files that conform to the registry-item schema specification.
如果你想查看注册表的示例,我们有一个 模板项目 供你用作起点。
¥If you'd like to see an example of a registry, we have a template project for you to use as a starting point.