skills/igniteui-wc-generate-from-image-design/SKILL.md
Implement application views from design images using Ignite UI Web 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 view with Ignite UI Web 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 Web Components project.
npx skillsauth add igniteui/igniteui-webcomponents igniteui-wc-generate-from-image-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before writing any implementation code, you must complete these steps in order:
igniteui-wc-customize-component-theme skill; use the igniteui-theming MCP tools instead of styling from memory.get_doc for every chosen component family before using it.list_components with targeted filters to find matching components for each UI pattern.get_doc for every chosen component family before coding.create_palette or create_custom_palette depending on the scenario. Then extract elevations and call create_elevations. Then extract typography and call create_typography. Then call create_theme when Sass is configured, or import the closest pre-built theme CSS. (b) After a theme exists, prefer using design tokens or scoped semantic CSS variables over raw literals. (c) For every Ignite UI component family that exposes design tokens, 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.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.Read the input image carefully. For each visual section, identify:
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.
Before writing code, create a decomposition table with one row per visible region containing:
| Region | Visual role | Candidate component | Custom CSS required | Data type |
|---|---|---|---|---|
| Example: sidebar item list | repeated rows with icon + label | IgcListComponent + IgcListItemComponent | yes - item height, icon size | domain-appropriate mock data |
| Example: top bar | brand + tabs + search | IgcNavbarComponent | yes - multi-zone slot layout | n/a |
| Example: side panel | always-visible navigation | IgcNavDrawerComponent | yes - width, item styling | n/a |
Start every region with the most appropriate Ignite UI component from 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, tokens, slots, and documented ::part(...) selectors are considered. Document the reason for any plain-HTML fallback in a code comment.
Before writing code, produce a compact implementation brief that captures:
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.
This skill is Web Components-first. Check package layout or licensing only when package choice, component registration, or theming depend on it.
Then call list_components with framework: "webcomponents" and relevant filters to find components matching each UI pattern. Common filters:
chart, sparkline - for data visualizationlist view, card, avatar, badge - for data displaynav, navbar, drawer, dock manager - for navigation and shell layoutsprogress - for metricsgrid lite, data grid, tree grid - for tabular datacalendar, date picker, combo, select, input - for forms and schedulingUse narrow search terms to reduce noisy MCP results. Search for the specific UI pattern you need, such as list view instead of list.
For component-to-Ignite-UI mapping, see references/component-mapping.md.
For every chosen component category, call get_doc with the doc name from list_components results (e.g., name: "card", framework: "webcomponents"). 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, slots, events, registration, and API structure.
Call search_docs for feature-based questions (e.g., "how to configure [component] for [specific behavior or styling need]").
Use this skill for the image-to-view theming workflow only. The dedicated igniteui-wc-customize-component-theme skill remains the source of truth for palette-token behavior, global theme rules, and broader theming-system guidance.
Before generating any theme code, inspect the project's entry point and main stylesheet(s) (commonly main.ts, main.js, index.ts, app.ts, styles.css, or the app's main theme stylesheet). Look for:
an imported pre-built theme CSS file such as igniteui-webcomponents/themes/light/material.css
existing palette tokens or semantic CSS variables already exposed by the app
existing app-level typography or elevation variables already exposed by the app
Existing theme found -> the global theme is already set. Do not call create_palette unless the user explicitly wants a global theme change. Instead:
No theme found / blank theme setup -> proceed with 5b to generate a fresh CSS-based theme baseline.
Follow this order - MCP guidance first, image extraction second:
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.create_palette or create_custom_palette with the extracted seed values:create_palette({
primary: "<color extracted from image for primary slot>",
secondary: "<color extracted from image for secondary slot>",
surface: "<color extracted from image for surface/background slot>",
variant: "<resolved theme variant>",
platform: "webcomponents"
})
Import the closest built-in theme CSS for the resolved design system and variant, then use get_color to translate the generated palette into CSS custom properties, semantic app tokens, and component token values. Apply typography decisions with standard CSS font-family, font-size, and font-weight rules, and apply elevations with CSS box-shadow values or semantic shadow variables.
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 main stylesheet.
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.
Scope: this step applies to every Ignite UI Web Components family that exposes design tokens. Core components - cards, inputs, select, combo, navbar, nav drawer, list, tabs, date pickers, chips, etc. - are the primary targets. For packages or components that do not expose a practical token surface in the current project, fall back to documented properties,
::part(...)selectors, or wrapper styles instead of inventing unsupported tokens.
For every chosen Ignite UI component family in Steps 3-4, follow this MCP-first loop - query MCP before touching the image:
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.create_component_theme(component, platform, licensed, tokens) passing only the tokens whose resolved value differs from the global theme. This produces the minimal scoped theme override set for the component.Example - theming a grid:
get_component_design_tokens("grid") returns header-background, content-background, row-hover-background among many others.create_component_theme("grid", ...) with only { "header-background": "<resolved token>", "content-background": "<resolved token>", "row-hover-background": "<resolved token>" }.Apply the generated theme blocks to the component selector or a scoped wrapper exactly as shown in the create_component_theme output.
Do not run create_component_theme for regions built with custom HTML/CSS only.
Apply in this exact order:
get_component_design_tokens -> map image design tokens -> resolve values to design tokens or semantic CSS variables -> create_component_theme (Step 5c)get_color after palette generation whenever a palette token can represent the final color intentUse standard CSS font-family lists in stylesheets or CSS variables for typography. Do not emit Sass typography mixins for Ignite UI Web Components apps.
General UI components ship with igniteui-webcomponents. Lightweight tabular data can use igniteui-grid-lite. Advanced grids, dock manager, and charts require additional packages and may vary by trial versus licensed package layout. Resolve the selected component families against the current workspace and references/component-mapping.md.
After selecting packages, register only the custom elements you actually use with defineComponents(...) in the appropriate entry point or setup module, unless the host framework integration already handles registration differently. Use igniteui-wc-integrate-with-framework when framework-specific setup details matter.
If required packages are missing, identify the exact packages and versions required first, then ask for approval before installing packages or changing dependency manifests.
.github/copilot-instructions.md and .github/CODING_GUIDELINES.md.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).
Use this validation loop explicitly:
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.
Use this checklist during the first visual comparison:
Fix TypeScript, registration, markup, or build errors immediately during the build/test steps. Use the build output, component docs, references/gotchas.md, and the user's visual feedback to close the remaining gaps. Typical adjustments include:
After the build succeeds with zero errors, refine layout proportions, color values, missing sections, and typography until the view matches closely.
development
Identify and select the right Ignite UI Web Components for your app UI, then navigate to official docs, usage examples, and API references
tools
Optimize application bundle size by importing only necessary components and using tree-shaking effectively
development
Integrate Ignite UI Web Components packages into React, Angular, Vue, or vanilla JS applications with framework-specific configurations
tools
Customize Ignite UI Web Components styling using CSS custom properties, optional Sass, and the igniteui-theming MCP server for AI-assisted theming