taiga-ui-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTaiga UI setup
Taiga UI 配置
1. Check if installed
1. 检查是否已安装
bash
grep '@taiga-ui/' package.jsonPackages present → skip to step 3. Nothing found → step 2.
bash
grep '@taiga-ui/' package.json找到相关包 → 跳转到步骤 3。未找到任何内容 → 执行步骤 2。
2. Install
2. 安装
bash
npx ng add taiga-ui --defaults --skip-confirmationThis is the only supported install path — do not add packages to
by hand. The schematic asks which packages to add (,
, , , addons); pick what the task needs, + is
the usual answer. It also wires up styles, providers and imports itself.
@taiga-ui/*package.jsoncorekiticonslayoutcorekitbash
npx ng add taiga-ui --defaults --skip-confirmation这是唯一受支持的安装方式——不要手动将 包添加到
。schematic 会询问需要添加哪些包(、
、、、addons);根据任务需求选择,通常选择 + 。
它还会自动配置样式、providers 和 imports。
@taiga-ui/*package.jsoncorekiticonslayoutcorekit3. Verify the wiring
3. 验证配置
The schematic normally does all of this; check it and fix only what is missing.
- Styles — →
angular.jsoncontainsarchitect.build.options.stylesand@taiga-ui/core/styles/taiga-ui-theme.less@taiga-ui/core/styles/taiga-ui-fonts.less - Providers — is in the application providers:
provideTaiga()In the default CLI layout the providers array lives intsimport {provideTaiga} from '@taiga-ui/core'; // ... bootstrapApplication(App, { providers: [ provideTaiga(), // ... ], }).catch(console.error);.app.config.ts - Root wrapper — the root template () wraps everything in
app.html, and the root component imports<tui-root>...</tui-root>fromTuiRoot. Without it portals, dialogs, hints and alerts do not work.@taiga-ui/core
schematic 通常会完成所有这些配置;进行检查,并且只修复缺失的部分。
- 样式——→
angular.json包含architect.build.options.styles和@taiga-ui/core/styles/taiga-ui-theme.less@taiga-ui/core/styles/taiga-ui-fonts.less - Providers——应用的 providers 中包含 :
provideTaiga()在默认 CLI 项目结构中,providers 数组位于tsimport {provideTaiga} from '@taiga-ui/core'; // ... bootstrapApplication(App, { providers: [ provideTaiga(), // ... ], }).catch(console.error);中。app.config.ts - Root wrapper——根模板()使用
app.html包裹所有内容,并且根组件从<tui-root>...</tui-root>导入@taiga-ui/core。缺少它时,portals、dialogs、hints 和 alerts 将无法正常工作。TuiRoot
4. Confirm
4. 确认
bash
npx ng buildbash
npx ng build5. MCP (if the client is supported)
5. MCP(如果客户端支持)
bash
npx @taiga-ui/mcp init --client claude # writes .mcp.json
npx @taiga-ui/mcp init --client cursor # writes .cursor/mcp.json
npx @taiga-ui/mcp init --client vscode # writes .vscode/mcp.json
npx @taiga-ui/mcp init --client windsurf # writes ~/.codeium/windsurf/mcp_config.json (global only)
npx @taiga-ui/mcp init --client opencode # writes opencode.json
npx @taiga-ui/mcp init --client codex # writes .codex/config.tomlBuild passes → setup is done.
bash
npx @taiga-ui/mcp init --client claude # writes .mcp.json
npx @taiga-ui/mcp init --client cursor # writes .cursor/mcp.json
npx @taiga-ui/mcp init --client vscode # writes .vscode/mcp.json
npx @taiga-ui/mcp init --client windsurf # writes ~/.codeium/windsurf/mcp_config.json (global only)
npx @taiga-ui/mcp init --client opencode # writes opencode.json
npx @taiga-ui/mcp init --client codex # writes .codex/config.toml构建通过 → 配置完成。