igniteui-cli 15.8.1 → 15.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/client-scripts.md +7 -7
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +65 -18
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +1 -1
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +5 -5
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +23 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +4 -3
- package/templates/react/igr-ts/constants.d.ts +1 -1
- package/templates/react/igr-ts/constants.js +1 -1
- package/templates/webcomponents/igc-ts/constants.d.ts +1 -1
- package/templates/webcomponents/igc-ts/constants.js +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/README.md +15 -15
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-choose-components/SKILL.md +36 -36
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-choose-components/reference/mcp-setup.md +8 -6
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/SKILL.md +62 -60
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/references/mcp-setup.md +8 -6
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/SKILL.md +107 -94
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/asset-extraction.md +32 -32
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/design-provenance.md +32 -30
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/design-token-bridge.md +84 -71
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/figma-component-map.md +45 -44
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/figma-exploration.md +57 -51
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/mcp-setup.md +23 -23
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/project-setup.md +28 -26
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/theme-generation.md +45 -35
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/validation-patterns.md +38 -29
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/SKILL.md +63 -63
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/component-mapping.md +12 -12
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +24 -24
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-grids/SKILL.md +23 -23
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/SKILL.md +23 -23
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/angular.md +10 -10
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/react.md +9 -9
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/vanilla-js.md +9 -9
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/vue.md +11 -11
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +18 -18
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-optimize-bundle-size/SKILL.md +78 -48
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
license: MIT
|
|
3
3
|
name: igniteui-wc-choose-components
|
|
4
|
-
description: "Identify the
|
|
4
|
+
description: "Identify the correct Ignite UI Web Components (igniteui-webcomponents, grids, charts, dock manager, React wrappers) for a UI requirement. Give links to the official docs, examples, and API references. WHEN TO USE: the user asks which component fits a UI pattern (form, table, dashboard, navigation, chat, etc.), must compare options (for example, Grid Lite vs. premium Grid), wants a component list for a screen, or asks which package contains a component. WHEN NOT TO USE: implementing a view from a design image or Figma file (use generate-from-image-design or figma-to-app), installing/wiring packages into a framework (use integrate-with-framework), styling/theming (use customize-component-theme), reducing bundle size (use optimize-bundle-size), or migrating Grid Lite to the premium grid (use migrate-grid-lite-to-premium)."
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Choose the Right Ignite UI Components
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
AI agents and developers use this skill to identify the best Ignite UI components for a UI requirement. The skill also gives direct links to the official documentation, usage examples, and API references.
|
|
11
11
|
|
|
12
12
|
## Prerequisites
|
|
13
13
|
|
|
@@ -15,15 +15,15 @@ This skill helps AI agents and developers identify the best Ignite UI components
|
|
|
15
15
|
|
|
16
16
|
> **AGENT INSTRUCTION — MCP Server Setup (REQUIRED)**
|
|
17
17
|
>
|
|
18
|
-
> Before
|
|
19
|
-
>
|
|
20
|
-
> you MUST
|
|
18
|
+
> Before you use the Ignite UI CLI MCP tools, you MUST make sure that the MCP server is available.
|
|
19
|
+
> To do this, call `list_components`. If the tool is not available or the call fails,
|
|
20
|
+
> you MUST configure the server automatically. Follow the setup instructions in
|
|
21
21
|
> [`reference/mcp-setup.md`](./reference/mcp-setup.md).
|
|
22
22
|
>
|
|
23
|
-
> After
|
|
24
|
-
>
|
|
25
|
-
> Start the MCP server
|
|
26
|
-
> Do NOT skip this step
|
|
23
|
+
> After you write the file, tell the user that the MCP server is configured.
|
|
24
|
+
> Also tell the user that it can be necessary to reload the editor to activate the tools.
|
|
25
|
+
> Start the MCP server. Wait until the MCP server starts, then continue the component-related work.
|
|
26
|
+
> Do NOT skip this step. Do NOT ask the user to do it manually.
|
|
27
27
|
|
|
28
28
|
## Setting Up the Ignite UI CLI MCP Server
|
|
29
29
|
|
|
@@ -31,9 +31,9 @@ This skill helps AI agents and developers identify the best Ignite UI components
|
|
|
31
31
|
|
|
32
32
|
## Before You Answer
|
|
33
33
|
|
|
34
|
-
- Choose the package before
|
|
35
|
-
- If
|
|
36
|
-
- If the user also needs setup or code,
|
|
34
|
+
- Choose the package before you write imports or install steps.
|
|
35
|
+
- If `package.json` does not contain the necessary package, first add or install the correct Ignite UI dependency. If a package is not in `package.json`, this does not mean that the package is invalid.
|
|
36
|
+
- If the user also needs setup steps or code, load [igniteui-wc-integrate-with-framework](../igniteui-wc-integrate-with-framework/SKILL.md).
|
|
37
37
|
|
|
38
38
|
## Example Usage
|
|
39
39
|
|
|
@@ -48,18 +48,18 @@ This skill helps AI agents and developers identify the best Ignite UI components
|
|
|
48
48
|
|
|
49
49
|
## Related Skills
|
|
50
50
|
|
|
51
|
-
- [igniteui-wc-integrate-with-framework](../igniteui-wc-integrate-with-framework/SKILL.md) —
|
|
51
|
+
- [igniteui-wc-integrate-with-framework](../igniteui-wc-integrate-with-framework/SKILL.md) — Configure the selected components in React, Angular, Vue, or vanilla JS
|
|
52
52
|
- [igniteui-wc-customize-component-theme](../igniteui-wc-customize-component-theme/SKILL.md) — Style and theme the components you select
|
|
53
|
-
- [igniteui-wc-optimize-bundle-size](../igniteui-wc-optimize-bundle-size/SKILL.md) — Import only the components you
|
|
53
|
+
- [igniteui-wc-optimize-bundle-size](../igniteui-wc-optimize-bundle-size/SKILL.md) — Import only the components that you use
|
|
54
54
|
|
|
55
55
|
## When to Use
|
|
56
56
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
57
|
+
- The agent or user must decide which component fits a UI requirement
|
|
58
|
+
- The user describes a UI pattern and needs a matching component name
|
|
59
|
+
- The user wants to see which components are available
|
|
60
|
+
- The user needs links to the official docs or live examples for a specific component
|
|
61
|
+
- The user starts a new feature and maps requirements to components
|
|
62
|
+
- The user changes existing UI that has new or different component requirements
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -80,16 +80,16 @@ If the request only says "grid", choose by features:
|
|
|
80
80
|
|
|
81
81
|
## Component Catalogue by UI Pattern
|
|
82
82
|
|
|
83
|
-
> **Use MCP to
|
|
83
|
+
> **Use MCP to find the live component catalogue.** Call `list_components({ framework: "webcomponents" })`. It returns all 300+ available docs with doc names, summaries, and premium status. Then call `get_doc` with the exact doc `name` field to get usage patterns, HTML examples, and slots. Call `get_api_reference` with the component class name (for example, `IgcCarouselComponent`) to get the full property/method/event API.
|
|
84
84
|
>
|
|
85
85
|
> ```
|
|
86
86
|
> list_components({ framework: "webcomponents", filter: "<keyword>" })
|
|
87
87
|
> get_doc({ framework: "webcomponents", name: "<doc-name-from-list>" })
|
|
88
88
|
> ```
|
|
89
89
|
>
|
|
90
|
-
> Use `filter` to
|
|
90
|
+
> Use `filter` to limit the results: `"input"`, `"grid"`, `"chart"`, `"nav"`, `"date"`, `"combo"`, etc.
|
|
91
91
|
|
|
92
|
-
The tables below are a **quick routing reference** for the most common UI patterns. Component tags and package assignments are stable
|
|
92
|
+
The tables below are a **quick routing reference** for the most common UI patterns. Component tags and package assignments are stable. For usage examples, call `get_doc`. For the full property/method/event API, call `get_api_reference`.
|
|
93
93
|
|
|
94
94
|
### Inputs & Forms
|
|
95
95
|
|
|
@@ -185,9 +185,9 @@ All inputs are form-associated and integrate natively with `<form>`.
|
|
|
185
185
|
|
|
186
186
|
### Charting & Visualization
|
|
187
187
|
|
|
188
|
-
>
|
|
188
|
+
> The **`igniteui-webcomponents-charts`** package (commercial) contains the charts. Use `IgcCategoryChartComponent` or `IgcFinancialChartComponent` for simpler domain-specific scenarios. Use `IgcDataChartComponent` for full flexibility (mixed series, numeric/time axes, scatter, polar, etc.).
|
|
189
189
|
>
|
|
190
|
-
>
|
|
190
|
+
> To get the full chart doc list, call `list_components({ framework: "webcomponents", filter: "chart" })`. Before you write code, call `get_doc` for the specific chart type.
|
|
191
191
|
|
|
192
192
|
| UI Need | Component | Tag |
|
|
193
193
|
|---|---|---|
|
|
@@ -213,15 +213,15 @@ Follow these steps when an agent or user describes a UI requirement:
|
|
|
213
213
|
|
|
214
214
|
### Step 1 — Identify UI patterns
|
|
215
215
|
|
|
216
|
-
|
|
217
|
-
- "A booking form" → date input, text inputs, button,
|
|
216
|
+
Divide the UI into atomic patterns. Examples:
|
|
217
|
+
- "A booking form" → date input, text inputs, button, optionally a calendar picker
|
|
218
218
|
- "An admin dashboard" → navbar, nav drawer, cards, data grid, charts
|
|
219
219
|
- "A notification center" → snackbar or toast, badge, list
|
|
220
220
|
- "A settings page" → tabs or accordion, switch, input, select, button
|
|
221
221
|
|
|
222
222
|
### Step 2 — Map patterns to components
|
|
223
223
|
|
|
224
|
-
Use the **Component Catalogue** tables above to find matching components.
|
|
224
|
+
Use the **Component Catalogue** tables above to find matching components. If you are not sure, use this table:
|
|
225
225
|
|
|
226
226
|
| If the user needs… | Prefer… | Over… |
|
|
227
227
|
|---|---|---|
|
|
@@ -249,20 +249,20 @@ Confirm which package provides the component:
|
|
|
249
249
|
|
|
250
250
|
### Step 4 — Look up component documentation
|
|
251
251
|
|
|
252
|
-
These tools
|
|
252
|
+
These tools use different data sources. Call the correct tool so that you do not guess:
|
|
253
253
|
|
|
254
|
-
- **Usage patterns, HTML examples, slots** → `get_doc`
|
|
254
|
+
- **Usage patterns, HTML examples, slots** → `get_doc` gives the component's **topic-page** (prose guide, code samples, slot names, CSS examples). Use the kebab-case doc `name` that `list_components` returns:
|
|
255
255
|
```
|
|
256
256
|
get_doc({ framework: "webcomponents", name: "<doc-name>" })
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
- **Full property/method/event API** → `get_api_reference`
|
|
259
|
+
- **Full property/method/event API** → `get_api_reference` gives **class-level reflection data** (every `@property`, method signature, event name with types). It does NOT overlap with `get_doc`. The topic page rarely lists all properties. If you do not know the exact class name (for example, `IgcCarouselComponent`), use `search_api` first:
|
|
260
260
|
```
|
|
261
261
|
search_api({ platform: "webcomponents", query: "<component keyword>" })
|
|
262
262
|
get_api_reference({ platform: "webcomponents", component: "<ClassName>" })
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
For feature-based questions (
|
|
265
|
+
For feature-based questions (for example, "how does combo filtering work"), use `search_docs` instead:
|
|
266
266
|
|
|
267
267
|
```
|
|
268
268
|
search_docs({ framework: "webcomponents", query: "<feature keyword>" })
|
|
@@ -270,7 +270,7 @@ search_docs({ framework: "webcomponents", query: "<feature keyword>" })
|
|
|
270
270
|
|
|
271
271
|
### Step 5 — Provide a starter code snippet
|
|
272
272
|
|
|
273
|
-
|
|
273
|
+
After you identify the components, give the user a minimal working snippet. Example for an admin dashboard shell:
|
|
274
274
|
|
|
275
275
|
```typescript
|
|
276
276
|
import {
|
|
@@ -358,7 +358,7 @@ defineComponents(IgcNavbarComponent, IgcNavDrawerComponent, IgcCardComponent, Ig
|
|
|
358
358
|
### "I can't find a component for X"
|
|
359
359
|
|
|
360
360
|
1. Call `list_components({ framework: "webcomponents" })` or use `search_docs` with a feature keyword to find the best match
|
|
361
|
-
2.
|
|
361
|
+
2. If necessary, combine two simpler components (for example, `<igc-card>` + `<igc-list>` for a list card)
|
|
362
362
|
|
|
363
363
|
### "Which grid should I use?"
|
|
364
364
|
|
|
@@ -372,11 +372,11 @@ defineComponents(IgcNavbarComponent, IgcNavDrawerComponent, IgcCardComponent, Ig
|
|
|
372
372
|
|
|
373
373
|
### "I need React support"
|
|
374
374
|
|
|
375
|
-
Use the [`igniteui-react`](https://www.npmjs.com/package/igniteui-react) package.
|
|
375
|
+
Use the [`igniteui-react`](https://www.npmjs.com/package/igniteui-react) package. It wraps the components with React-friendly event bindings and props. For setup, see the [igniteui-wc-integrate-with-framework](../igniteui-wc-integrate-with-framework/SKILL.md) skill.
|
|
376
376
|
|
|
377
377
|
### "How do I get commercial components?"
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
For licensing information, go to [https://www.infragistics.com/products/ignite-ui-web-components](https://www.infragistics.com/products/ignite-ui-web-components) or contact [Infragistics sales](https://www.infragistics.com/about-us/contact-us).
|
|
380
380
|
|
|
381
381
|
---
|
|
382
382
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
- [WebStorm / JetBrains IDEs](#webstorm--jetbrains-ides)
|
|
13
13
|
- [Verifying the Setup](#verifying-the-setup)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
With the Ignite UI CLI MCP server, AI assistants can find Ignite UI components, read component documentation, and support related Ignite UI workflows. You must configure the server in your editor before these tools become available.
|
|
16
16
|
|
|
17
17
|
## VS Code
|
|
18
18
|
|
|
@@ -29,7 +29,7 @@ Create or edit `.vscode/mcp.json` in your project:
|
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
This works
|
|
32
|
+
This configuration works when `igniteui-cli` is installed locally in `node_modules`. It also works when `npx` must download `igniteui-cli` from the npm registry. `npx -y` handles both cases.
|
|
33
33
|
|
|
34
34
|
## Cursor
|
|
35
35
|
|
|
@@ -68,15 +68,17 @@ Edit the Claude Desktop config file:
|
|
|
68
68
|
|
|
69
69
|
1. Go to **Settings → Tools → AI Assistant → MCP Servers**
|
|
70
70
|
2. Click **+ Add MCP Server**
|
|
71
|
-
3. Set Command to `npx`
|
|
72
|
-
4.
|
|
71
|
+
3. Set Command to `npx`
|
|
72
|
+
4. Set Arguments to `-y igniteui-cli mcp`
|
|
73
|
+
5. Click OK
|
|
74
|
+
6. Restart the AI Assistant
|
|
73
75
|
|
|
74
76
|
> The `-y` flag skips interactive prompts if `igniteui-cli` is not already installed locally.
|
|
75
77
|
|
|
76
78
|
## Verifying the Setup
|
|
77
79
|
|
|
78
|
-
After
|
|
80
|
+
After you configure the MCP server, ask your AI assistant:
|
|
79
81
|
|
|
80
82
|
> "List all available Ignite UI components"
|
|
81
83
|
|
|
82
|
-
If the MCP server is running, the `list_components` tool
|
|
84
|
+
If the MCP server is running, the `list_components` tool returns all available components for the detected framework.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
license: MIT
|
|
3
3
|
name: igniteui-wc-customize-component-theme
|
|
4
|
-
description: "Theme and style Ignite UI Web Components (and igniteui-react) apps
|
|
4
|
+
description: "Theme and style Ignite UI Web Components (and igniteui-react) apps with CSS custom properties, optional Sass, and the igniteui-theming MCP server. WHEN TO USE: the user wants to apply or switch a pre-built theme (Material, Fluent, Bootstrap, Indigo, light/dark), create a custom palette or global theme, restyle a specific component with design tokens or ::part, scope a theme to a container, adjust sizing/spacing/roundness, or toggle light/dark mode. WHEN NOT TO USE: choosing which component to use (use choose-components), building a full view from a design image or Figma file (use generate-from-image-design or figma-to-app, which include theming), installing packages or framework setup (use integrate-with-framework), or styling non-Ignite UI elements or libraries."
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -9,10 +9,10 @@ user-invocable: true
|
|
|
9
9
|
|
|
10
10
|
## Description
|
|
11
11
|
|
|
12
|
-
This skill
|
|
12
|
+
This skill shows AI agents how to theme Ignite UI Web Components (and React through `igniteui-react`) applications. It supports two approaches:
|
|
13
13
|
|
|
14
14
|
- **CSS custom properties** — works in any project without additional build tooling
|
|
15
|
-
- **Sass** — available when the project has Sass configured
|
|
15
|
+
- **Sass** — available when the project has Sass configured. It gives the full palette/typography/elevation API
|
|
16
16
|
|
|
17
17
|
The skill also covers component-level theming, layout controls (spacing, sizing, roundness), and how to use the **Ignite UI Theming MCP server** for AI-assisted code generation.
|
|
18
18
|
|
|
@@ -24,24 +24,24 @@ The skill also covers component-level theming, layout controls (spacing, sizing,
|
|
|
24
24
|
|
|
25
25
|
> **AGENT INSTRUCTION — MCP Server Setup (REQUIRED)**
|
|
26
26
|
>
|
|
27
|
-
> Before
|
|
28
|
-
>
|
|
29
|
-
> you MUST
|
|
27
|
+
> Before you use any theming tools, you MUST make sure that the MCP server is available.
|
|
28
|
+
> To do this, call `detect_platform`. If the tool is not available or the call fails,
|
|
29
|
+
> you MUST configure the server automatically. Follow the setup steps below.
|
|
30
30
|
>
|
|
31
|
-
> After
|
|
32
|
-
>
|
|
33
|
-
> Start the MCP server
|
|
34
|
-
> Do NOT skip this step
|
|
31
|
+
> After you write the file, tell the user that the MCP server is configured.
|
|
32
|
+
> Also tell the user that it can be necessary to reload the editor to activate the tools.
|
|
33
|
+
> Start the MCP server. Wait until the MCP server starts, then continue the theming work.
|
|
34
|
+
> Do NOT skip this step. Do NOT ask the user to do it manually.
|
|
35
35
|
|
|
36
36
|
## Setting Up the Theming MCP Server
|
|
37
37
|
|
|
38
38
|
See [references/mcp-setup.md](references/mcp-setup.md) for VS Code, Cursor, Claude Desktop, and WebStorm configuration instructions.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
To make sure that the server is running, call `detect_platform`. It reads your `package.json` and returns the detected platform (for example, `webcomponents`).
|
|
41
41
|
|
|
42
42
|
## Theming Architecture
|
|
43
43
|
|
|
44
|
-
The theming system
|
|
44
|
+
The theming system has four pillars:
|
|
45
45
|
|
|
46
46
|
| Pillar | Description |
|
|
47
47
|
|---|---|
|
|
@@ -50,7 +50,7 @@ The theming system is built on four pillars:
|
|
|
50
50
|
| **Elevations** | Box-shadow levels (0–24) |
|
|
51
51
|
| **Schema** | Per-component recipes that map palette tokens to component-level CSS custom properties |
|
|
52
52
|
|
|
53
|
-
Four built-in design systems are available
|
|
53
|
+
Four built-in design systems are available. Each has light and dark variants:
|
|
54
54
|
|
|
55
55
|
| Design System | Variants |
|
|
56
56
|
|---|---|
|
|
@@ -59,19 +59,19 @@ Four built-in design systems are available — each with light and dark variants
|
|
|
59
59
|
| **Fluent** | `light/fluent.css`, `dark/fluent.css` |
|
|
60
60
|
| **Indigo** | `light/indigo.css`, `dark/indigo.css` |
|
|
61
61
|
|
|
62
|
-
For the full live reference (palette families, design system schemas, variant constraints, and preset palettes) call:
|
|
62
|
+
For the full live reference (palette families, design system schemas, variant constraints, and preset palettes), call:
|
|
63
63
|
|
|
64
64
|
```
|
|
65
65
|
read_resource({ uri: "theming://platforms/webcomponents" })
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
Additional guidance resources:
|
|
69
|
-
- `read_resource({ uri: "theming://guidance/colors/roles" })` — which components use primary vs secondary vs surface, and
|
|
69
|
+
- `read_resource({ uri: "theming://guidance/colors/roles" })` — which components use primary vs secondary vs surface, and where to use each shade (50/500/900)
|
|
70
70
|
- `read_resource({ uri: "theming://guidance/colors/rules" })` — surface and gray luminance rules for light/dark variants (why gray is inverted from surface, WCAG contrast thresholds)
|
|
71
71
|
|
|
72
72
|
## Pre-built Themes
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
To theme an app quickly, import a pre-built CSS file in your entry point:
|
|
75
75
|
|
|
76
76
|
```typescript
|
|
77
77
|
import 'igniteui-webcomponents/themes/light/bootstrap.css';
|
|
@@ -90,11 +90,13 @@ Available pre-built CSS files:
|
|
|
90
90
|
| `igniteui-webcomponents/themes/light/indigo.css` | Indigo Light |
|
|
91
91
|
| `igniteui-webcomponents/themes/dark/indigo.css` | Indigo Dark |
|
|
92
92
|
|
|
93
|
+
The components contain the styles of all four themes. If the app uses only one theme, an `igc-theme-<name>` bundler condition removes the other three from the bundle. See [igniteui-wc-optimize-bundle-size](../igniteui-wc-optimize-bundle-size/SKILL.md).
|
|
94
|
+
|
|
93
95
|
## Custom Theme via CSS Custom Properties
|
|
94
96
|
|
|
95
|
-
>
|
|
97
|
+
> Sass is not necessary. This approach works in any project after you import a pre-built theme.
|
|
96
98
|
|
|
97
|
-
After
|
|
99
|
+
After you import a pre-built theme, override the `*-500` base shade to change a color family. CSS relative color syntax calculates all other shades (50–900) from the 500 value automatically:
|
|
98
100
|
|
|
99
101
|
```css
|
|
100
102
|
:root {
|
|
@@ -130,11 +132,11 @@ For dark mode, either import a dark theme CSS file directly or toggle overrides
|
|
|
130
132
|
|
|
131
133
|
## Custom Theme via Sass
|
|
132
134
|
|
|
133
|
-
>
|
|
135
|
+
> This approach requires Sass configured in the project. First, check whether the project has a Sass setup (for example, a `styles.scss` entry file, `sass` in `devDependencies`, or a Vite/webpack Sass plugin).
|
|
134
136
|
|
|
135
|
-
The Sass API for `igniteui-webcomponents` uses `@use 'igniteui-theming'` with individual mixins
|
|
137
|
+
The Sass API for `igniteui-webcomponents` uses `@use 'igniteui-theming'` with individual mixins. It does **not** use the Angular-specific `core()` / `theme()` combined mixins.
|
|
136
138
|
|
|
137
|
-
Call `create_theme` to generate production-ready Sass for palette + typography + elevations in
|
|
139
|
+
Call `create_theme` to generate production-ready Sass for palette + typography + elevations in one step:
|
|
138
140
|
|
|
139
141
|
```
|
|
140
142
|
create_theme({
|
|
@@ -150,23 +152,23 @@ create_theme({
|
|
|
150
152
|
})
|
|
151
153
|
```
|
|
152
154
|
|
|
153
|
-
For a dark theme pass a dark `surfaceColor` (
|
|
155
|
+
For a dark theme, pass a dark `surfaceColor` (for example, `"#121212"`) and `variant: "dark"`. `create_theme` selects the correct dark schema automatically.
|
|
154
156
|
|
|
155
|
-
|
|
157
|
+
To generate only a palette (when typography/elevations are already set), use `create_palette`. To scope a theme to a container, put the generated `@include palette(...)` block inside the target selector.
|
|
156
158
|
|
|
157
159
|
## Component-Level Theming
|
|
158
160
|
|
|
159
|
-
|
|
161
|
+
To override the appearance of individual components, use component theme functions and the `tokens` mixin.
|
|
160
162
|
|
|
161
163
|
> **AGENT INSTRUCTION — No Hardcoded Colors (CRITICAL)**
|
|
162
164
|
>
|
|
163
|
-
>
|
|
164
|
-
> **every color reference MUST come from the generated palette tokens
|
|
165
|
+
> After palette generation (`palette()` in Sass, or `create_palette` / `create_theme` through MCP),
|
|
166
|
+
> **every color reference MUST come from the generated palette tokens**. Do not hardcode hex/RGB/HSL values.
|
|
165
167
|
>
|
|
166
|
-
>
|
|
167
|
-
>
|
|
168
|
+
> In CSS, use `var(--ig-primary-500)`, `var(--ig-secondary-300)`, `var(--ig-surface-500)`, etc.
|
|
169
|
+
> Or, use the `get_color` MCP tool to get the correct token reference.
|
|
168
170
|
>
|
|
169
|
-
> **WRONG** (hardcoded hex — breaks theme switching
|
|
171
|
+
> **WRONG** (hardcoded hex — this breaks theme switching and ignores the palette):
|
|
170
172
|
> ```css
|
|
171
173
|
> igc-avatar {
|
|
172
174
|
> --ig-avatar-background: #E91E63; /* ✗ hardcoded */
|
|
@@ -174,7 +176,7 @@ Override individual component appearance using component theme functions and the
|
|
|
174
176
|
> }
|
|
175
177
|
> ```
|
|
176
178
|
>
|
|
177
|
-
> **RIGHT — CSS** (palette token — stays
|
|
179
|
+
> **RIGHT — CSS** (palette token — this stays synchronized with the theme):
|
|
178
180
|
> ```css
|
|
179
181
|
> igc-avatar {
|
|
180
182
|
> --ig-avatar-background: var(--ig-primary-500);
|
|
@@ -191,9 +193,9 @@ Override individual component appearance using component theme functions and the
|
|
|
191
193
|
> );
|
|
192
194
|
> ```
|
|
193
195
|
>
|
|
194
|
-
> This applies to **all** style code: component themes, custom CSS rules, and inline styles.
|
|
195
|
-
>
|
|
196
|
-
>
|
|
196
|
+
> This rule applies to **all** style code: component themes, custom CSS rules, and inline styles.
|
|
197
|
+
> Use raw hex values only in the **initial `palette()` call** that seeds the color system.
|
|
198
|
+
> All other style code must reference the palette.
|
|
197
199
|
|
|
198
200
|
```css
|
|
199
201
|
igc-avatar {
|
|
@@ -216,16 +218,16 @@ Pass `output: "css"` if you want CSS custom properties instead of Sass.
|
|
|
216
218
|
|
|
217
219
|
### Discovering Available Tokens
|
|
218
220
|
|
|
219
|
-
Each component has its own set of design tokens (themeable CSS custom properties). Before
|
|
221
|
+
Each component has its own set of design tokens (themeable CSS custom properties). Before you theme a component, you must know which tokens exist. To find them, use the **MCP tool** `get_component_design_tokens`.
|
|
220
222
|
|
|
221
223
|
### Compound Components
|
|
222
224
|
|
|
223
|
-
Some components (
|
|
225
|
+
Some components (for example, `combo`, `grid`, `date-picker`, `select`) are **compound**. They contain internal child components, and each child component requires its own theme. For example, `date-picker` uses `calendar`, `flat-button`, and `input-group` internally.
|
|
224
226
|
|
|
225
227
|
Workflow for compound components:
|
|
226
|
-
1. Call `get_component_design_tokens` for the parent (
|
|
227
|
-
2.
|
|
228
|
-
3.
|
|
228
|
+
1. Call `get_component_design_tokens` for the parent (for example, `date-picker`)
|
|
229
|
+
2. Find the related themes and scope selectors in the response
|
|
230
|
+
3. For each child, call `create_component_theme` with the parent's selector as the wrapper
|
|
229
231
|
|
|
230
232
|
## Layout Controls
|
|
231
233
|
|
|
@@ -243,25 +245,25 @@ set_roundness({ radiusFactor: 0.5 }) // global
|
|
|
243
245
|
set_roundness({ radiusFactor: 0.0 }) // square
|
|
244
246
|
```
|
|
245
247
|
|
|
246
|
-
|
|
248
|
+
By default, all three tools give CSS output. Add `output: "sass"` when the project has Sass configured.
|
|
247
249
|
|
|
248
|
-
The underlying CSS custom properties are `--ig-size`, `--ig-spacing`, and `--ig-radius-factor`. You can also set them directly on `:root` or a scoped selector
|
|
250
|
+
The underlying CSS custom properties are `--ig-size`, `--ig-spacing`, and `--ig-radius-factor`. You can also set them directly on `:root` or on a scoped selector. Do this when a one-off override is simpler than a tool call.
|
|
249
251
|
|
|
250
252
|
## Using the Theming MCP Server
|
|
251
253
|
|
|
252
|
-
The Ignite UI Theming MCP server
|
|
254
|
+
The Ignite UI Theming MCP server has tools for AI-assisted theme code generation.
|
|
253
255
|
|
|
254
|
-
> **IMPORTANT — File Safety Rule**: When
|
|
256
|
+
> **IMPORTANT — File Safety Rule**: When you generate or update theme code, **never overwrite existing style files directly**. Always **propose the changes as an update**. Let the user review and approve the changes before you write to disk. If a `styles.scss` (or any target file) already exists, show the generated code as a diff or suggestion. Do not replace the file contents. This prevents accidental loss of custom styles that the user already wrote.
|
|
255
257
|
|
|
256
|
-
Quick tool sequence
|
|
258
|
+
Quick tool sequence. For full parameter details, see the earlier sections:
|
|
257
259
|
|
|
258
260
|
| Step | Tool | Purpose |
|
|
259
261
|
|---|---|---|
|
|
260
|
-
| 1 | `detect_platform` | Always first —
|
|
262
|
+
| 1 | `detect_platform` | Always first — detects the platform from `package.json` automatically |
|
|
261
263
|
| 2 | `create_theme` | Full Sass theme: palette + typography + elevations in one call |
|
|
262
|
-
| 3 | `get_component_design_tokens` |
|
|
264
|
+
| 3 | `get_component_design_tokens` | Find valid token names before you call `create_component_theme` |
|
|
263
265
|
| 4 | `create_component_theme` | Scoped component override — all token values must use `var(--ig-*)` |
|
|
264
|
-
| 5 | `create_palette` | Palette only, when a full Sass theme is not
|
|
266
|
+
| 5 | `create_palette` | Palette only, when a full Sass theme is not necessary |
|
|
265
267
|
| 6 | `set_size` / `set_spacing` / `set_roundness` | Layout controls — add `output: "sass"` for Sass output |
|
|
266
268
|
| 7 | `get_color` | Resolve color intent to `var(--ig-<family>-<shade>)` token reference |
|
|
267
269
|
|
|
@@ -282,7 +284,7 @@ Use `read_resource` with these URIs for preset values and documentation:
|
|
|
282
284
|
|
|
283
285
|
## Referencing Colors in Custom Styles
|
|
284
286
|
|
|
285
|
-
After a theme
|
|
287
|
+
After you apply a theme, the palette is available as CSS custom properties on `:root`. Use these tokens in all custom CSS. Do not add standalone hex/RGB variables for colors that the palette already has.
|
|
286
288
|
|
|
287
289
|
### Correct: Palette Tokens
|
|
288
290
|
|
|
@@ -320,16 +322,16 @@ After a theme is applied, the palette is available as CSS custom properties on `
|
|
|
320
322
|
Raw hex values are acceptable **only** in these contexts:
|
|
321
323
|
|
|
322
324
|
1. **`palette()` call** — the initial seed colors that generate the full palette
|
|
323
|
-
2. **`create_palette` / `create_theme` MCP tool inputs** — the base colors
|
|
324
|
-
3. **Non-palette decorative values** —
|
|
325
|
+
2. **`create_palette` / `create_theme` MCP tool inputs** — the base colors that you pass to the tool
|
|
326
|
+
3. **Non-palette decorative values** — for example, a one-off SVG illustration color that intentionally does not change with the theme
|
|
325
327
|
|
|
326
|
-
|
|
328
|
+
All other colors must use `var(--ig-<family>-<shade>)` tokens.
|
|
327
329
|
|
|
328
330
|
## Common Patterns
|
|
329
331
|
|
|
330
332
|
### Switching Between Light and Dark Themes — CSS approach
|
|
331
333
|
|
|
332
|
-
Import the
|
|
334
|
+
Import the applicable theme CSS. Then toggle with a class or a media query:
|
|
333
335
|
|
|
334
336
|
```typescript
|
|
335
337
|
// In your entry point — choose one variant as the default
|
|
@@ -350,7 +352,7 @@ import 'igniteui-webcomponents/themes/light/bootstrap.css';
|
|
|
350
352
|
}
|
|
351
353
|
```
|
|
352
354
|
|
|
353
|
-
Or
|
|
355
|
+
Or, change the stylesheet dynamically at runtime:
|
|
354
356
|
|
|
355
357
|
```typescript
|
|
356
358
|
function setTheme(variant: 'light' | 'dark', design = 'bootstrap') {
|
|
@@ -361,7 +363,7 @@ function setTheme(variant: 'light' | 'dark', design = 'bootstrap') {
|
|
|
361
363
|
|
|
362
364
|
### Switching Between Light and Dark Themes — Sass approach
|
|
363
365
|
|
|
364
|
-
When Sass is configured, generate both theme blocks with `create_theme
|
|
366
|
+
When Sass is configured, generate both theme blocks with `create_theme`. Call it once with `variant: "light"` and once with `variant: "dark"`. For the dark variant, put the generated `@include palette(...)` call inside `.dark-theme { }`. The tool selects the correct schema automatically for each variant.
|
|
365
367
|
|
|
366
368
|
### Scoping a Theme to a Container — CSS approach
|
|
367
369
|
|
|
@@ -373,16 +375,16 @@ When Sass is configured, generate both theme blocks with `create_theme` — once
|
|
|
373
375
|
|
|
374
376
|
### Scoping a Theme to a Container — Sass approach
|
|
375
377
|
|
|
376
|
-
Generate the palette block with `create_palette` and
|
|
378
|
+
Generate the palette block with `create_palette` and put it in the target container selector manually. For component-scoped overrides, you can also pass a custom `selector` to `create_component_theme`.
|
|
377
379
|
|
|
378
380
|
## Key Rules
|
|
379
381
|
|
|
380
|
-
1. **Never overwrite existing files directly
|
|
381
|
-
2. **Always call `detect_platform` first** when
|
|
382
|
+
1. **Never overwrite existing files directly**. Always propose theme code as an update for user review. Do not replace existing style files without confirmation
|
|
383
|
+
2. **Always call `detect_platform` first** when you use MCP tools
|
|
382
384
|
3. **Always call `get_component_design_tokens` before `create_component_theme`** to discover valid token names
|
|
383
|
-
4. **Palette shades 50 = lightest, 900 = darkest** for all chromatic colors
|
|
385
|
+
4. **Palette shades 50 = lightest, 900 = darkest** for all chromatic colors. Do not invert them for dark themes (only gray inverts)
|
|
384
386
|
5. **Surface color must match the variant** — light color for `light`, dark color for `dark`
|
|
385
|
-
6. **Sass only**: Use `create_theme` (or `create_palette` / `create_typography` / `create_elevations` individually) to generate correct Sass
|
|
387
|
+
6. **Sass only**: Use `create_theme` (or `create_palette` / `create_typography` / `create_elevations` individually) to generate correct Sass. The theming module for Web Components is `igniteui-theming`, not `igniteui-angular/theming`. The Angular-specific `core()` / `theme()` combined mixins do **not** apply here
|
|
386
388
|
7. **Sass only**: Component themes use `create_component_theme` to generate `@include tokens($theme)` inside the correct selector
|
|
387
|
-
8. **For compound components**, follow the full checklist
|
|
388
|
-
9. **Never hardcode colors after palette generation
|
|
389
|
+
8. **For compound components**, follow the full checklist that `get_component_design_tokens` returns. Theme each child component with its scoped selector
|
|
390
|
+
9. **Never hardcode colors after palette generation**. After you create a palette, every color in component themes, custom CSS, and Sass variables must use `var(--ig-<family>-<shade>)` palette tokens (for example, `var(--ig-primary-500)`, `var(--ig-gray-200)`). Raw hex/RGB/HSL values are acceptable only in the initial `palette()` seed call. This keeps themes consistent, switchable (light/dark), and maintainable
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Part of the [`igniteui-wc-customize-component-theme`](../SKILL.md) skill.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
With the Ignite UI Theming MCP server, AI assistants can generate production-ready theming code. You must configure the server in your editor before the theming tools become available.
|
|
6
6
|
|
|
7
7
|
## VS Code
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ Create or edit `.vscode/mcp.json` in your project:
|
|
|
19
19
|
}
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
This works
|
|
22
|
+
This configuration works when `igniteui-theming` is installed locally in `node_modules`. It also works when `npx` must download `igniteui-theming` from the npm registry. `npx -y` handles both cases.
|
|
23
23
|
|
|
24
24
|
## Cursor
|
|
25
25
|
|
|
@@ -57,13 +57,15 @@ Edit the Claude Desktop config file:
|
|
|
57
57
|
|
|
58
58
|
1. Go to **Settings → Tools → AI Assistant → MCP Servers**
|
|
59
59
|
2. Click **+ Add MCP Server**
|
|
60
|
-
3. Set Command to `npx`
|
|
61
|
-
4.
|
|
60
|
+
3. Set Command to `npx`
|
|
61
|
+
4. Set Arguments to `igniteui-theming igniteui-theming-mcp`
|
|
62
|
+
5. Click OK
|
|
63
|
+
6. Restart the AI Assistant
|
|
62
64
|
|
|
63
65
|
## Verifying the Setup
|
|
64
66
|
|
|
65
|
-
After
|
|
67
|
+
After you configure the MCP server, ask your AI assistant:
|
|
66
68
|
|
|
67
69
|
> "Detect which Ignite UI platform my project uses"
|
|
68
70
|
|
|
69
|
-
If the MCP server is running, the `detect_platform` tool
|
|
71
|
+
If the MCP server is running, the `detect_platform` tool analyzes your `package.json` and returns the detected platform (for example, `webcomponents`).
|