W Shadcn

blockmatic/basilic-skills/skills/workflow/w-shadcn

作者 blockmatic7e05e2abd052dc6b526e8a28e36d102d42bfd635无许可证1 个星标收录于 2026年10月9日更新于 2026年10月9日仓库6天前更新

Install shadcn/w-ui primitives in the shared UI package using monorepo import paths.

AI 生成的概览

在 monorepo 的共享 UI 包中安装或扩展 shadcn/w-ui 基础组件,并使用正确的导入路径。

功能
该技能指导在 monorepo 的共享 UI 包中安装或扩展 shadcn/w-ui 基础组件,组件位置由 components.json 指定。它说明了正确的导入路径、所需的 style 设置,以及使用 render 配合 data-slot 或 data-open 的组合约定。它还要求后续操作:用 /w-ui 调整界面、对改动文件运行 lint,并在行为或命令变化时更新文档。
适用场景
适用于在共享 UI 包中新增 shadcn 基础组件或扩展现有组件时。也适用于需要让导入路径、组件样式或组合约定与 monorepo 配置保持一致的情况。
运行要求
不包含脚本,仅为说明性指令。它假定存在带共享 UI 包的 monorepo、components.json 文件,并在变体不明确或安装出错时可使用 shadcn MCP。它还引用了配套技能 /w-ui、/w-docs 和 shadcn-v3。

Install or extend a shadcn primitive. Reshaping a screen stays on /w-ui. Follow shadcn-v3.

  1. Use shadcn MCP only when unsure about variants or when hitting an install error.
  2. Install in the shared UI package from components.json (Basilic example: packages/w-ui/src/components/).
  3. Import @repo/w-ui/components/* and that package’s cn. Rare primitives: @repo/w-ui/base (not @base-ui/react, not @radix-ui/*, not deleted @repo/w-ui/radix). Keep components.json "style": "base-vega". Compose with render + data-slot / data-open (not asChild / data-state).
  4. After the primitive exists, reshape screens with /w-ui if the job is a surface, not only a component. Run lint on the changed files.
  5. Docs: /w-docs if behavior or commands changed.

来源与署名

来源:blockmatic/basilic-skills位于skills/workflow/w-shadcn提交7e05e2a

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架