igniteui-cli 15.1.0 → 15.2.1-alpha.3
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/lib/PromptSession.d.ts +1 -1
- package/lib/PromptSession.js +2 -2
- package/lib/commands/ai-config.d.ts +3 -5
- package/lib/commands/ai-config.js +68 -23
- package/lib/commands/new.js +1 -1
- package/package.json +4 -4
- package/templates/blazor/igb/index.d.ts +1 -0
- package/templates/blazor/igb/index.js +12 -0
- package/templates/blazor/igb/projects/ai-config/files/AGENTS.md +65 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +65 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/README.md +61 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +118 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +302 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +350 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +178 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +365 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +180 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +322 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +78 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +214 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +284 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +281 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +503 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +188 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +264 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +297 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +447 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +78 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +299 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +284 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +160 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +497 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +553 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +259 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +276 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +81 -0
- package/templates/blazor/igb/projects/ai-config/index.d.ts +22 -0
- package/templates/blazor/igb/projects/ai-config/index.js +62 -0
- package/templates/blazor/index.d.ts +3 -0
- package/templates/blazor/index.js +11 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Application Setup & Registration
|
|
2
|
+
|
|
3
|
+
> **Part of the [`igniteui-blazor-components`](../SKILL.md) skill hub.**
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [NuGet Installation](#nuget-installation)
|
|
8
|
+
- [Program.cs Registration](#programcs-registration)
|
|
9
|
+
- [\_Imports.razor](#_importsrazor)
|
|
10
|
+
- [CSS Theme Link](#css-theme-link)
|
|
11
|
+
- [Script Reference](#script-reference)
|
|
12
|
+
- [Project Type Differences](#project-type-differences)
|
|
13
|
+
- [Selective Module Registration](#selective-module-registration)
|
|
14
|
+
- [Key Rules](#key-rules)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## NuGet Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# OSS component package from NuGet.org
|
|
22
|
+
dotnet add package IgniteUI.Blazor.Lite
|
|
23
|
+
|
|
24
|
+
# OSS Grid Lite package from NuGet.org
|
|
25
|
+
dotnet add package IgniteUI.Blazor.GridLite
|
|
26
|
+
|
|
27
|
+
# Trial (full suite with watermark) from NuGet.org
|
|
28
|
+
dotnet add package IgniteUI.Blazor.Trial
|
|
29
|
+
|
|
30
|
+
# Or via Package Manager Console
|
|
31
|
+
Install-Package IgniteUI.Blazor.Lite
|
|
32
|
+
Install-Package IgniteUI.Blazor.GridLite
|
|
33
|
+
Install-Package IgniteUI.Blazor.Trial
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Licensed users install the full `IgniteUI.Blazor` package from the Infragistics private feed:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Add the Infragistics feed first (one-time)
|
|
40
|
+
nuget sources add -name "Infragistics" \
|
|
41
|
+
-source "https://packages.infragistics.com/nuget/licensed/v3/index.json" \
|
|
42
|
+
-username "your@email.com" \
|
|
43
|
+
-password "your-password"
|
|
44
|
+
|
|
45
|
+
dotnet add package IgniteUI.Blazor
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Package selection:
|
|
49
|
+
|
|
50
|
+
| Package | Use when |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `IgniteUI.Blazor.Lite` | Open-source MIT core UI components: buttons, inputs, lists, cards, navigation, layout, and feedback components |
|
|
53
|
+
| `IgniteUI.Blazor.GridLite` | Open-source MIT `IgbGridLite` for lightweight read-only or essential data grid scenarios |
|
|
54
|
+
| `IgniteUI.Blazor.Trial` | Evaluation of the full suite (same as `IgniteUI.Blazor` but with a trial watermark; available publicly on NuGet.org) |
|
|
55
|
+
| `IgniteUI.Blazor` | Licensed full suite: premium grids, charts, maps, gauges, Dock Manager, and all core UI components |
|
|
56
|
+
|
|
57
|
+
Do **not** mix `IgniteUI.Blazor` and `IgniteUI.Blazor.Lite` in the same project. They use the same namespaces and duplicate some components; pick the licensed full package path or the OSS Lite package path.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Program.cs Registration
|
|
62
|
+
|
|
63
|
+
### Blazor Server (.NET 6+)
|
|
64
|
+
|
|
65
|
+
```csharp
|
|
66
|
+
var builder = WebApplication.CreateBuilder(args);
|
|
67
|
+
|
|
68
|
+
builder.Services.AddRazorPages();
|
|
69
|
+
builder.Services.AddServerSideBlazor();
|
|
70
|
+
builder.Services.AddIgniteUIBlazor(); // registers ALL modules
|
|
71
|
+
|
|
72
|
+
var app = builder.Build();
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Blazor WebAssembly (.NET 6+)
|
|
76
|
+
|
|
77
|
+
```csharp
|
|
78
|
+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
79
|
+
// ...
|
|
80
|
+
builder.Services.AddIgniteUIBlazor();
|
|
81
|
+
|
|
82
|
+
await builder.Build().RunAsync();
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Blazor Web App (.NET 8+ - both server and client Program.cs)
|
|
86
|
+
|
|
87
|
+
```csharp
|
|
88
|
+
// Server Project - Program.cs
|
|
89
|
+
builder.Services.AddRazorComponents()
|
|
90
|
+
.AddInteractiveServerComponents()
|
|
91
|
+
.AddInteractiveWebAssemblyComponents();
|
|
92
|
+
builder.Services.AddIgniteUIBlazor();
|
|
93
|
+
|
|
94
|
+
// Client Project - Program.cs
|
|
95
|
+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
96
|
+
builder.Services.AddIgniteUIBlazor();
|
|
97
|
+
await builder.Build().RunAsync();
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
> **AGENT INSTRUCTION - Blazor Web App render modes**
|
|
101
|
+
>
|
|
102
|
+
> Ignite UI components require an interactive render mode. For per-page or per-component interactivity, add the render mode directive to pages that use Ignite UI components:
|
|
103
|
+
>
|
|
104
|
+
> ```razor
|
|
105
|
+
> @rendermode InteractiveServer
|
|
106
|
+
> @* or: @rendermode InteractiveWebAssembly *@
|
|
107
|
+
> @* or: @rendermode InteractiveAuto *@
|
|
108
|
+
> ```
|
|
109
|
+
>
|
|
110
|
+
> For global interactivity, configure it in `App.razor`: `<Routes @rendermode="InteractiveAuto"/>`.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## \_Imports.razor
|
|
115
|
+
|
|
116
|
+
Add the namespace to `_Imports.razor` so Razor pages can use Ignite UI component tags without fully qualifying them:
|
|
117
|
+
|
|
118
|
+
```razor
|
|
119
|
+
@using IgniteUI.Blazor.Controls
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
For Blazor Web App solutions with separate server and client projects, add the same line to both `_Imports.razor` files when components are used in both projects. Page-level `@using IgniteUI.Blazor.Controls` is acceptable for isolated samples, but `_Imports.razor` is the preferred application setup.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## CSS Theme Link
|
|
127
|
+
|
|
128
|
+
Add in the `<head>` of:
|
|
129
|
+
- **Blazor Server / Web App**: `Pages/_Host.cshtml` or `Components/App.razor`
|
|
130
|
+
- **Blazor WASM**: `wwwroot/index.html`
|
|
131
|
+
|
|
132
|
+
```html
|
|
133
|
+
<link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Available theme files (under `_content/IgniteUI.Blazor/themes/`):
|
|
137
|
+
|
|
138
|
+
| Path | Theme |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `light/bootstrap.css` | Bootstrap Light |
|
|
141
|
+
| `dark/bootstrap.css` | Bootstrap Dark |
|
|
142
|
+
| `light/material.css` | Material Light |
|
|
143
|
+
| `dark/material.css` | Material Dark |
|
|
144
|
+
| `light/fluent.css` | Fluent Light |
|
|
145
|
+
| `dark/fluent.css` | Fluent Dark |
|
|
146
|
+
| `light/indigo.css` | Indigo Light |
|
|
147
|
+
| `dark/indigo.css` | Indigo Dark |
|
|
148
|
+
|
|
149
|
+
For .NET 9+ Web App projects, use the `Assets` property:
|
|
150
|
+
|
|
151
|
+
```razor
|
|
152
|
+
<link rel="stylesheet" href="@Assets["_content/IgniteUI.Blazor/themes/light/bootstrap.css"]" />
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
For `IgniteUI.Blazor.GridLite`, use the Grid Lite package theme path shown in the current Grid Lite docs:
|
|
156
|
+
|
|
157
|
+
```html
|
|
158
|
+
<link href="_content/IgniteUI.Blazor.GridLite/css/themes/light/bootstrap.css" rel="stylesheet" />
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Script Reference
|
|
164
|
+
|
|
165
|
+
Add alongside the Blazor framework script in the host page:
|
|
166
|
+
|
|
167
|
+
```html
|
|
168
|
+
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
|
|
169
|
+
<!-- Blazor Server -->
|
|
170
|
+
<script src="_framework/blazor.server.js"></script>
|
|
171
|
+
<!-- Blazor WASM -->
|
|
172
|
+
<script src="_framework/blazor.webassembly.js"></script>
|
|
173
|
+
<!-- Blazor Web App -->
|
|
174
|
+
<script src="_framework/blazor.web.js"></script>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Project Type Differences
|
|
180
|
+
|
|
181
|
+
| Project type | `Program.cs` host | Host page for CSS/script | Script tag |
|
|
182
|
+
|---|---|---|---|
|
|
183
|
+
| **Blazor Server** | `WebApplication.CreateBuilder` | `Pages/_Host.cshtml` | `blazor.server.js` |
|
|
184
|
+
| **Blazor WASM** | `WebAssemblyHostBuilder` | `wwwroot/index.html` | `blazor.webassembly.js` |
|
|
185
|
+
| **Blazor Web App** | Both server + client `Program.cs` | `Components/App.razor` | `blazor.web.js` |
|
|
186
|
+
| **MAUI Blazor Hybrid** | `MauiApp.CreateBuilder` (in `MauiProgram.cs`) | `wwwroot/index.html` | `blazor.webview.js` |
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Selective Module Registration
|
|
191
|
+
|
|
192
|
+
Register only the modules you use to keep bundle size small:
|
|
193
|
+
|
|
194
|
+
```csharp
|
|
195
|
+
builder.Services.AddIgniteUIBlazor(
|
|
196
|
+
typeof(IgbInputModule),
|
|
197
|
+
typeof(IgbComboModule),
|
|
198
|
+
typeof(IgbDatePickerModule),
|
|
199
|
+
typeof(IgbDialogModule),
|
|
200
|
+
typeof(IgbButtonModule)
|
|
201
|
+
);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Module names follow the pattern `Igb{ComponentName}Module`. If unsure of the module name, call `get_doc` for that component - every doc shows the exact `typeof(...)` registration call. Use `search_api` and `get_api_reference` for component API details.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Key Rules
|
|
209
|
+
|
|
210
|
+
1. **Both server and client `Program.cs` must register the service** in Blazor Web App projects.
|
|
211
|
+
2. **The CSS theme link and the script tag are both required.** Missing either causes components to render unstyled or non-functional.
|
|
212
|
+
3. **Add `@using IgniteUI.Blazor.Controls` to `_Imports.razor`**, and in both server/client `_Imports.razor` files for split Blazor Web App projects.
|
|
213
|
+
4. **`AddIgniteUIBlazor()` with no arguments registers all modules.** Use explicit `typeof(...)` registrations in production for smaller bundles.
|
|
214
|
+
5. **Blazor Web App components need an interactive render mode.** Static SSR pages will not render Ignite UI components correctly.
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: igniteui-blazor-generate-from-image-design
|
|
3
|
+
description: Implement Blazor application views from design images using Ignite UI Blazor components. Uses MCP servers (igniteui-cli, igniteui-theming) to discover components, generate themes, and follow best practices. Triggers when the user provides a design image (screenshot, mockup, wireframe) and wants it built as a working Blazor view with Ignite UI Blazor components. Also triggers when the user asks to "implement this design", "build this UI", "convert this mockup", or "create a page from this image" in an Ignite UI Blazor project.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementing Ignite UI Blazor Views from Design Images
|
|
8
|
+
|
|
9
|
+
## MANDATORY AGENT PROTOCOL
|
|
10
|
+
|
|
11
|
+
Before writing any implementation code, you must complete these steps in order:
|
|
12
|
+
|
|
13
|
+
1. Analyze the image and identify all visible regions and UI patterns.
|
|
14
|
+
2. Read [references/component-mapping.md](references/component-mapping.md).
|
|
15
|
+
3. This skill is Blazor-only. Check NuGet package (`IgniteUI.Blazor.Lite`, `IgniteUI.Blazor.GridLite` for general purpose components and light-weight grid, or `IgniteUI.Blazor` / `IgniteUI.Blazor.Trial` for specialized feature-rich grids and charts) only when theming or component availability depends on it.
|
|
16
|
+
4. To apply a theme, use the theming workflow from this skill and the dedicated `igniteui-blazor-theming` skill; use the `igniteui-theming` MCP tools instead of styling from memory.
|
|
17
|
+
5. Call `get_doc` for every chosen component family before using it.
|
|
18
|
+
6. **Read [references/gotchas.md](references/gotchas.md) now — after docs, before writing any code.** Read the file in full. Some entries are component-specific; others apply broadly to any chart, any themed component, or any scoped CSS. Apply every entry that is relevant to what you are building. This is a blocking step: do not start implementation until you have read the whole file and checked it against your component list.
|
|
19
|
+
7. Only then start coding.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
1. **Analyze the design image** - Read the image, identify every UI section, component, layout structure.
|
|
26
|
+
2. **Confirm NuGet package if needed** - this skill is Blazor-only; use `IgniteUI.Blazor.Lite`, `IgniteUI.Blazor.GridLite` for general purpose components and the light-weight grid, and `IgniteUI.Blazor` (trial version available publicly as `IgniteUI.Blazor.Trial`) for specialized feature-rich grids and charts.
|
|
27
|
+
3. **Discover components** - Call `list_components` with targeted filters and `framework: "blazor"` to find matching components for each UI pattern.
|
|
28
|
+
4. **Look up component docs** - Call `get_doc` for every chosen component family before coding.
|
|
29
|
+
5. **Generate theme** - (a) Extract colors and call `create_palette` or `create_custom_palette` with `platform: "blazor"` and `output: "css"` — do **not** use `create_theme` for Blazor, it produces Sass requiring compilation. Optionally call `create_elevations` and `create_typography` for elevation and font overrides. (b) After a palette exists, prefer using design tokens or scoped semantic CSS variables over raw literals. (c) For every Ignite UI component, call `get_component_design_tokens`, map extracted image tokens to token roles, then call `create_component_theme` with the tokens differing from the global theme for the specific component.
|
|
30
|
+
6. **Implement** - Build the screenshot-first layout, data, and view components.
|
|
31
|
+
7. **Refine** - Use the `set_size`, `set_spacing`, `set_roundness` tools to refine the view's visual fidelity against the image, then iterate on implementation and theming until the view matches the design closely.
|
|
32
|
+
8. **Validate** - Build, test, run, compare against the image, and fix differences.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step 1: Analyze the Design Image
|
|
37
|
+
|
|
38
|
+
Read the input image carefully. For each visual section, identify:
|
|
39
|
+
|
|
40
|
+
- **Layout structure**: grid rows/columns, sidebar, navbar, content area proportions, and estimated fixed widths or percentages for major regions.
|
|
41
|
+
> Note: Do not guess the exact CSS properties at this stage; just identify the high-level structure and relative proportions. Do not try to fit the view into exact breakpoints or pixel values. Try to generate a flexible layout that preserves the observed proportions and can adapt to different screen sizes. You will refine the exact CSS rules in Step 8 after building a first version of the view.
|
|
42
|
+
- **Component type**: chart, list, card, map, gauge, table, form, etc.
|
|
43
|
+
- **Color palette**: primary, secondary, surface/background, accent, text colors
|
|
44
|
+
- **Typography**: font sizes, weights, letter-spacing patterns
|
|
45
|
+
- **Surface styling**: borders, border-radius, shadows, elevation, divider treatments
|
|
46
|
+
- **Data patterns**: what mock data is needed (time series, lists, KPIs, geographic)
|
|
47
|
+
- **Spacing system**: translate observed padding and gaps into a small reusable scale derived from the design
|
|
48
|
+
|
|
49
|
+
Before writing code, create a decomposition table with one row per visible region containing:
|
|
50
|
+
|
|
51
|
+
| Region | Visual role | Candidate component | Custom CSS required | Data type |
|
|
52
|
+
|---|---|---|---|---|
|
|
53
|
+
| Example: sidebar item list | repeated rows with icon + label | `IgbList` | yes - item height, icon size | domain-appropriate mock data |
|
|
54
|
+
| Example: top bar | brand + tabs + search | `IgbNavbar` | yes - multi-zone flex layout | n/a |
|
|
55
|
+
| Example: side panel | always-visible navigation | `IgbNavDrawer` | yes - width, item styling | n/a |
|
|
56
|
+
|
|
57
|
+
Start every region with the most appropriate Ignite UI Blazor component from [references/component-mapping.md](references/component-mapping.md). Only fall back to plain semantic HTML when the component DOM structure is fundamentally incompatible with the design after CSS overrides are considered. Document the reason for any plain-HTML fallback in a code comment.
|
|
58
|
+
|
|
59
|
+
Before writing code, produce a compact implementation brief that captures:
|
|
60
|
+
|
|
61
|
+
- chosen components per region
|
|
62
|
+
- fallback HTML regions
|
|
63
|
+
- theme strategy
|
|
64
|
+
- package needs
|
|
65
|
+
- major assumptions
|
|
66
|
+
|
|
67
|
+
After the table, translate the image into CSS Grid rows and columns first. Preserve desktop proportions before adding responsive behavior, then define explicit breakpoint stacking rules for smaller screens.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step 2-3: Use MCP Tools for Discovery
|
|
72
|
+
|
|
73
|
+
This skill is Blazor-only. Check NuGet package only when component availability or theming depends on it.
|
|
74
|
+
|
|
75
|
+
If you need to confirm the NuGet package:
|
|
76
|
+
|
|
77
|
+
- If the project uses `IgniteUI.Blazor.Lite` (open-source), premium components such as charts, maps, gauges, full grids, and Dock Manager are not available.
|
|
78
|
+
- If the project uses `IgniteUI.Blazor.GridLite` (open-source), use `IgbGridLite` only for lightweight Grid Lite scenarios.
|
|
79
|
+
- If the project uses licensed `IgniteUI.Blazor`, the full component suite is available.
|
|
80
|
+
- If the project uses trial `IgniteUI.Blazor.Trial`, the trial, publicly available on NuGet.org.
|
|
81
|
+
|
|
82
|
+
Then call `list_components` with `framework: "blazor"` and relevant filters to find components matching each UI pattern. Common filters:
|
|
83
|
+
|
|
84
|
+
- `chart`, `sparkline` - for data visualization
|
|
85
|
+
- `list view`, `card`, `avatar`, `badge` - for data display
|
|
86
|
+
- `nav`, `navbar`, `drawer` - for navigation
|
|
87
|
+
- `progress`, `gauge` - for metrics
|
|
88
|
+
- `map` - for geographic displays
|
|
89
|
+
- `grid` - for tabular data
|
|
90
|
+
|
|
91
|
+
Use narrow search terms to reduce noisy MCP results. Search for the specific UI pattern you need, such as `list view` instead of `list`.
|
|
92
|
+
|
|
93
|
+
For component-to-Ignite-UI mapping, see [references/component-mapping.md](references/component-mapping.md).
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Step 4: Look Up Component API
|
|
98
|
+
|
|
99
|
+
For every chosen component category, call `get_doc` with the doc name from `list_components` results (e.g., `name: "card"`, `framework: "blazor"`). Use the doc `name` field from the MCP results, not the result title shown in the list. This is mandatory before coding and gives exact usage patterns, parameters, and Razor markup structure.
|
|
100
|
+
|
|
101
|
+
Call `search_docs` for feature-based questions (e.g., "how to configure [component] for [specific behavior or styling need]").
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Step 5: Generate Theme with MCP
|
|
106
|
+
|
|
107
|
+
Use this skill for the image-to-view theming workflow only. The dedicated [`igniteui-blazor-theming`](../igniteui-blazor-theming/SKILL.md) skill remains the source of truth for palette-token behavior, global theme rules, and broader theming-system guidance.
|
|
108
|
+
|
|
109
|
+
### 5a - Existing app guard (always run first)
|
|
110
|
+
|
|
111
|
+
Before generating any theme code, inspect the project's host page (`wwwroot/index.html`, `App.razor`, or `_Host.cshtml`), global CSS files (`wwwroot/css/app.css` or `wwwroot/css/site.css`), and any existing theme source or compiled theme files (`theme.scss`, `theme.css`, package scripts, or build pipeline references). Look for an existing CSS theme `<link>`, compiled custom theme, or `:root` CSS custom property overrides that already define a palette.
|
|
112
|
+
|
|
113
|
+
- **Existing theme found** -> the global palette is already set. Do **not** call `create_theme` or `create_palette` unless the user explicitly wants a global theme change. Instead:
|
|
114
|
+
1. Inspect the existing theme definition and any exposed palette tokens or semantic CSS variables
|
|
115
|
+
2. Reuse the current design system, variant, and palette tokens wherever they already match the design image
|
|
116
|
+
3. Skip to **5c** and apply only minimal scoped overrides for the new view's components
|
|
117
|
+
- **No theme found / default palette** -> proceed with **5b** to generate a fresh global theme.
|
|
118
|
+
|
|
119
|
+
### 5b - Global theme generation (new projects only)
|
|
120
|
+
|
|
121
|
+
Follow this order - MCP guidance first, image extraction second:
|
|
122
|
+
|
|
123
|
+
1. **Read MCP guidance first** - call `theming://guidance/colors/rules` (or `get_theming_guidance`) before looking at the image. This tells you the available theme inputs and any luminance or variant constraints.
|
|
124
|
+
2. **Resolve the design system** - infer it from the existing workspace, explicit user request, or the closest visual match in the design. Do not assume one if a stronger signal exists.
|
|
125
|
+
3. **Extract from the image** - now that you know the available slots, extract values only for the inputs you actually need.
|
|
126
|
+
4. **Call `create_palette`** with the extracted seed values (for Blazor, use `create_palette` with `output: "css"` - NOT `create_theme`, which always outputs Sass requiring compilation):
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
create_palette({
|
|
130
|
+
primary: "<color extracted from image for primary slot>",
|
|
131
|
+
secondary: "<color extracted from image for secondary slot>",
|
|
132
|
+
surface: "<color extracted from image for surface/background slot>",
|
|
133
|
+
variant: "<resolved theme variant>",
|
|
134
|
+
platform: "blazor",
|
|
135
|
+
output: "css"
|
|
136
|
+
})
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Read and act on any luminance warnings returned. If the design needs multiple surface depths that a single generated surface color does not cover, use `create_custom_palette` or define semantic CSS variables for the additional depths in the global CSS file.
|
|
140
|
+
|
|
141
|
+
Use `create_palette` for straightforward designs with a small, coherent color system. Use `create_custom_palette` when the design has multiple distinct surface depths, several accent families, or when the generated palette cannot reliably match the screenshot.
|
|
142
|
+
|
|
143
|
+
The `create_palette(output: "css")` output for Blazor produces CSS custom property overrides. Apply them in your global CSS file (e.g., `wwwroot/css/app.css`) or as a `:root` block.
|
|
144
|
+
|
|
145
|
+
### 5c - Per-component token discovery and mapping (always run)
|
|
146
|
+
|
|
147
|
+
> **Scope:** this step applies only to **core Ignite UI Blazor components** (grid, list, navbar, drawer, card, inputs, chips, etc.). DV components - charts, maps, gauges, and sparklines - have no CSS design tokens. Skip this step for them and set their visual properties exclusively via component parameters as described in [references/gotchas.md](references/gotchas.md) and in Step 7.
|
|
148
|
+
|
|
149
|
+
For **every** core Ignite UI component chosen in Steps 3-4, follow this MCP-first loop - query MCP before touching the image:
|
|
150
|
+
|
|
151
|
+
1. **Discover (MCP first)** - call `get_component_design_tokens(component)` before looking at the image for that component. Read the full token list with names, types, and descriptions. Identify which tokens correspond to visible surfaces, text, borders, icons, and interaction states.
|
|
152
|
+
2. **Extract (image second)** - now that you know the exact token names, go to the image region for that component and read the exact token value for each relevant token slot. Do not guess; zoom into the component region.
|
|
153
|
+
3. **Generate** - call `create_component_theme(component, platform: "blazor", output: "css", tokens)` passing only the tokens whose resolved value differs from the global theme. This produces a CSS block with `igc-<tag> { --ig-<component>-<token>: ...; }` selectors.
|
|
154
|
+
|
|
155
|
+
**Where to place the generated CSS:**
|
|
156
|
+
|
|
157
|
+
- **Global CSS file** (`wwwroot/css/app.css` or equivalent) - use the generated code **as-is**. No modification needed.
|
|
158
|
+
- **`.razor.css` isolation file** - prefix every `igc-<tag>` selector with `::deep` so Blazor's CSS scoping does not block it:
|
|
159
|
+
|
|
160
|
+
```css
|
|
161
|
+
/* MCP output (goes in global app.css as-is) */
|
|
162
|
+
igc-chip {
|
|
163
|
+
--ig-chip-background: var(--ig-primary-500);
|
|
164
|
+
--ig-chip-text-color: var(--ig-primary-500-contrast);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Same override in a .razor.css isolation file - add ::deep */
|
|
168
|
+
::deep igc-chip {
|
|
169
|
+
--ig-chip-background: var(--ig-primary-500);
|
|
170
|
+
--ig-chip-text-color: var(--ig-primary-500-contrast);
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Use `::part()` (e.g., `igc-chip::part(base)`) **only** when a style cannot be achieved through design tokens - verify via `get_component_design_tokens` first. In isolation files, combine: `::deep igc-chip::part(base) { ... }`. Do **not** use `::part()` as the default styling approach for tokens.
|
|
175
|
+
|
|
176
|
+
Do not run `create_component_theme` for regions built with custom HTML/CSS only.
|
|
177
|
+
|
|
178
|
+
### 5d - Theming sequence summary
|
|
179
|
+
|
|
180
|
+
Apply in this exact order:
|
|
181
|
+
|
|
182
|
+
1. Inspect host page and global CSS -> existing theme or blank?
|
|
183
|
+
2. Create or update a palette: `create_palette` with `platform: "blazor"` and `output: "css"` (Step 5b)
|
|
184
|
+
3. For each Ignite UI component: `get_component_design_tokens` -> map image design tokens -> resolve values to design tokens or semantic CSS variables -> `create_component_theme` with `platform: "blazor"` (Step 5c)
|
|
185
|
+
4. Use `get_color` after palette generation whenever a palette token can represent the final color intent
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Step 6: Confirm Package Coverage
|
|
190
|
+
|
|
191
|
+
Use `IgniteUI.Blazor.Lite` and `IgniteUI.Blazor.GridLite` for general purpose components and the light-weight grid. For specialized feature-rich grids, charts, maps, gauges, sparklines, and Dock Manager, use `IgniteUI.Blazor` (licensed) or `IgniteUI.Blazor.Trial` (trial version available publicly on NuGet.org). There are no separate DV-specific packages to install.
|
|
192
|
+
|
|
193
|
+
However, each DV component requires **module registration** in `Program.cs`:
|
|
194
|
+
|
|
195
|
+
```csharp
|
|
196
|
+
builder.Services.AddIgniteUIBlazor(
|
|
197
|
+
typeof(IgbCategoryChartModule),
|
|
198
|
+
typeof(IgbFinancialChartModule),
|
|
199
|
+
typeof(IgbDataChartModule),
|
|
200
|
+
typeof(IgbPieChartModule),
|
|
201
|
+
typeof(IgbSparklineModule),
|
|
202
|
+
typeof(IgbGeographicMapModule),
|
|
203
|
+
typeof(IgbLinearGaugeModule),
|
|
204
|
+
typeof(IgbRadialGaugeModule),
|
|
205
|
+
typeof(IgbBulletGraphModule)
|
|
206
|
+
// Register only the modules you actually use
|
|
207
|
+
);
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
If the required NuGet package is not referenced in the project, identify the correct package and version first, then ask for approval before modifying the `.csproj`.
|
|
211
|
+
|
|
212
|
+
> **Note:** `IgniteUI.Blazor.Lite` (open-source) does **not** include charts, maps, gauges, full grids, or Dock Manager. If those are needed, the project requires `IgniteUI.Blazor` (licensed) or `IgniteUI.Blazor.Trial` (evaluation with trial watermark). For a lightweight open-source grid, use `IgniteUI.Blazor.GridLite` with `IgbGridLite`.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Step 7: Implement
|
|
217
|
+
|
|
218
|
+
### Structure
|
|
219
|
+
|
|
220
|
+
- **Layout**: use Ignite UI Blazor layout and data-display components as the starting point for standard regions, then apply CSS Grid/Flexbox and component overrides to match the screenshot. Only substitute plain semantic HTML when an Ignite UI component remains structurally incompatible after a genuine attempt.
|
|
221
|
+
- **Data**: use typed C# mock data (records or classes) that matches the design's density and domain; add models/services only when they help the implementation.
|
|
222
|
+
- **View**: create a `.razor` file with Razor markup and a matching `.razor.css` file for CSS isolation. Keep layout, spacing, typography, and surface styling in the CSS isolation file rather than inline attributes.
|
|
223
|
+
- **Code**: use an `@code { }` block at the end of the `.razor` file for small components. For complex components, use a code-behind `.razor.cs` file.
|
|
224
|
+
- **Theming**: apply the resolved design system and theme variant from Step 5, and keep color usage aligned with CSS custom property palette tokens or local semantic CSS variables.
|
|
225
|
+
|
|
226
|
+
### Blazor Conventions
|
|
227
|
+
|
|
228
|
+
- Register every `Igb*` component's module in `Program.cs`: `builder.Services.AddIgniteUIBlazor(typeof(IgbXxxModule), ...);`
|
|
229
|
+
- Add `@using IgniteUI.Blazor.Controls` in `_Imports.razor`
|
|
230
|
+
- Use `[Parameter]` for public component parameters
|
|
231
|
+
- Use `EventCallback<T>` for event handlers
|
|
232
|
+
- Use `@ref="myRef"` with a matching field for programmatic access
|
|
233
|
+
- Use `@bind-Value`, `@bind-Checked`, and other documented bindable parameters for two-way binding
|
|
234
|
+
- Use `<Template>` child elements with `context` parameter for templating (not `<ng-template>`)
|
|
235
|
+
- Use `@inject` for dependency injection
|
|
236
|
+
|
|
237
|
+
### Implementation Checks
|
|
238
|
+
|
|
239
|
+
- Use [references/component-mapping.md](references/component-mapping.md) for component-choice and semantic-fallback rules
|
|
240
|
+
- When unsure about an API parameter, CSS scoping rule, or component choice, re-check [references/gotchas.md](references/gotchas.md) — do not guess or re-encode its rules inline
|
|
241
|
+
- Favor Ignite UI components over custom HTML when both approaches can reach similar visual fidelity
|
|
242
|
+
- Preserve spacing, hierarchy, and data density before adding extra interactivity
|
|
243
|
+
- Avoid generic placeholders when the image shows domain-specific content
|
|
244
|
+
- Document brief assumptions when the image is ambiguous instead of silently guessing
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Step 8: Refine
|
|
249
|
+
|
|
250
|
+
After the first implementation pass, use the `set_size`, `set_spacing`, and `set_roundness` tools to adjust the view's visual properties and close the gap with the image. Focus on the most visually distinctive elements first (e.g., panel proportions, chart shape, button prominence) before tuning smaller details (e.g., row heights, spacing between regions).
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Step 9: Validate
|
|
255
|
+
|
|
256
|
+
Use this validation loop explicitly:
|
|
257
|
+
|
|
258
|
+
1. Build (`dotnet build`)
|
|
259
|
+
2. Test
|
|
260
|
+
3. Run the app (`dotnet run` or `dotnet watch`)
|
|
261
|
+
4. Visually compare against the image
|
|
262
|
+
5. Adjust and repeat
|
|
263
|
+
|
|
264
|
+
In terminal-only environments, the user performs the visual comparison and provides feedback on any mismatches. Only perform the visual check directly when the environment has browser and screenshot capabilities available to the agent.
|
|
265
|
+
|
|
266
|
+
Use this checklist during the first visual comparison:
|
|
267
|
+
|
|
268
|
+
- panel proportions
|
|
269
|
+
- control density
|
|
270
|
+
- chart shape
|
|
271
|
+
- legend placement
|
|
272
|
+
- button prominence
|
|
273
|
+
- row heights
|
|
274
|
+
- spacing between regions
|
|
275
|
+
|
|
276
|
+
Fix C# compilation or Razor template errors immediately during the build step. Use the build output, component docs, [references/gotchas.md](references/gotchas.md), and the user's visual feedback to close the remaining gaps. Typical adjustments include:
|
|
277
|
+
|
|
278
|
+
- revisiting chart data density, smoothing, or marker visibility
|
|
279
|
+
- adjusting layout ratios, region spacing, or row heights
|
|
280
|
+
- correcting navigation mode, panel chrome, or component choice
|
|
281
|
+
- tuning map/filter treatment and dark-surface hierarchy
|
|
282
|
+
- re-examining the original design for overlooked sections or missing module registrations
|
|
283
|
+
|
|
284
|
+
After the build succeeds with zero errors, refine layout proportions, color values, missing sections, and typography until the view matches closely.
|