igniteui-cli 15.5.0 → 15.6.0

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.
Files changed (76) hide show
  1. package/package.json +4 -4
  2. package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +6 -3
  3. package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
  4. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
  5. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
  6. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
  7. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
  8. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
  9. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
  10. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
  11. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
  12. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
  13. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
  14. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
  15. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
  16. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
  17. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
  18. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
  19. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
  20. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
  21. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
  22. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
  23. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
  24. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
  25. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +86 -0
  26. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +220 -0
  27. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
  28. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
  29. package/templates/react/igr-ts/projects/_base/files/src/main.tsx +1 -0
  30. package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +3 -3
  31. package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
  32. package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
  33. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
  34. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
  35. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
  36. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
  37. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
  38. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
  39. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
  40. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
  41. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
  42. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
  43. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
  44. package/templates/react/igr-ts/projects/side-nav/files/src/app/app.css +9 -9
  45. package/templates/react/igr-ts/projects/side-nav/files/src/app/home/style.module.css +7 -7
  46. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.css +8 -8
  47. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css +1 -69
  48. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx +5 -5
  49. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css +5 -26
  50. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css +0 -1
  51. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css +1 -56
  52. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx +2 -2
  53. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css +11 -11
  54. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx +1 -1
  55. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx +1 -1
  56. package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx +1 -1
  57. package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.css +9 -9
  58. package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/style.module.css +7 -7
  59. package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.css +7 -7
  60. package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
  61. package/templates/webcomponents/igc-ts/constants.js +5 -5
  62. package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
  63. package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
  64. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
  65. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
  66. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
  67. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
  68. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
  69. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
  70. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
  71. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
  72. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
  73. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
  74. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
  75. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
  76. package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
