igniteui-cli 15.5.1 → 15.6.1
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/AGENTS.md +6 -3
- package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +8 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +42 -6
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
- package/templates/react/igr-ts/avatar/default/files/src/app/__path__/__filePrefix__.tsx +3 -3
- package/templates/react/igr-ts/avatar/default/files/src/app/__path__/style.module.css +9 -0
- package/templates/react/igr-ts/button/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
- package/templates/react/igr-ts/button/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/icon/default/files/src/app/__path__/__filePrefix__.tsx +2 -2
- package/templates/react/igr-ts/icon/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/icon-button/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
- package/templates/react/igr-ts/icon-button/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.tsx +3 -4
- package/templates/react/igr-ts/projects/_base/files/package.json +1 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
- package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
- package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/__filePrefix__.ts +7 -2
- package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/__filePrefix__.ts +8 -3
- package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/__filePrefix__.ts +3 -1
- package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
- package/templates/webcomponents/igc-ts/constants.js +5 -5
- package/templates/webcomponents/igc-ts/date-time-input/default/files/src/app/__path__/__filePrefix__.ts +8 -2
- package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/__filePrefix__.ts +7 -3
- package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/__filePrefix__.ts +8 -2
- package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/README.md +1 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/login-bar/login-bar.ts +1 -1
- package/templates/webcomponents/igc-ts/tabs/default/files/src/app/__path__/__filePrefix__.ts +21 -15
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
- /package/templates/webcomponents/igc-ts/tabs/default/files/src/app/__path__/{__filePrefix__.test → __filePrefix__.test.ts} +0 -0
|
@@ -1,284 +1,99 @@
|
|
|
1
1
|
---
|
|
2
|
+
license: MIT
|
|
2
3
|
name: igniteui-blazor-generate-from-image-design
|
|
3
|
-
description: Implement Blazor
|
|
4
|
+
description: "Implement a Blazor view from a design image, screenshot, mockup, or wireframe using Ignite UI for Blazor components — analyze the image, map regions to components, generate a matching theme, build the view with mock data, and refine until it matches. Triggers when a design image is provided along with a request to implement this design, build this UI, convert this mockup, or create a page from this image in an Ignite UI Blazor project."
|
|
4
5
|
user-invocable: true
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
#
|
|
8
|
+
# Building an Ignite UI Blazor View from a Design Image
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
+
## Order of work
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
Do not start writing markup until steps 1–4 are done. The two reference files are short and the failure mode they prevent — a view that compiles but looks wrong and uses APIs that do not exist — costs far more than reading them.
|
|
12
13
|
|
|
13
|
-
1. Analyze the image
|
|
14
|
-
2. Read [references/component-mapping.md](references/component-mapping.md).
|
|
15
|
-
3.
|
|
16
|
-
4.
|
|
17
|
-
5.
|
|
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.
|
|
14
|
+
1. **Analyze the image** into regions (below).
|
|
15
|
+
2. **Read [`references/component-mapping.md`](references/component-mapping.md)** and pick a component per region.
|
|
16
|
+
3. **Look up each chosen component** — `get_doc(framework: "blazor", name: "<doc name>")` if the `igniteui-cli` MCP server is available, otherwise the [`igniteui-blazor-components`](../igniteui-blazor-components/SKILL.md) and [`igniteui-blazor-grids`](../igniteui-blazor-grids/SKILL.md) reference files. Use the doc `name` from `list_components` results, not the display title.
|
|
17
|
+
4. **Read [`references/gotchas.md`](references/gotchas.md) in full** and check every entry against your component list. Chart, CSS-scoping, and Razor-syntax entries apply broadly, not only to the components they name.
|
|
18
|
+
5. **Theme**, **implement**, **refine**, **validate** — steps 3–6 below.
|
|
20
19
|
|
|
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
|
|
20
|
+
Everything works without the MCP servers; you lose per-component doc verification and generated palette/token CSS, so lean on the skills' reference files and say what you could not verify.
|
|
37
21
|
|
|
38
|
-
|
|
22
|
+
## Step 1 — Analyze the image
|
|
39
23
|
|
|
40
|
-
|
|
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
|
|
24
|
+
Produce a decomposition table before writing anything:
|
|
48
25
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| Region | Visual role | Candidate component | Custom CSS required | Data type |
|
|
26
|
+
| Region | Visual role | Candidate component | Custom CSS needed | Data |
|
|
52
27
|
|---|---|---|---|---|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
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
|
|
28
|
+
| sidebar item list | icon + label rows | `IgbNavDrawer` (Position=Relative) | yes — width, item height | nav model |
|
|
29
|
+
| top bar | brand + tabs + search | `IgbNavbar` | yes — multi-zone flex | n/a |
|
|
30
|
+
| KPI row | four stat tiles | plain HTML in CSS Grid | yes | domain records |
|
|
106
31
|
|
|
107
|
-
|
|
32
|
+
For each region record: layout structure and relative proportions, component type, colors (primary, secondary, surface, accent, text), typography, surface treatment (border, radius, shadow, dividers), spacing scale, and what mock data it needs.
|
|
108
33
|
|
|
109
|
-
|
|
34
|
+
Then translate the whole image into CSS Grid rows and columns. Get desktop proportions right first, add breakpoint stacking after. Do not chase exact pixel values at this stage — you will tune them in step 5.
|
|
110
35
|
|
|
111
|
-
|
|
36
|
+
Start every region with the most appropriate Ignite UI component. Fall back to plain semantic HTML only when the component's DOM structure genuinely cannot reach the design after CSS overrides, and note why in a comment. Finish with a short brief: chosen components, HTML fallbacks, theme strategy, package needs, assumptions.
|
|
112
37
|
|
|
113
|
-
|
|
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.
|
|
38
|
+
## Step 2 — Package check
|
|
118
39
|
|
|
119
|
-
|
|
40
|
+
| Need | Package |
|
|
41
|
+
|---|---|
|
|
42
|
+
| Core UI: navbar, drawer, list, card, inputs, chips, tabs, tile manager | `IgniteUI.Blazor.Lite` |
|
|
43
|
+
| Lightweight read-only grid | `IgniteUI.Blazor.GridLite` |
|
|
44
|
+
| Charts, maps, gauges, sparklines, full grids, Dock Manager | `IgniteUI.Blazor` (licensed) or `IgniteUI.Blazor.Trial` |
|
|
120
45
|
|
|
121
|
-
|
|
46
|
+
There are no separate DV packages. If a required package is missing from the project, identify the right package and version and **ask before editing the `.csproj`**.
|
|
122
47
|
|
|
123
|
-
|
|
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):
|
|
48
|
+
Register every `Igb*Module` you use in `Program.cs`, add `@using IgniteUI.Blazor.Controls` to `_Imports.razor`, and confirm the theme stylesheet and `app.bundle.js` are in the host page — see the components skill's [`setup.md`](../igniteui-blazor-components/references/setup.md).
|
|
127
49
|
|
|
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:
|
|
50
|
+
## Step 3 — Theme
|
|
150
51
|
|
|
151
|
-
|
|
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.
|
|
52
|
+
The [`igniteui-blazor-theming`](../igniteui-blazor-theming/SKILL.md) skill owns theming rules. What is specific to working from an image:
|
|
154
53
|
|
|
155
|
-
**
|
|
54
|
+
**Guard first.** Inspect the host page, `wwwroot/css/app.css` / `site.css`, and any existing theme file for a theme `<link>` or `:root` palette overrides.
|
|
156
55
|
|
|
157
|
-
- **
|
|
158
|
-
-
|
|
56
|
+
- **A theme already exists** → the global palette is set. Do not call `create_palette` unless the user explicitly wants to change it globally. Reuse the existing design system, variant, and tokens where they already match the image, and add only scoped per-component overrides.
|
|
57
|
+
- **No theme** → generate one.
|
|
159
58
|
|
|
160
|
-
|
|
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
|
-
}
|
|
59
|
+
**Generating one — MCP guidance before image extraction.** Read `theming://guidance/colors/rules` first so you know which slots exist and what the luminance constraints are; only then pull values out of the image for the slots that actually exist. Resolve the design system from the workspace, an explicit request, or the closest visual match — do not assume.
|
|
166
60
|
|
|
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
61
|
```
|
|
173
|
-
|
|
174
|
-
|
|
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
|
-
);
|
|
62
|
+
create_palette(platform: "blazor", output: "css",
|
|
63
|
+
primary: "<from image>", secondary: "<from image>",
|
|
64
|
+
surface: "<from image>", variant: "<light|dark>")
|
|
208
65
|
```
|
|
209
66
|
|
|
210
|
-
|
|
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.
|
|
67
|
+
Use `create_palette` for a coherent small color system; `create_custom_palette` when the design has several surface depths or accent families. Act on luminance warnings. For extra surface depths a single generated surface cannot cover, define semantic variables (`--surface-1`, `--surface-2`) in global CSS.
|
|
225
68
|
|
|
226
|
-
|
|
69
|
+
**Per component, MCP before image again.** For every **core** component: call `get_component_design_tokens(component)`, read the token list, *then* zoom into that region of the image and read the value for each relevant token, then `create_component_theme(component, platform: "blazor", output: "css", tokens: …)` passing only tokens that differ from the global theme.
|
|
227
70
|
|
|
228
|
-
|
|
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
|
|
71
|
+
Query the exact variant (`contained-button`, not `button`). Skip this loop entirely for charts, maps, gauges, and sparklines — they have no design tokens; style them through component parameters. Skip it for regions built from plain HTML.
|
|
236
72
|
|
|
237
|
-
|
|
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
|
-
---
|
|
73
|
+
Place the generated CSS in the global stylesheet as-is, or add `::deep` to each `igc-*` selector in a `.razor.css` file.
|
|
253
74
|
|
|
254
|
-
## Step
|
|
75
|
+
## Step 4 — Implement
|
|
255
76
|
|
|
256
|
-
|
|
77
|
+
- **Layout:** Ignite UI components for standard regions, CSS Grid/Flexbox and token overrides for the rest.
|
|
78
|
+
- **View:** a `.razor` file plus a matching `.razor.css`. Keep layout, spacing, typography, and surface styling in the isolation file, not in `style=""` attributes.
|
|
79
|
+
- **Code:** `@code { }` at the end for small components; a `.razor.cs` code-behind for complex ones.
|
|
80
|
+
- **Data:** typed C# `record`s or classes matching the density and domain the image shows. Avoid `Item 1`, `Lorem ipsum` placeholders when the image shows real domain content.
|
|
81
|
+
- **Bindings:** `[Parameter]`, `EventCallback<T>`, `@ref`, `@bind-Value` / `@bind-Checked`, `@inject`. Templates are `<Template>`-style render fragments with a `context` parameter — never Angular's `<ng-template>`.
|
|
257
82
|
|
|
258
|
-
|
|
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
|
|
83
|
+
Preserve spacing, hierarchy, and data density before adding interactivity. Document assumptions where the image is ambiguous rather than silently guessing.
|
|
263
84
|
|
|
264
|
-
|
|
85
|
+
## Step 5 — Refine
|
|
265
86
|
|
|
266
|
-
|
|
87
|
+
Close the gap with the image using `set_size`, `set_spacing`, and `set_roundness`, plus layout CSS. Work biggest-first: panel proportions, chart shape and curve type, control density, legend placement, button prominence — then row heights and inter-region spacing.
|
|
267
88
|
|
|
268
|
-
|
|
269
|
-
- control density
|
|
270
|
-
- chart shape
|
|
271
|
-
- legend placement
|
|
272
|
-
- button prominence
|
|
273
|
-
- row heights
|
|
274
|
-
- spacing between regions
|
|
89
|
+
## Step 6 — Validate
|
|
275
90
|
|
|
276
|
-
|
|
91
|
+
1. `dotnet build` — fix every C# and Razor error before moving on.
|
|
92
|
+
2. Run tests if the project has them.
|
|
93
|
+
3. `dotnet run` / `dotnet watch`.
|
|
94
|
+
4. Compare against the image: panel proportions, control density, chart shape, legend placement, button prominence, row heights, region spacing.
|
|
95
|
+
5. Adjust and repeat.
|
|
277
96
|
|
|
278
|
-
-
|
|
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
|
|
97
|
+
In a terminal-only environment the user does the visual comparison — ask for feedback rather than declaring a match. Only check visually yourself when browser and screenshot tools are available.
|
|
283
98
|
|
|
284
|
-
|
|
99
|
+
Typical second-pass fixes: chart curve type and data density, marker visibility, layout ratios, navigation mode or panel chrome, map filter treatment, dark-surface hierarchy, and sections of the image overlooked on the first read.
|