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.
- 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 +86 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +220 -0
- 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/projects/_base/files/src/main.tsx +1 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +3 -3
- 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/react/igr-ts/projects/side-nav/files/src/app/app.css +9 -9
- package/templates/react/igr-ts/projects/side-nav/files/src/app/home/style.module.css +7 -7
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.css +8 -8
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css +1 -69
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx +5 -5
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css +5 -26
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css +0 -1
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css +1 -56
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx +2 -2
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css +11 -11
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx +1 -1
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx +1 -1
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx +1 -1
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.css +9 -9
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/style.module.css +7 -7
- package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.css +7 -7
- package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
- package/templates/webcomponents/igc-ts/constants.js +5 -5
- 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/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
|
@@ -1,98 +1,64 @@
|
|
|
1
1
|
# Layout & Navigation Components
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> For project setup and module registration - see [`setup.md`](./setup.md).
|
|
3
|
+
Module for every component below is `Igb<Name>Module`. `IgbExpansionPanel` ships inside `IgbAccordionModule`; `IgbNavDrawerHeaderItem` and `IgbTreeItem` have their own modules.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- [Tabs](#tabs)
|
|
9
|
-
- [Stepper](#stepper)
|
|
10
|
-
- [Accordion & Expansion Panel](#accordion--expansion-panel)
|
|
11
|
-
- [Navbar](#navbar)
|
|
12
|
-
- [Navigation Drawer](#navigation-drawer)
|
|
13
|
-
- [Tree](#tree)
|
|
14
|
-
- [Key Rules](#key-rules)
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Overview
|
|
19
|
-
This reference gives high-level guidance on layout and navigation components, their key features, and common API members. For detailed documentation, call `get_doc` from `igniteui-cli`; use `search_api` and `get_api_reference` for Blazor API details.
|
|
5
|
+
**Async vs sync methods.** Every method exists as `XAsync()` and a sync twin `X()`. Use the `Async` form: the sync twin needs `IJSInProcessRuntime` and throws `InvalidOperationException` on Blazor Server. It only works in WebAssembly and MAUI WebView.
|
|
20
6
|
|
|
21
7
|
## Tabs
|
|
22
8
|
|
|
23
|
-
```csharp
|
|
24
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbTabsModule));
|
|
25
|
-
```
|
|
26
|
-
|
|
27
9
|
```razor
|
|
28
|
-
<IgbTabs>
|
|
29
|
-
<IgbTab Label="
|
|
30
|
-
|
|
10
|
+
<IgbTabs @ref="TabsRef" Alignment="TabsAlignment.Start" Change="OnTabChange">
|
|
11
|
+
<IgbTab Label="Overview">
|
|
12
|
+
<span>Content for the first tab</span>
|
|
31
13
|
</IgbTab>
|
|
32
|
-
<IgbTab Label="
|
|
33
|
-
|
|
14
|
+
<IgbTab Label="Details" Selected="true">
|
|
15
|
+
<span>Content for the second tab</span>
|
|
34
16
|
</IgbTab>
|
|
35
17
|
<IgbTab>
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
<IgbIcon slot="label" IconName="home" Collection="material" />
|
|
19
|
+
<span>Content for the third tab</span>
|
|
38
20
|
</IgbTab>
|
|
39
21
|
</IgbTabs>
|
|
40
|
-
```
|
|
41
|
-
Tab text can be set either as simple string using the `Label` property or by assigning children to the `label` slot. Any remaining children in the default slot are rendered as the tab content.
|
|
42
|
-
|
|
43
|
-
For icon tabs, use the `label` slot inside `IgbTab`:
|
|
44
22
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</IgbTab>
|
|
23
|
+
@code {
|
|
24
|
+
IgbTabs TabsRef { get; set; } = default!;
|
|
25
|
+
void OnTabChange(IgbTabComponentEventArgs e) { }
|
|
26
|
+
}
|
|
50
27
|
```
|
|
51
28
|
|
|
52
|
-
|
|
29
|
+
Tab headers come from the `Label` string or from children in the `label` slot; everything left in the default slot is the panel body. There is **no** `IgbTabPanel` component. `IgbTab` has `Label`, `Selected`, `Disabled`. `IgbTabs` has `Alignment`, `Activation`, `SelectAsync(id)`, `GetSelectedAsync()`.
|
|
53
30
|
|
|
54
31
|
## Stepper
|
|
55
32
|
|
|
56
|
-
```csharp
|
|
57
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbStepperModule));
|
|
58
|
-
```
|
|
59
|
-
|
|
60
33
|
```razor
|
|
61
|
-
<IgbStepper Linear="true" Orientation="StepperOrientation.Horizontal"
|
|
34
|
+
<IgbStepper @ref="StepperRef" Linear="true" Orientation="StepperOrientation.Horizontal">
|
|
62
35
|
<IgbStep>
|
|
63
36
|
<span slot="title">Personal Info</span>
|
|
64
|
-
<!-- step content -->
|
|
65
37
|
<IgbInput Label="Name" />
|
|
66
38
|
</IgbStep>
|
|
67
|
-
<IgbStep>
|
|
39
|
+
<IgbStep Optional="true">
|
|
68
40
|
<span slot="title">Address</span>
|
|
69
|
-
<!-- step content -->
|
|
70
41
|
</IgbStep>
|
|
71
42
|
<IgbStep>
|
|
72
43
|
<span slot="title">Confirm</span>
|
|
73
|
-
<!-- step content -->
|
|
74
44
|
</IgbStep>
|
|
75
45
|
</IgbStepper>
|
|
76
46
|
|
|
77
47
|
@code {
|
|
78
|
-
IgbStepper StepperRef { get; set; }
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
void GoPrev() => StepperRef.Prev();
|
|
48
|
+
IgbStepper StepperRef { get; set; } = default!;
|
|
49
|
+
Task GoNext() => StepperRef.NextAsync();
|
|
50
|
+
Task GoPrev() => StepperRef.PrevAsync();
|
|
82
51
|
}
|
|
83
52
|
```
|
|
84
53
|
|
|
85
|
-
|
|
54
|
+
`IgbStepper`: `Linear`, `Orientation`, `StepType`, `TitlePosition`, `ContentTop`, `NextAsync()`, `PrevAsync()`, `NavigateToAsync(index)`, `ResetAsync()`, `ActiveStepChanging` / `ActiveStepChanged`.
|
|
55
|
+
`IgbStep`: `Active`, `Complete`, `Optional`, `Invalid`, `Disabled`, plus `title`, `subtitle`, `indicator` slots.
|
|
86
56
|
|
|
87
|
-
|
|
57
|
+
`Linear="true"` blocks skipping ahead — omit it when free navigation is intended.
|
|
88
58
|
|
|
89
|
-
|
|
90
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbAccordionModule));
|
|
91
|
-
// IgbExpansionPanel is included in IgbAccordionModule
|
|
92
|
-
```
|
|
59
|
+
## Accordion & Expansion Panel
|
|
93
60
|
|
|
94
61
|
```razor
|
|
95
|
-
<!-- Accordion (wraps multiple expansion panels) -->
|
|
96
62
|
<IgbAccordion SingleExpand="true">
|
|
97
63
|
<IgbExpansionPanel>
|
|
98
64
|
<span slot="title">Section 1</span>
|
|
@@ -105,144 +71,89 @@ builder.Services.AddIgniteUIBlazor(typeof(IgbAccordionModule));
|
|
|
105
71
|
</IgbExpansionPanel>
|
|
106
72
|
</IgbAccordion>
|
|
107
73
|
|
|
108
|
-
<!-- Standalone expansion panel -->
|
|
109
|
-
<IgbExpansionPanel @ref="PanelRef">
|
|
110
|
-
<span slot="title">Details</span>
|
|
111
|
-
<p>Expanded content here.</p>
|
|
112
|
-
</IgbExpansionPanel>
|
|
113
|
-
|
|
114
74
|
@code {
|
|
115
|
-
IgbExpansionPanel PanelRef { get; set; }
|
|
116
|
-
|
|
75
|
+
IgbExpansionPanel PanelRef { get; set; } = default!;
|
|
76
|
+
Task Toggle() => PanelRef.ToggleAsync(); // Task<bool>
|
|
117
77
|
}
|
|
118
78
|
```
|
|
119
79
|
|
|
120
|
-
|
|
80
|
+
`IgbAccordion`: `SingleExpand` (closing others on open — the usual case), `ShowAllAsync()`, `HideAllAsync()`, and `Opening` / `Opened` / `Closing` / `Closed` carrying `IgbExpansionPanelComponentEventArgs`.
|
|
81
|
+
`IgbExpansionPanel`: `Open`, `Disabled`, `IndicatorPosition`, `ShowAsync()` / `HideAsync()` / `ToggleAsync()` (all `Task<bool>`). It works standalone as well as inside an accordion.
|
|
121
82
|
|
|
122
83
|
## Navbar
|
|
123
84
|
|
|
124
|
-
```csharp
|
|
125
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbNavbarModule));
|
|
126
|
-
```
|
|
127
|
-
|
|
128
85
|
```razor
|
|
129
86
|
<IgbNavbar>
|
|
130
|
-
<IgbIconButton slot="start" IconName="menu" Collection="material" @onclick="
|
|
87
|
+
<IgbIconButton slot="start" IconName="menu" Collection="material" @onclick="ToggleDrawer" />
|
|
131
88
|
<h3>My Application</h3>
|
|
132
89
|
<IgbIconButton slot="end" IconName="search" Collection="material" />
|
|
133
|
-
<IgbIconButton slot="end" IconName="more_vert" Collection="material" />
|
|
134
90
|
</IgbNavbar>
|
|
135
91
|
```
|
|
136
92
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
---
|
|
93
|
+
Purely slot-driven: `start`, default (title), `end`. Icons must be registered before they display — see [`data-display.md`](./data-display.md).
|
|
140
94
|
|
|
141
95
|
## Navigation Drawer
|
|
142
96
|
|
|
143
|
-
```csharp
|
|
144
|
-
builder.Services.AddIgniteUIBlazor(
|
|
145
|
-
typeof(IgbNavDrawerModule),
|
|
146
|
-
typeof(IgbNavDrawerHeaderItemModule)
|
|
147
|
-
);
|
|
148
|
-
```
|
|
149
|
-
|
|
150
97
|
```razor
|
|
151
|
-
<IgbNavDrawer @ref="DrawerRef" Open="true">
|
|
98
|
+
<IgbNavDrawer @ref="DrawerRef" Open="true" Position="NavDrawerPosition.Start">
|
|
152
99
|
<IgbNavDrawerHeaderItem>My App</IgbNavDrawerHeaderItem>
|
|
153
100
|
|
|
154
101
|
<IgbNavDrawerItem @ref="HomeItem" @onclick="() => Activate(HomeItem)">
|
|
155
102
|
<IgbIcon slot="icon" IconName="home" Collection="material" />
|
|
156
103
|
<span slot="content">Home</span>
|
|
157
104
|
</IgbNavDrawerItem>
|
|
158
|
-
|
|
159
105
|
<IgbNavDrawerItem @ref="SearchItem" @onclick="() => Activate(SearchItem)">
|
|
160
106
|
<IgbIcon slot="icon" IconName="search" Collection="material" />
|
|
161
107
|
<span slot="content">Search</span>
|
|
162
108
|
</IgbNavDrawerItem>
|
|
163
|
-
</IgbNavDrawer>
|
|
164
109
|
|
|
165
|
-
|
|
110
|
+
@* optional icon-only collapsed state *@
|
|
111
|
+
<div slot="mini">
|
|
112
|
+
<IgbNavDrawerItem>
|
|
113
|
+
<IgbIcon slot="icon" IconName="home" Collection="material" />
|
|
114
|
+
</IgbNavDrawerItem>
|
|
115
|
+
</div>
|
|
116
|
+
</IgbNavDrawer>
|
|
166
117
|
|
|
167
118
|
@code {
|
|
168
|
-
IgbNavDrawer DrawerRef { get; set; }
|
|
169
|
-
IgbNavDrawerItem HomeItem { get; set; }
|
|
170
|
-
IgbNavDrawerItem SearchItem { get; set; }
|
|
119
|
+
IgbNavDrawer DrawerRef { get; set; } = default!;
|
|
120
|
+
IgbNavDrawerItem HomeItem { get; set; } = default!;
|
|
121
|
+
IgbNavDrawerItem SearchItem { get; set; } = default!;
|
|
171
122
|
|
|
172
|
-
|
|
123
|
+
Task ToggleDrawer() => DrawerRef.ToggleAsync();
|
|
173
124
|
|
|
174
125
|
void Activate(IgbNavDrawerItem item)
|
|
175
126
|
{
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
i.Active = false;
|
|
127
|
+
HomeItem.Active = SearchItem.Active = false;
|
|
128
|
+
item.Active = true; // no automatic selection tracking
|
|
179
129
|
}
|
|
180
130
|
}
|
|
181
131
|
```
|
|
182
132
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
```razor
|
|
186
|
-
<IgbNavbar>
|
|
187
|
-
<IgbIconButton slot="start" IconName="menu" Collection="material" @onclick="() => DrawerRef.Show()" />
|
|
188
|
-
<span>Home</span>
|
|
189
|
-
</IgbNavbar>
|
|
190
|
-
|
|
191
|
-
<IgbNavDrawer @ref="DrawerRef" Open="true" Position="NavDrawerPosition.Start">
|
|
192
|
-
<IgbNavDrawerHeaderItem>Navigation</IgbNavDrawerHeaderItem>
|
|
193
|
-
|
|
194
|
-
<IgbNavDrawerItem @ref="HomeItem" @onclick="() => Activate(HomeItem)">
|
|
195
|
-
<IgbIcon slot="icon" IconName="home" Collection="material" />
|
|
196
|
-
<span slot="content">Home</span>
|
|
197
|
-
</IgbNavDrawerItem>
|
|
198
|
-
|
|
199
|
-
<IgbNavDrawerItem @ref="SearchItem" @onclick="() => Activate(SearchItem)">
|
|
200
|
-
<IgbIcon slot="icon" IconName="search" Collection="material" />
|
|
201
|
-
<span slot="content">Search</span>
|
|
202
|
-
</IgbNavDrawerItem>
|
|
203
|
-
</IgbNavDrawer>
|
|
204
|
-
```
|
|
133
|
+
`IgbNavDrawer`: `Open`, `Position`, `KeepOpenOnEscape`, `ShowAsync()` / `HideAsync()` / `ToggleAsync()`, `Closing` / `Closed`. `IgbNavDrawerItem`: `Active`, `Disabled`, `icon` and `content` slots.
|
|
205
134
|
|
|
206
|
-
|
|
135
|
+
**Overlay vs pinned sidebar.** `Position` is `Start | End | Top | Bottom | Relative`. With the first four the drawer is `position: fixed` and floats over the page with a dimming overlay. **`NavDrawerPosition.Relative` makes it a pinned, in-flow sidebar**: the panel becomes `position: relative`, the overlay is hidden, and closing it slides the panel out by a negative margin instead of leaving a gap. Use that instead of overriding `::part(base)` by hand.
|
|
207
136
|
|
|
208
137
|
```razor
|
|
209
|
-
<
|
|
210
|
-
<
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<IgbIcon slot="icon" IconName="home" Collection="material" />
|
|
214
|
-
<span slot="content">Home</span>
|
|
215
|
-
</IgbNavDrawerItem>
|
|
216
|
-
|
|
217
|
-
<div slot="mini">
|
|
218
|
-
<IgbNavDrawerItem>
|
|
219
|
-
<IgbIcon slot="icon" IconName="home" Collection="material" />
|
|
220
|
-
</IgbNavDrawerItem>
|
|
221
|
-
</div>
|
|
222
|
-
</IgbNavDrawer>
|
|
138
|
+
<div class="app-shell">
|
|
139
|
+
<IgbNavDrawer Open="true" Position="NavDrawerPosition.Relative">...</IgbNavDrawer>
|
|
140
|
+
<main>@Body</main>
|
|
141
|
+
</div>
|
|
223
142
|
```
|
|
224
143
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
> - `Open="true"` alone makes the panel visible but it still floats over content as an overlay.
|
|
231
|
-
> - `slot="mini"` content switches the component to a collapsible expand/collapse mode with an icon-only collapsed state.
|
|
232
|
-
> - To make the drawer occupy real space in the layout (pinned sidebar), the shadow DOM parts must be overridden in **global CSS** (not `.razor.css`): give the host an explicit width, override `::part(base)` to `position: relative; transform: none`, hide `::part(overlay)`, and remove the `inert` attribute via JS in `OnAfterRenderAsync`. Do **not** call `DrawerRef.Show()` in `OnAfterRenderAsync` - it throws "component not ready"; CSS handles visibility instead.
|
|
233
|
-
|
|
234
|
-
> **AGENT INSTRUCTION:** Icons used inside `IgbNavDrawerItem` must be registered via `IgbIcon.RegisterIconFromTextAsync()` or `RegisterIconAsync()` in `OnAfterRenderAsync(bool firstRender)` before they display. Call `await iconRef.EnsureReady()` first.
|
|
144
|
+
```css
|
|
145
|
+
/* global CSS or .razor.css — plain custom properties, no ::part needed */
|
|
146
|
+
igc-nav-drawer { --menu-full-width: 260px; --menu-mini-width: 60px; }
|
|
147
|
+
.app-shell { display: flex; height: 100vh; }
|
|
148
|
+
```
|
|
235
149
|
|
|
236
|
-
|
|
150
|
+
Width comes from the `--menu-full-width` custom property (default `15rem`); the collapsed icon rail uses `--menu-mini-width`. Content in `slot="mini"` renders whenever the drawer is closed, giving an expand/collapse rail. Do not call `ShowAsync()` from `OnAfterRenderAsync` — the component is not ready yet; drive visibility with `Open`.
|
|
237
151
|
|
|
238
152
|
## Tree
|
|
239
153
|
|
|
240
|
-
```csharp
|
|
241
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbTreeModule), typeof(IgbTreeItemModule));
|
|
242
|
-
```
|
|
243
|
-
|
|
244
154
|
```razor
|
|
245
|
-
<IgbTree Selection="TreeSelection.Multiple"
|
|
155
|
+
<IgbTree Selection="TreeSelection.Multiple" SingleBranchExpand="true"
|
|
156
|
+
SelectionChanged="OnSelectionChanged">
|
|
246
157
|
<IgbTreeItem Expanded="true" Label="Documents">
|
|
247
158
|
<IgbTreeItem Label="Report.docx" />
|
|
248
159
|
<IgbTreeItem Label="Notes.txt" />
|
|
@@ -251,13 +162,25 @@ builder.Services.AddIgniteUIBlazor(typeof(IgbTreeModule), typeof(IgbTreeItemModu
|
|
|
251
162
|
<IgbTreeItem Label="archive.zip" />
|
|
252
163
|
</IgbTreeItem>
|
|
253
164
|
</IgbTree>
|
|
165
|
+
|
|
166
|
+
@code {
|
|
167
|
+
void OnSelectionChanged(IgbTreeSelectionEventArgs e) { }
|
|
168
|
+
}
|
|
254
169
|
```
|
|
255
170
|
|
|
256
|
-
|
|
171
|
+
`IgbTree`: `Selection` (`None | Multiple | Cascade`), `SingleBranchExpand`, `ToggleNodeOnClick`, `SelectionChanged`, `ItemExpanding` / `ItemExpanded` / `ItemCollapsing` / `ItemCollapsed`.
|
|
172
|
+
`IgbTreeItem`: `Label`, `Value`, `Expanded`, `Selected`, `Active`, `Disabled`, `Loading`, `Level`, `Parent`, `ExpandAsync()` / `CollapseAsync()` / `ToggleAsync()`.
|
|
257
173
|
|
|
258
|
-
##
|
|
174
|
+
## Splitter & Divider
|
|
175
|
+
|
|
176
|
+
```razor
|
|
177
|
+
<IgbSplitter Orientation="SplitterOrientation.Horizontal" StartSize="280px" StartMinSize="180px">
|
|
178
|
+
<div slot="start">Sidebar</div>
|
|
179
|
+
<div slot="end">Content</div>
|
|
180
|
+
</IgbSplitter>
|
|
181
|
+
|
|
182
|
+
<IgbDivider LineType="DividerType.Solid" Middle="true" />
|
|
183
|
+
```
|
|
259
184
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
3. **Register icons via `RegisterIconFromTextAsync` in `OnAfterRenderAsync(bool firstRender)`**, and always call `await component.EnsureReady()` first.
|
|
263
|
-
4. **`IgbAccordion` with `SingleExpand="true"` closes other panels when one is opened.** This is the most common use case for accordions.
|
|
185
|
+
`IgbSplitter`: `Orientation`, `StartSize` / `EndSize`, `StartMinSize` / `StartMaxSize` / `EndMinSize` / `EndMaxSize`, `DisableResize`, `DisableCollapse`, `HideDragHandle`, `HideCollapseButtons`, `ToggleAsync(PanePosition)`.
|
|
186
|
+
`IgbDivider`: `Vertical`, `Middle`, `LineType`.
|
|
@@ -1,214 +1,105 @@
|
|
|
1
1
|
# Application Setup & Registration
|
|
2
2
|
|
|
3
|
-
|
|
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
|
|
3
|
+
## 1. NuGet package
|
|
19
4
|
|
|
20
5
|
```bash
|
|
21
|
-
# OSS
|
|
22
|
-
dotnet add package IgniteUI.Blazor.
|
|
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
|
|
6
|
+
dotnet add package IgniteUI.Blazor.Lite # OSS core UI components (MIT)
|
|
7
|
+
dotnet add package IgniteUI.Blazor.GridLite # OSS lightweight grid (MIT)
|
|
8
|
+
dotnet add package IgniteUI.Blazor.Trial # full suite, watermarked
|
|
34
9
|
```
|
|
35
10
|
|
|
36
|
-
Licensed users
|
|
11
|
+
Licensed users add the Infragistics feed once, then install `IgniteUI.Blazor`:
|
|
37
12
|
|
|
38
13
|
```bash
|
|
39
|
-
# Add the Infragistics feed first (one-time)
|
|
40
14
|
nuget sources add -name "Infragistics" \
|
|
41
15
|
-source "https://packages.infragistics.com/nuget/licensed/v3/index.json" \
|
|
42
|
-
-username "your@email.com"
|
|
43
|
-
-password "your-password"
|
|
16
|
+
-username "your@email.com" -password "your-password"
|
|
44
17
|
|
|
45
18
|
dotnet add package IgniteUI.Blazor
|
|
46
19
|
```
|
|
47
20
|
|
|
48
|
-
|
|
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.
|
|
21
|
+
Never reference `IgniteUI.Blazor` and `IgniteUI.Blazor.Lite` together — same namespace, duplicate types.
|
|
58
22
|
|
|
59
|
-
|
|
23
|
+
## 2. `IgniteUI.Blazor[.Lite/Trial]` Service Registration
|
|
60
24
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Blazor Server (.NET 6+)
|
|
25
|
+
Usually in `Program.cs`:
|
|
64
26
|
|
|
65
27
|
```csharp
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
builder.Services.AddRazorPages();
|
|
69
|
-
builder.Services.AddServerSideBlazor();
|
|
70
|
-
builder.Services.AddIgniteUIBlazor(); // registers ALL modules
|
|
71
|
-
|
|
72
|
-
var app = builder.Build();
|
|
28
|
+
builder.Services.AddIgniteUIBlazor(); // all modules available
|
|
73
29
|
```
|
|
74
30
|
|
|
75
|
-
|
|
31
|
+
Pass `typeof(Igb<Name>Module)` values to eagerly pre-load a specific set instead:
|
|
76
32
|
|
|
77
33
|
```csharp
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
builder.Services.AddIgniteUIBlazor();
|
|
81
|
-
|
|
82
|
-
await builder.Build().RunAsync();
|
|
34
|
+
builder.Services.AddIgniteUIBlazor(
|
|
35
|
+
typeof(IgbInputModule), typeof(IgbComboModule), typeof(IgbDialogModule));
|
|
83
36
|
```
|
|
84
37
|
|
|
85
|
-
|
|
38
|
+
Module names always follow `Igb{ComponentName}Module`. In `IgniteUI.Blazor.Lite` a component registers its own module on first render, so the explicit list trims the initial payload rather than gating rendering.
|
|
39
|
+
|
|
40
|
+
**Blazor Web App:** call `AddIgniteUIBlazor()` in **both** the server and the client `Program.cs`.
|
|
86
41
|
|
|
87
42
|
```csharp
|
|
88
|
-
// Server
|
|
43
|
+
// Server
|
|
89
44
|
builder.Services.AddRazorComponents()
|
|
90
45
|
.AddInteractiveServerComponents()
|
|
91
46
|
.AddInteractiveWebAssemblyComponents();
|
|
92
47
|
builder.Services.AddIgniteUIBlazor();
|
|
93
48
|
|
|
94
|
-
// Client
|
|
95
|
-
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
49
|
+
// Client (WebAssemblyHostBuilder)
|
|
96
50
|
builder.Services.AddIgniteUIBlazor();
|
|
97
|
-
await builder.Build().RunAsync();
|
|
98
51
|
```
|
|
99
52
|
|
|
100
|
-
|
|
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:
|
|
53
|
+
## 3. `_Imports.razor`
|
|
117
54
|
|
|
118
55
|
```razor
|
|
119
56
|
@using IgniteUI.Blazor.Controls
|
|
120
57
|
```
|
|
121
58
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
---
|
|
59
|
+
Add it to both `_Imports.razor` files in split Blazor Web App solutions.
|
|
125
60
|
|
|
126
|
-
## CSS
|
|
61
|
+
## 4. Host page — CSS and script
|
|
127
62
|
|
|
128
|
-
|
|
129
|
-
- **Blazor Server / Web App**: `Pages/_Host.cshtml` or `Components/App.razor`
|
|
130
|
-
- **Blazor WASM**: `wwwroot/index.html`
|
|
63
|
+
Host page is `wwwroot/index.html` (WASM/MAUI), `Pages/_Host.cshtml` (Server), or `Components/App.razor` (Web App).
|
|
131
64
|
|
|
132
65
|
```html
|
|
133
66
|
<link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />
|
|
67
|
+
...
|
|
68
|
+
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
|
|
69
|
+
<script src="_framework/blazor.web.js"></script> <!-- or blazor.server.js / blazor.webassembly.js / blazor.webview.js -->
|
|
134
70
|
```
|
|
135
71
|
|
|
136
|
-
|
|
72
|
+
Both tags are required: without the stylesheet components render unstyled, without `app.bundle.js` they do not render at all. `app.bundle.js` must come **before** the Blazor framework script.
|
|
137
73
|
|
|
138
|
-
|
|
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 |
|
|
74
|
+
Theme files under `_content/IgniteUI.Blazor/themes/` are `{light|dark}/{bootstrap|material|fluent|indigo}.css` — link exactly one.
|
|
148
75
|
|
|
149
|
-
|
|
76
|
+
.NET 9+ Web App projects can use the fingerprinted asset collection:
|
|
150
77
|
|
|
151
78
|
```razor
|
|
152
79
|
<link rel="stylesheet" href="@Assets["_content/IgniteUI.Blazor/themes/light/bootstrap.css"]" />
|
|
153
80
|
```
|
|
154
81
|
|
|
155
|
-
|
|
82
|
+
`IgniteUI.Blazor.GridLite` ships its own stylesheet from its own asset root, but should be used only if you are using the GridLite component exclusively. If you are using other Ignite UI components, do not link (or suggest) the GridLite stylesheet — use the main theme stylesheet above instead.
|
|
156
83
|
|
|
157
84
|
```html
|
|
158
85
|
<link href="_content/IgniteUI.Blazor.GridLite/css/themes/light/bootstrap.css" rel="stylesheet" />
|
|
159
86
|
```
|
|
160
87
|
|
|
161
|
-
|
|
88
|
+
## 5. Render mode (Blazor Web App only)
|
|
162
89
|
|
|
163
|
-
|
|
90
|
+
Ignite UI components need an interactive render mode; static SSR renders nothing usable.
|
|
164
91
|
|
|
165
|
-
|
|
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>
|
|
92
|
+
```razor
|
|
93
|
+
@rendermode InteractiveServer @* or InteractiveWebAssembly / InteractiveAuto *@
|
|
175
94
|
```
|
|
176
95
|
|
|
177
|
-
|
|
96
|
+
Or globally in `App.razor`: `<Routes @rendermode="InteractiveAuto" />`.
|
|
178
97
|
|
|
179
|
-
## Project
|
|
98
|
+
## Project type reference
|
|
180
99
|
|
|
181
|
-
| Project type |
|
|
100
|
+
| Project type | Builder | Host page | Framework script |
|
|
182
101
|
|---|---|---|---|
|
|
183
|
-
|
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
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.
|
|
102
|
+
| Blazor Server | `WebApplication.CreateBuilder` | `Pages/_Host.cshtml` | `blazor.server.js` |
|
|
103
|
+
| Blazor WASM | `WebAssemblyHostBuilder` | `wwwroot/index.html` | `blazor.webassembly.js` |
|
|
104
|
+
| Blazor Web App | both server + client | `Components/App.razor` | `blazor.web.js` |
|
|
105
|
+
| MAUI Blazor Hybrid | `MauiApp.CreateBuilder` | `wwwroot/index.html` | `blazor.webview.js` |
|