@@ -1,161 +0,0 @@
1
- # Component Catalogue
2
-
3
- ## Overview
4
- This reference gives high-level guidance on Ignite UI for React components, their key features, and common use cases. For a full list of components, call `list_components` from `igniteui-cli` with the specific chart, or grid component, or feature you're interested in.
5
-
6
- ---
7
-
8
- ## Step-by-Step: Choosing Components for a UI
9
-
10
- Follow these steps when a user describes a UI requirement:
11
-
12
- ### Step 1 — Identify UI patterns
13
-
14
- Break the described UI into atomic patterns. Examples:
15
- - "A booking form" → date input, text inputs, button, maybe a calendar picker
16
- - "An admin dashboard" → navbar, nav drawer, cards, data grid, charts
17
- - "A notification center" → snackbar or toast, badge, list
18
- - "A settings page" → tabs or accordion, switch, input, select, button
19
-
20
- ### Step 2 — Map patterns to components
21
-
22
- Call `list_components('react')` to discover available components, optionally filtered by keyword (e.g., `filter: 'date'` for date-related components). When in doubt:
23
-
24
- | If the user needs… | Prefer… | Over… |
25
- |---|---|---|
26
- | Simple static list | `IgrList` | Data Grid |
27
- | Basic dropdown | `IgrSelect` | `IgrCombo` |
28
- | Searchable or multi-select dropdown | `IgrCombo` | `IgrSelect` |
29
- | Tabular data with basic display | `IgrGridLite` (grid-lite) | `IgrGrid` (commercial) |
30
- | Tabular data, advanced features needed | `IgrGrid` | `IgrGridLite` (grid-lite) |
31
- | Single dismissible message | `IgrToast` | `IgrSnackbar` |
32
- | Message requiring user action | `IgrSnackbar` | `IgrToast` |
33
- | Collapsible single section | `IgrExpansionPanel` | `IgrAccordion` |
34
- | Multiple collapsible sections | `IgrAccordion` | `IgrExpansionPanel` |
35
- | Stepped wizard UI | `IgrStepper` | `IgrTabs` |
36
- | Content tabs / view switching (inline content) | `IgrTabs` (content in `IgrTab`) | `IgrStepper` |
37
- | Tab-based navigation (with React Router) | `IgrTabs` (label-only) | `IgrTabs` (with content) |
38
-
39
- ### Step 3 — Check the package
40
-
41
- Confirm which package provides the component:
42
-
43
- - **MIT components** (inputs, layout, notifications, scheduling, chat) → `igniteui-react`
44
- - **Lightweight grid** (Grid Lite) → `igniteui-react/grid-lite` *(MIT, requires both `igniteui-react` and `igniteui-grid-lite` packages)*
45
- - **Advanced grids** (Data Grid, Tree Grid, Hierarchical Grid, Pivot Grid) → `igniteui-react-grids` *(commercial)*
46
- - **Charts** → `igniteui-react-charts` *(commercial)*
47
- - **Maps** → `igniteui-react-maps` *(commercial)*
48
- - **Gauges** → `igniteui-react-gauges` *(commercial)*
49
-
50
- ### Step 4 — Look up component documentation
51
-
52
- Call `get_doc('react', '<name>')` with the doc name from `list_components` results to get full usage documentation, import paths, prop tables, event signatures, and code examples. Use `search_docs('<query>', 'react')` for feature-based questions (e.g., `"date picker range selection"`).
53
-
54
- ### Step 5 — Provide a starter code snippet
55
-
56
- Once components are identified, give the user a minimal working React snippet. Example for an admin dashboard shell:
57
-
58
- ```tsx
59
- import { IgrNavbar, IgrNavDrawer, IgrNavDrawerItem, IgrCard, IgrCardHeader, IgrCardContent } from 'igniteui-react';
60
- import 'igniteui-webcomponents/themes/light/bootstrap.css';
61
-
62
- function Dashboard() {
63
- return (
64
- <>
65
- <IgrNavbar>
66
- <h1>My Dashboard</h1>
67
- </IgrNavbar>
68
-
69
- <IgrNavDrawer open>
70
- <IgrNavDrawerItem>
71
- <span slot="icon">🏠</span>
72
- <span slot="content">Home</span>
73
- </IgrNavDrawerItem>
74
- <IgrNavDrawerItem>
75
- <span slot="icon">⚙️</span>
76
- <span slot="content">Settings</span>
77
- </IgrNavDrawerItem>
78
- </IgrNavDrawer>
79
-
80
- <main>
81
- <IgrCard>
82
- <IgrCardHeader>
83
- <h3 slot="title">Summary</h3>
84
- </IgrCardHeader>
85
- <IgrCardContent>Dashboard content here</IgrCardContent>
86
- </IgrCard>
87
- </main>
88
- </>
89
- );
90
- }
91
- ```
92
-
93
- ---
94
-
95
- ## Common UI Scenarios → Recommended Component Sets
96
-
97
- ### Login / Authentication Form
98
-
99
- - `IgrInput` — email and password fields
100
- - `IgrCheckbox` — "Remember me"
101
- - `IgrButton` — submit
102
- - `IgrSnackbar` — error/success feedback
103
-
104
- ### User Profile / Settings Page
105
-
106
- - `IgrAvatar` — profile picture
107
- - `IgrTabs` — section navigation (Profile, Security, Notifications)
108
- - `IgrInput` / `IgrTextarea` — editable fields
109
- - `IgrSwitch` — feature toggles
110
- - `IgrSelect` — preference dropdowns
111
- - `IgrButton` — save/cancel actions
112
-
113
- ### Data Table / Admin List View
114
-
115
- - `IgrInput` — search bar
116
- - `IgrCombo` — filter dropdowns
117
- - `IgrGridLite` (grid-lite) or `IgrGrid` — tabular data
118
- - `IgrButton` / `IgrIconButton` — actions
119
- - `IgrDialog` — confirm delete modal
120
- - `IgrBadge` — status indicators
121
-
122
- ### Booking / Reservation Form
123
-
124
- - `IgrDateRangePicker` — check-in / check-out
125
- - `IgrInput` — guest details
126
- - `IgrSelect` — room type
127
- - `IgrStepper` — multi-step booking flow
128
- - `IgrButton` — next / confirm
129
- - `IgrToast` — booking confirmation
130
-
131
- ### Analytics / Reporting Dashboard
132
-
133
- - `IgrNavbar` — top bar
134
- - `IgrNavDrawer` — side navigation
135
- - `IgrCard` — KPI summary cards
136
- - `IgrTabs` or `IgrTileManager` — section layout
137
- - `IgrGrid` or `IgrPivotGrid` — detailed data tables
138
- - `IgrCategoryChart` — charts (from `igniteui-react-charts`)
139
- - `IgrLinearProgress` / `IgrCircularProgress` — loading indicators
140
-
141
- ### Master-Detail with Tab Navigation (React Router)
142
-
143
- - `IgrNavbar` — top bar
144
- - `IgrTabs` — **navigation only** (label-only, no inline content); each `IgrTab` triggers a route change
145
- - React Router `<Outlet />` — renders the routed child view below the tabs
146
- - Active tab synced to the current route via `selected` prop
147
-
148
- > **⚠️ Important — Tabs for navigation vs. tabs for content:**
149
- > - **Tabs as content panels** (`IgrTabs` with content in `IgrTab`): Content is rendered inside each tab. Use when the tab content is inline and does not require routing.
150
- > - **Tabs as navigation** (`IgrTabs` with label-only tabs): Tabs act as route links. The routing outlet (`<Outlet />`) renders the content. **Do NOT add inline content in `IgrTab` in this case** — use only the `label` prop or `slot="label"`. See [JSX-PATTERNS.md](./JSX-PATTERNS.md) for a full React Router example.
151
-
152
- ---
153
-
154
- ## Searching the Documentation
155
-
156
- Use MCP tools for up-to-date component discovery and API lookup:
157
-
158
- - `list_components('react')` — browse the full component catalogue, optionally narrowed with a filter keyword
159
- - `get_doc('react', '<name>')` — full documentation, prop tables, and code examples for a component
160
- - `search_docs('<query>', 'react')` — full-text search for features or behaviors (e.g., `"date picker range selection"`)
161
- - `search_api('<query>', 'react')` — look up specific classes, properties, or methods
@@ -1,72 +0,0 @@
1
- # Event Handling
2
-
3
- ## How Events Work
4
-
5
- Ignite UI React wrappers map web component custom events to React-style `onXxx` callback props. The event name is converted from the web component event name to a camelCase `on`-prefixed prop.
6
-
7
- ```tsx
8
- import { IgrButton, IgrInput, IgrCheckbox } from 'igniteui-react';
9
-
10
- function MyForm() {
11
- const handleClick = (event: CustomEvent) => {
12
- console.log('Button clicked');
13
- };
14
-
15
- const handleInput = (event: CustomEvent) => {
16
- // event.target is the underlying web component element (e.g., igc-input)
17
- console.log('Input value:', (event.target as any).value);
18
- };
19
-
20
- const handleChange = (event: CustomEvent) => {
21
- console.log('Checkbox changed:', event.detail);
22
- };
23
-
24
- return (
25
- <>
26
- <IgrButton onClick={handleClick}>
27
- <span>Submit</span>
28
- </IgrButton>
29
- <IgrInput label="Name" onInput={handleInput} />
30
- <IgrCheckbox onChange={handleChange}>Accept terms</IgrCheckbox>
31
- </>
32
- );
33
- }
34
- ```
35
-
36
- ## Common Event Props
37
-
38
- > For component-specific event signatures and detail types, call `get_api_reference('react', '<Component>', 'events')` — e.g. `get_api_reference('react', 'IgrCombo', 'events')`.
39
-
40
- | Component | Event Prop | Fires When |
41
- |---|---|---|
42
- | `IgrButton` | `onClick` | Button is clicked |
43
- | `IgrInput` | `onInput` | Value changes (each keystroke) |
44
- | `IgrInput` | `onChange` | Value committed (blur / Enter) |
45
- | `IgrCheckbox` | `onChange` | Checked state changes |
46
- | `IgrSwitch` | `onChange` | Toggle state changes |
47
- | `IgrSelect` | `onChange` | Selection changes |
48
- | `IgrCombo` | `onChange` | Selection changes |
49
- | `IgrSlider` | `onInput` | Slider value changes (live) |
50
- | `IgrSlider` | `onChange` | Slider value committed |
51
- | `IgrDialog` | `onClosing` | Dialog is about to close |
52
- | `IgrDialog` | `onClosed` | Dialog has closed |
53
- | `IgrTabs` | `onChange` | Active tab changes |
54
- | `IgrCalendar` | `onChange` | Selected date changes |
55
- | `IgrDatePicker` | `onChange` | Selected date changes |
56
-
57
- ## TypeScript Event Types
58
-
59
- When using TypeScript, event handlers receive the underlying `CustomEvent`:
60
-
61
- ```tsx
62
- import { IgrInput } from 'igniteui-react';
63
-
64
- function SearchBar() {
65
- const handleInput = (e: CustomEvent) => {
66
- const value = (e.target as HTMLInputElement).value;
67
- console.log('Search:', value);
68
- };
69
-
70
- return <IgrInput label="Search" onInput={handleInput} />;
71
- }
72
- ```
@@ -1,139 +0,0 @@
1
- # Installation & Setup
2
-
3
- ## Install the Package
4
-
5
- ```bash
6
- # Core UI components (MIT)
7
- npm install igniteui-react
8
-
9
- # If you need the lightweight grid (MIT)
10
- # Requires BOTH packages - igniteui-react and igniteui-grid-lite
11
- npm install igniteui-react igniteui-grid-lite
12
-
13
- # If you need advanced grids (commercial)
14
- npm install igniteui-react-grids
15
-
16
- # If you need charts (commercial)
17
- npm install igniteui-react-charts
18
-
19
- # If you need gauges (commercial)
20
- npm install igniteui-react-gauges
21
-
22
- # If you need maps (commercial)
23
- npm install igniteui-react-maps
24
- ```
25
-
26
- ## Peer Dependencies
27
-
28
- `igniteui-react` requires `react` and `react-dom` (v18+ or v19+). These are typically already in your project:
29
-
30
- ```bash
31
- npm install react react-dom
32
- ```
33
-
34
- ## Import a Theme (REQUIRED)
35
-
36
- > **CRITICAL:** Components will render without styles, with broken icons and missing visuals if the theme CSS is not imported. **Always import the theme CSS before using any Ignite UI component.**
37
-
38
- Import one theme CSS file in your entry point (`main.tsx`, `index.tsx`, or `App.tsx`). The theme CSS must be imported **in every file that uses Ignite UI components** if your framework does not have a single global entry point (e.g., Next.js — see below).
39
-
40
- ```tsx
41
- // main.tsx or index.tsx
42
- import 'igniteui-webcomponents/themes/light/bootstrap.css';
43
- ```
44
-
45
- Available themes:
46
-
47
- | Import | Theme |
48
- |---|---|
49
- | `igniteui-webcomponents/themes/light/bootstrap.css` | Bootstrap Light |
50
- | `igniteui-webcomponents/themes/dark/bootstrap.css` | Bootstrap Dark |
51
- | `igniteui-webcomponents/themes/light/material.css` | Material Light |
52
- | `igniteui-webcomponents/themes/dark/material.css` | Material Dark |
53
- | `igniteui-webcomponents/themes/light/fluent.css` | Fluent Light |
54
- | `igniteui-webcomponents/themes/dark/fluent.css` | Fluent Dark |
55
- | `igniteui-webcomponents/themes/light/indigo.css` | Indigo Light |
56
- | `igniteui-webcomponents/themes/dark/indigo.css` | Indigo Dark |
57
-
58
- Grid theme CSS files follow the same pattern under `igniteui-react-grids/grids/themes/`.
59
-
60
- **For grids**, you **must also** import the grid theme CSS. Without it, the grid will be missing styles and icons will show as placeholders:
61
-
62
- ```tsx
63
- import 'igniteui-webcomponents/themes/light/bootstrap.css';
64
- import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
65
- ```
66
-
67
- ## Next.js Setup
68
-
69
- In Next.js, there is no single `main.tsx` entry point. Import the theme CSS **in each client component file** that uses Ignite UI components, or in a shared layout component:
70
-
71
- ```tsx
72
- // app/components/DataTable.tsx
73
- 'use client';
74
-
75
- import 'igniteui-webcomponents/themes/light/bootstrap.css';
76
- import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
77
-
78
- import { IgrGrid, IgrColumn, IgrPaginator } from 'igniteui-react-grids';
79
-
80
- export default function DataTable({ data }: { data: any[] }) {
81
- return (
82
- <IgrGrid data={data} autoGenerate={false}>
83
- <IgrColumn field="name" header="Name" />
84
- <IgrColumn field="email" header="Email" />
85
- <IgrPaginator perPage={10} />
86
- </IgrGrid>
87
- );
88
- }
89
- ```
90
-
91
- Alternatively, import themes once in a root layout:
92
-
93
- ```tsx
94
- // app/layout.tsx
95
- import 'igniteui-webcomponents/themes/light/bootstrap.css';
96
- import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
97
-
98
- export default function RootLayout({ children }: { children: React.ReactNode }) {
99
- return (
100
- <html lang="en">
101
- <body>{children}</body>
102
- </html>
103
- );
104
- }
105
- ```
106
-
107
- ## Minimal App Example (Vite / CRA)
108
-
109
- ```tsx
110
- // main.tsx
111
- import React from 'react';
112
- import ReactDOM from 'react-dom/client';
113
- import 'igniteui-webcomponents/themes/light/bootstrap.css';
114
- import App from './App';
115
-
116
- ReactDOM.createRoot(document.getElementById('root')!).render(
117
- <React.StrictMode>
118
- <App />
119
- </React.StrictMode>
120
- );
121
- ```
122
-
123
- ```tsx
124
- // App.tsx
125
- import { IgrButton, IgrInput } from 'igniteui-react';
126
-
127
- function App() {
128
- return (
129
- <div>
130
- <IgrInput label="Name" />
131
- <IgrButton><span>Submit</span></IgrButton>
132
- </div>
133
- );
134
- }
135
-
136
- export default App;
137
- ```
138
-
139
- > **No `defineComponents()` needed.** React wrappers auto-register. See [CHARTS-GRIDS.md](./reference/CHARTS-GRIDS.md) for exceptions (charts, gauges, maps).
@@ -1,187 +0,0 @@
1
- # JSX Usage Patterns
2
-
3
- ## Props vs HTML Attributes
4
-
5
- Ignite UI React components accept props just like any React component. Use JSX expression syntax for dynamic values:
6
-
7
- ```tsx
8
- // ✅ Correct — JSX expression
9
- <IgrInput label="Email" placeholder="you@example.com" type="email" />
10
- <IgrSlider value={50} min={0} max={100} />
11
- <IgrButton disabled={isLoading}>Submit</IgrButton>
12
-
13
- // ❌ Wrong — string for numeric/boolean values
14
- <IgrSlider value="50" />
15
- ```
16
-
17
- ## Children vs Slots
18
-
19
- Ignite UI components use the web component **slot** mechanism under the hood. In JSX, pass children to the default slot and use the `slot` attribute to target named slots:
20
-
21
- ```tsx
22
- <IgrButton>
23
- {/* Default slot — button label */}
24
- <span>Click Me</span>
25
- </IgrButton>
26
-
27
- <IgrCard>
28
- <IgrCardHeader>
29
- <h3 slot="title">Card Title</h3>
30
- <p slot="subtitle">Card subtitle</p>
31
- </IgrCardHeader>
32
- <IgrCardContent>
33
- <p>Default slot content inside the card body.</p>
34
- </IgrCardContent>
35
- <IgrCardActions>
36
- <IgrButton slot="start">Cancel</IgrButton>
37
- <IgrButton slot="end">Confirm</IgrButton>
38
- </IgrCardActions>
39
- </IgrCard>
40
-
41
- <IgrNavDrawerItem>
42
- <span slot="icon">📊</span>
43
- <span slot="content">Dashboard</span>
44
- </IgrNavDrawerItem>
45
- ```
46
-
47
- > **Tip:** Check the component documentation for available slot names. Common slots include `start`, `end`, `prefix`, `suffix`, `header`, `content`, `icon`, `title`, `subtitle`.
48
-
49
- ## Render Props (Grids & Complex Components)
50
-
51
- Some components like the Data Grid support **render props** for custom cell rendering:
52
-
53
- ```tsx
54
- import { IgrBadge } from 'igniteui-react';
55
- import { IgrGrid, IgrColumn } from 'igniteui-react-grids';
56
-
57
- function UserGrid({ users }: { users: User[] }) {
58
- return (
59
- <IgrGrid data={users} autoGenerate={false}>
60
- <IgrColumn field="name" header="Name" />
61
- <IgrColumn field="email" header="Email" />
62
- <IgrColumn
63
- field="status"
64
- header="Status"
65
- bodyTemplate={(ctx) => (
66
- <IgrBadge>{ctx.cell.value}</IgrBadge>
67
- )}
68
- />
69
- </IgrGrid>
70
- );
71
- }
72
- ```
73
-
74
- ## IgrTabs — Content Panels vs Navigation
75
-
76
- `IgrTabs` supports two distinct usage patterns. Choosing the wrong one is a common mistake.
77
-
78
- ### Pattern 1: Tabs with Content Panels (inline content)
79
-
80
- Use `IgrTab` with inline content when the tabbed content is rendered inline — no routing involved. The tab label can be set via a `label` prop or via a `slot="label"` element:
81
-
82
- ```tsx
83
- import { IgrTabs, IgrTab } from 'igniteui-react';
84
-
85
- // Simple text labels using the label prop
86
- function SettingsPage() {
87
- return (
88
- <IgrTabs>
89
- <IgrTab label="Profile" selected>
90
- <p>Profile settings content here</p>
91
- </IgrTab>
92
- <IgrTab label="Security">
93
- <p>Security settings content here</p>
94
- </IgrTab>
95
- <IgrTab label="Notifications">
96
- <p>Notification preferences content here</p>
97
- </IgrTab>
98
- </IgrTabs>
99
- );
100
- }
101
- ```
102
-
103
- **Alternative: Using slot="label" for complex headers (e.g., with icons):**
104
-
105
- ```tsx
106
- import { IgrTabs, IgrTab, IgrIcon } from 'igniteui-react';
107
-
108
- function SettingsPage() {
109
- return (
110
- <IgrTabs>
111
- <IgrTab selected>
112
- <span slot="label">
113
- <IgrIcon name="home" collection="material" />
114
- Profile
115
- </span>
116
- <p>Profile settings content here</p>
117
- </IgrTab>
118
- <IgrTab>
119
- <span slot="label">
120
- <IgrIcon name="security" collection="material" />
121
- Security
122
- </span>
123
- <p>Security settings content here</p>
124
- </IgrTab>
125
- <IgrTab>
126
- <span slot="label">
127
- <IgrIcon name="notifications" collection="material" />
128
- Notifications
129
- </span>
130
- <p>Notification preferences content here</p>
131
- </IgrTab>
132
- </IgrTabs>
133
- );
134
- }
135
- ```
136
-
137
- ### Pattern 2: Tabs as Navigation (with React Router — NO inline content)
138
-
139
- > **⚠️ CRITICAL:** When using `IgrTabs` for navigation with React Router (or any router), **do NOT include inline content in `IgrTab`**. Only render tab labels (via `label` prop or `slot="label"`), and let the router's `<Outlet />` handle the content below the tabs.
140
-
141
- ```tsx
142
- import { IgrTabs, IgrTab } from 'igniteui-react';
143
- import { useNavigate, useLocation, Outlet } from 'react-router-dom';
144
-
145
- const tabs = [
146
- { path: '/dashboard', label: 'Dashboard' },
147
- { path: '/orders', label: 'Orders' },
148
- { path: '/customers', label: 'Customers' },
149
- ];
150
-
151
- function MainLayout() {
152
- const navigate = useNavigate();
153
- const location = useLocation();
154
-
155
- const handleTabChange = (e: CustomEvent) => {
156
- const selectedLabel = (e.detail as any).label as string;
157
- const tab = tabs.find(t => t.label === selectedLabel);
158
- if (tab) navigate(tab.path);
159
- };
160
-
161
- return (
162
- <div>
163
- {/* Tabs for navigation — label prop only, no inline content */}
164
- <IgrTabs onChange={handleTabChange}>
165
- {tabs.map((tab) => (
166
- <IgrTab
167
- key={tab.path}
168
- label={tab.label}
169
- selected={location.pathname === tab.path}
170
- />
171
- ))}
172
- </IgrTabs>
173
-
174
- {/* Router outlet renders the routed view */}
175
- <main>
176
- <Outlet />
177
- </main>
178
- </div>
179
- );
180
- }
181
- ```
182
-
183
- **Key rules for tabs-as-navigation:**
184
- - ✅ Use only `IgrTab` with label prop or `slot="label"` — no inline content
185
- - ✅ Sync the active tab to the current route using the `selected` prop
186
- - ✅ Handle `onChange` to call `navigate()` for route changes
187
- - ✅ Use `<Outlet />` (or the equivalent in your router) for content rendering
@@ -1,77 +0,0 @@
1
- # Setting Up the Ignite UI CLI MCP Server
2
-
3
- > **Part of the [`igniteui-react-components`](../SKILL.md) skill hub.**
4
-
5
- ## Contents
6
-
7
- - [VS Code](#vs-code)
8
- - [Cursor](#cursor)
9
- - [Claude Desktop](#claude-desktop)
10
- - [WebStorm / JetBrains IDEs](#webstorm--jetbrains-ides)
11
- - [Verifying the Setup](#verifying-the-setup)
12
-
13
- The Ignite UI CLI MCP server enables AI assistants to generate production-ready theming code. It must be configured in your editor before the theming tools become available.
14
-
15
- ## VS Code
16
-
17
- Create or edit `.vscode/mcp.json` in your project:
18
-
19
- ```json
20
- {
21
- "servers": {
22
- "igniteui-cli": {
23
- "command": "npx",
24
- "args": ["-y", "igniteui-cli", "mcp"]
25
- }
26
- }
27
- }
28
- ```
29
-
30
- This works whether `igniteui-cli` is installed locally in `node_modules` or needs to be pulled from the npm registry — `npx -y` handles both cases.
31
-
32
- ## Cursor
33
-
34
- Create or edit `.cursor/mcp.json`:
35
-
36
- ```json
37
- {
38
- "mcpServers": {
39
- "igniteui-cli": {
40
- "command": "npx",
41
- "args": ["-y", "igniteui-cli", "mcp"]
42
- }
43
- }
44
- }
45
- ```
46
-
47
- ## Claude Desktop
48
-
49
- Edit the Claude Desktop config file:
50
- - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
51
- - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
52
-
53
- ```json
54
- {
55
- "mcpServers": {
56
- "igniteui-cli": {
57
- "command": "npx",
58
- "args": ["-y", "igniteui-cli", "mcp"]
59
- }
60
- }
61
- }
62
- ```
63
-
64
- ## WebStorm / JetBrains IDEs
65
-
66
- 1. Go to **Settings → Tools → AI Assistant → MCP Servers**
67
- 2. Click **+ Add MCP Server**
68
- 3. Set Command to `npx` and Arguments to `-y igniteui-cli mcp`
69
- 4. Click OK and restart the AI Assistant
70
-
71
- ## Verifying the Setup
72
-
73
- After configuring the MCP server, ask your AI assistant:
74
-
75
- > "List all available Ignite UI components"
76
-
77
- If the MCP server is running, the `list_components` tool will return all available components for the detected framework.