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,297 +1,139 @@
|
|
|
1
|
-
# Form Controls
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- [Select](#select)
|
|
11
|
-
- [Date Picker](#date-picker)
|
|
12
|
-
- [Date Range Picker](#date-range-picker)
|
|
13
|
-
- [Calendar](#calendar)
|
|
14
|
-
- [Date Time Input](#date-time-input)
|
|
15
|
-
- [Mask Input](#mask-input)
|
|
16
|
-
- [Checkbox](#checkbox)
|
|
17
|
-
- [Radio / Radio Group](#radio--radio-group)
|
|
18
|
-
- [Switch](#switch)
|
|
19
|
-
- [Slider / Range Slider](#slider--range-slider)
|
|
20
|
-
- [Rating](#rating)
|
|
21
|
-
- [Form & Binding Notes](#form--binding-notes)
|
|
22
|
-
- [Key Rules](#key-rules)
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Overview
|
|
27
|
-
This reference gives high-level guidance on form controls, 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.
|
|
28
|
-
|
|
29
|
-
## Input
|
|
30
|
-
|
|
31
|
-
```csharp
|
|
32
|
-
// Program.cs
|
|
33
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbInputModule));
|
|
34
|
-
```
|
|
1
|
+
# Form Controls
|
|
2
|
+
|
|
3
|
+
Module for every component below is `Igb<Name>Module` (`IgbInputModule`, `IgbComboModule`, …); `IgbSlider` and `IgbRangeSlider` have separate modules. Registration is covered in [`setup.md`](./setup.md).
|
|
4
|
+
|
|
5
|
+
Verify exact members with `get_api_reference` / `get_doc` when the MCP server is available — the tables here list the members these controls are normally driven by, not their full API.
|
|
6
|
+
|
|
7
|
+
## Text inputs
|
|
8
|
+
|
|
9
|
+
`IgbInput` and `IgbTextarea` share a base: `Label`, `Placeholder`, `Outlined`, `Disabled`, `Required`, `Invalid`, plus `Value` / `ValueChanged`.
|
|
35
10
|
|
|
36
11
|
```razor
|
|
37
12
|
<IgbInput @bind-Value="UserName" Label="Username" Placeholder="e.g. John Doe">
|
|
38
|
-
<
|
|
13
|
+
<IgbIcon slot="prefix" IconName="person" Collection="material" />
|
|
39
14
|
</IgbInput>
|
|
40
15
|
|
|
41
|
-
@
|
|
42
|
-
string UserName { get; set; } = "";
|
|
43
|
-
}
|
|
16
|
+
<IgbTextarea @bind-Value="Notes" Label="Notes" Rows="4" Resize="TextareaResize.Vertical" />
|
|
44
17
|
```
|
|
45
18
|
|
|
46
|
-
|
|
19
|
+
| Member | Type | Notes |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `Value` / `@bind-Value` | `string` | The correct way to read and write the value |
|
|
22
|
+
| `DisplayType` | `InputType` | `IgbInput` only — text, password, email, number, … |
|
|
23
|
+
| `InputOcurred` | `EventCallback<IgbComponentValueChangedEventArgs>` | Fires while typing (name is spelled with one `c`) |
|
|
24
|
+
| `Change` | `EventCallback<IgbComponentValueChangedEventArgs>` | Fires on commit / blur |
|
|
25
|
+
| `Focus`, `Blur` | `EventCallback<IgbVoidEventArgs>` | |
|
|
26
|
+
| `Rows`, `Resize`, `Wrap`, `MaxLength` | | `IgbTextarea` only |
|
|
47
27
|
|
|
48
|
-
|
|
28
|
+
`IgbInput` has **no** `GetValueAsync()`. Bind with `@bind-Value` instead of reading imperatively.
|
|
49
29
|
|
|
50
|
-
|
|
30
|
+
Icons in `prefix` / `suffix` slots must be `IgbIcon`. A `<span class="material-icons">` is `display: inline`, so `vertical-align` is ignored inside the slot's flex box and the glyph drifts to the top.
|
|
51
31
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## Combo Box
|
|
32
|
+
## Mask Input
|
|
55
33
|
|
|
56
|
-
```
|
|
57
|
-
|
|
34
|
+
```razor
|
|
35
|
+
<IgbMaskInput @bind-Value="Phone" Mask="(000) 000-0000" Label="Phone Number" Prompt="_" />
|
|
58
36
|
```
|
|
59
37
|
|
|
38
|
+
`0` = digit, `L` = letter, `A` = alphanumeric. `ValueMode` (`MaskInputValueMode`) selects whether `Value` includes the literal mask characters.
|
|
39
|
+
|
|
40
|
+
## Combo Box
|
|
41
|
+
|
|
60
42
|
```razor
|
|
61
|
-
<IgbCombo T="
|
|
62
|
-
|
|
63
|
-
ValueKey="Id"
|
|
64
|
-
DisplayKey="Name"
|
|
65
|
-
Label="Select Cities"
|
|
66
|
-
Placeholder="Pick a city" />
|
|
43
|
+
<IgbCombo T="City" Data="Cities" ValueKey="Id" DisplayKey="Name"
|
|
44
|
+
Label="Select Cities" Placeholder="Pick a city" />
|
|
67
45
|
|
|
68
46
|
@code {
|
|
69
47
|
private List<City> Cities = SampleData.Cities;
|
|
70
|
-
|
|
71
48
|
record City(string Id, string Name, string Country);
|
|
72
49
|
}
|
|
73
50
|
```
|
|
74
51
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
---
|
|
52
|
+
The generic parameter is **`T`**, not `TValue` — set it to the data item type. `IgbCombo` does not participate in a plain HTML `<form>`; bind its value explicitly.
|
|
78
53
|
|
|
79
54
|
## Select
|
|
80
55
|
|
|
81
|
-
```csharp
|
|
82
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbSelectModule));
|
|
83
|
-
```
|
|
84
|
-
|
|
85
56
|
```razor
|
|
86
|
-
<IgbSelect Label="Fruit" Placeholder="Choose a fruit">
|
|
57
|
+
<IgbSelect @bind-Value="Fruit" Label="Fruit" Placeholder="Choose a fruit">
|
|
87
58
|
<IgbSelectItem Value="apple">Apple</IgbSelectItem>
|
|
88
59
|
<IgbSelectItem Value="orange">Orange</IgbSelectItem>
|
|
89
|
-
<IgbSelectItem Value="banana">Banana</IgbSelectItem>
|
|
90
60
|
</IgbSelect>
|
|
91
61
|
```
|
|
92
62
|
|
|
93
|
-
|
|
63
|
+
`Value` is `string?`. `Change` carries `IgbSelectItemComponentEventArgs`. `IgbSelectHeader` and `IgbSelectGroup` add section headings and grouping.
|
|
94
64
|
|
|
95
|
-
## Date
|
|
65
|
+
## Date and time
|
|
96
66
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
67
|
+
| Component | Value type | Use for |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `IgbDatePicker` | `DateTime?` | Input + dropdown calendar |
|
|
70
|
+
| `IgbDateRangePicker` | `IgbDateRangeValue?` | Start/end range; `UseTwoInputs`, `UsePredefinedRanges` |
|
|
71
|
+
| `IgbCalendar` | `DateTime` | Always-visible calendar surface |
|
|
72
|
+
| `IgbDateTimeInput` | `DateTime?` | Masked date/time entry, no dropdown |
|
|
100
73
|
|
|
101
74
|
```razor
|
|
102
|
-
<IgbDatePicker @
|
|
75
|
+
<IgbDatePicker @bind-Value="SelectedDate" Label="Start date" Min="@MinDate" Max="@MaxDate" />
|
|
103
76
|
|
|
104
|
-
@
|
|
105
|
-
|
|
106
|
-
public DateTime SelectedDate { get; set; } = DateTime.Today;
|
|
107
|
-
}
|
|
108
|
-
```
|
|
77
|
+
<IgbCalendar @bind-Value="CalendarValue" Selection="CalendarSelection.Single"
|
|
78
|
+
VisibleMonths="2" ShowWeekNumbers="true" WeekStart="WeekDays.Monday" />
|
|
109
79
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
## Date Range Picker
|
|
113
|
-
|
|
114
|
-
```csharp
|
|
115
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbDateRangePickerModule));
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
```razor
|
|
119
|
-
<IgbDateRangePicker @ref="RangePicker" />
|
|
120
|
-
|
|
121
|
-
@code {
|
|
122
|
-
public IgbDateRangePicker RangePicker { get; set; }
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Calendar
|
|
129
|
-
|
|
130
|
-
```csharp
|
|
131
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbCalendarModule));
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
```razor
|
|
135
|
-
<IgbCalendar />
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Use Calendar when the UI needs an always-visible date picker rather than an input/dropdown picker. For multiple selection, range selection, special dates, disabled dates, visible months, week numbers, and localization, use the exact property names from the `calendar` MCP doc before writing markup.
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Date Time Input
|
|
143
|
-
|
|
144
|
-
```csharp
|
|
145
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbDateTimeInputModule));
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
```razor
|
|
149
|
-
<IgbDateTimeInput @bind-Value="SelectedDateTime"
|
|
150
|
-
InputFormat="MM/dd/yyyy HH:mm"
|
|
151
|
-
SpinLoop="true" />
|
|
80
|
+
<IgbDateTimeInput @bind-Value="SelectedDateTime" InputFormat="MM/dd/yyyy HH:mm" SpinLoop="true" />
|
|
152
81
|
|
|
153
82
|
@code {
|
|
154
|
-
|
|
83
|
+
DateTime? SelectedDate { get; set; } // picker / date-time input are nullable
|
|
84
|
+
DateTime CalendarValue { get; set; } = DateTime.Today; // IgbCalendar.Value is non-nullable
|
|
85
|
+
DateTime? SelectedDateTime { get; set; } = DateTime.Now;
|
|
155
86
|
}
|
|
156
87
|
```
|
|
157
88
|
|
|
158
|
-
|
|
89
|
+
`IgbCalendar.Value` is a non-nullable `DateTime`; the pickers are nullable. Multi and range calendar selection come from `Selection` (`CalendarSelection.Single | Multiple | Range`).
|
|
159
90
|
|
|
160
|
-
##
|
|
91
|
+
## Checkbox, Switch, Radio
|
|
161
92
|
|
|
162
|
-
|
|
163
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbMaskInputModule));
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
```razor
|
|
167
|
-
<IgbMaskInput Mask="(000) 000-0000"
|
|
168
|
-
Label="Phone Number"
|
|
169
|
-
Placeholder="(555) 123-4567" />
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Checkbox
|
|
175
|
-
|
|
176
|
-
```csharp
|
|
177
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbCheckboxModule));
|
|
178
|
-
```
|
|
93
|
+
`IgbCheckbox` and `IgbSwitch` share a base: `Checked` / `@bind-Checked`, `Value`, `LabelPosition`, `Disabled`, `Required`, `Invalid`, and a `Change` carrying `IgbCheckboxChangeEventArgs`. `IgbCheckbox` adds `Indeterminate`.
|
|
179
94
|
|
|
180
95
|
```razor
|
|
181
96
|
<IgbCheckbox @bind-Checked="IsSubscribed">Subscribe to newsletter</IgbCheckbox>
|
|
97
|
+
<IgbSwitch @bind-Checked="IsDarkMode">Dark Mode</IgbSwitch>
|
|
182
98
|
|
|
183
|
-
@
|
|
184
|
-
bool IsSubscribed { get; set; }
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Radio / Radio Group
|
|
191
|
-
|
|
192
|
-
```csharp
|
|
193
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbRadioModule), typeof(IgbRadioGroupModule));
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
```razor
|
|
197
|
-
<IgbRadioGroup Alignment="@ContentOrientation.Vertical" Name="plan">
|
|
99
|
+
<IgbRadioGroup @bind-Value="Plan" Alignment="ContentOrientation.Vertical">
|
|
198
100
|
<IgbRadio Value="basic">Basic</IgbRadio>
|
|
199
101
|
<IgbRadio Value="pro">Pro</IgbRadio>
|
|
200
102
|
<IgbRadio Value="enterprise">Enterprise</IgbRadio>
|
|
201
103
|
</IgbRadioGroup>
|
|
202
104
|
```
|
|
203
105
|
|
|
204
|
-
|
|
106
|
+
Radios are grouped by being children of `IgbRadioGroup`, and the selected option is the group's `Value`. Do **not** set `Name` to group them — `Name` is the framework's element identity, not the HTML radio name.
|
|
205
107
|
|
|
206
|
-
##
|
|
207
|
-
|
|
208
|
-
```csharp
|
|
209
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbSwitchModule));
|
|
210
|
-
```
|
|
108
|
+
## Slider, Range Slider, Rating
|
|
211
109
|
|
|
212
110
|
```razor
|
|
213
|
-
<
|
|
111
|
+
<IgbSlider @bind-Value="Volume" Min="0" Max="100" Step="5" Change="OnSliderChange" />
|
|
112
|
+
<IgbRangeSlider Lower="20" Upper="70" Min="0" Max="100" Change="OnRangeChange" />
|
|
113
|
+
<IgbRating @bind-Value="StarRating" Max="5" AllowReset="true" />
|
|
214
114
|
|
|
215
115
|
@code {
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## Slider / Range Slider
|
|
223
|
-
|
|
224
|
-
```csharp
|
|
225
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbSliderModule), typeof(IgbRangeSliderModule));
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
```razor
|
|
229
|
-
<!-- Single value -->
|
|
230
|
-
<IgbSlider Value="40" Min="0" Max="100" Step="5" Change="OnSliderChange" />
|
|
231
|
-
|
|
232
|
-
<!-- Range -->
|
|
233
|
-
<IgbRangeSlider Lower="20" Upper="70" Change="OnRangeChange" />
|
|
116
|
+
double Volume { get; set; } = 40;
|
|
117
|
+
double StarRating { get; set; } = 3;
|
|
234
118
|
|
|
235
|
-
@code {
|
|
236
119
|
void OnSliderChange(IgbNumberEventArgs e) => Console.WriteLine(e.Detail);
|
|
237
120
|
void OnRangeChange(IgbRangeSliderValueEventArgs e)
|
|
238
|
-
|
|
239
|
-
var lower = e.Detail.Lower;
|
|
240
|
-
var upper = e.Detail.Upper;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Rating
|
|
248
|
-
|
|
249
|
-
```csharp
|
|
250
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbRatingModule));
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
```razor
|
|
254
|
-
<IgbRating @bind-Value="StarRating" Max="5" />
|
|
255
|
-
|
|
256
|
-
@code {
|
|
257
|
-
double StarRating { get; set; } = 3;
|
|
121
|
+
=> Console.WriteLine($"{e.Detail.Lower}-{e.Detail.Upper}");
|
|
258
122
|
}
|
|
259
123
|
```
|
|
260
124
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
## Form & Binding Notes
|
|
125
|
+
`Min`, `Max`, `Step`, `LowerBound`, `UpperBound`, `PrimaryTicks`, `SecondaryTicks`, `DiscreteTrack` and the label/tooltip options come from the shared slider base and apply to both sliders. `IgbRangeSlider` uses `Lower` / `Upper` instead of `Value`. `IgbRating.Value` and `IgbSlider.Value` are `double`.
|
|
264
126
|
|
|
265
|
-
|
|
127
|
+
## Binding and validation
|
|
266
128
|
|
|
267
129
|
```razor
|
|
268
|
-
<IgbInput @bind-Value="Model.Name" Label="Name" Required="true" />
|
|
130
|
+
<IgbInput @bind-Value="Model.Name" Label="Name" Required="true" Invalid="@(!IsNameValid)" />
|
|
269
131
|
<IgbCheckbox @bind-Checked="Model.Agreed">I agree to the terms</IgbCheckbox>
|
|
270
|
-
<IgbSelect @bind-Value="Model.Country" Label="Country"
|
|
132
|
+
<IgbSelect @bind-Value="Model.Country" Label="Country">
|
|
271
133
|
<IgbSelectItem Value="us">United States</IgbSelectItem>
|
|
272
134
|
<IgbSelectItem Value="uk">United Kingdom</IgbSelectItem>
|
|
273
135
|
</IgbSelect>
|
|
274
|
-
|
|
275
|
-
@code {
|
|
276
|
-
public class FormModel
|
|
277
|
-
{
|
|
278
|
-
[Required] public string Name { get; set; } = "";
|
|
279
|
-
public bool Agreed { get; set; }
|
|
280
|
-
public string Country { get; set; } = "";
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
FormModel Model = new();
|
|
284
|
-
|
|
285
|
-
void Save() { /* validate and persist Model using the pattern required by your app */ }
|
|
286
|
-
}
|
|
287
136
|
```
|
|
288
137
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
## Key Rules
|
|
292
|
-
|
|
293
|
-
1. **Do not wrap Ignite UI inputs in a standard HTML `<form>` unless the component doc shows that pattern.** Form behavior differs by component.
|
|
294
|
-
2. **Register every module you use in `Program.cs`** using the `typeof(Igb{Name}Module)` pattern.
|
|
295
|
-
3. **`IgbCombo` requires the `T` type parameter** - set it to the type of your `ValueKey` property, or `"object"` if there is no `ValueKey`.
|
|
296
|
-
4. **Use `@bind-Value` / `@bind-Checked` for two-way data binding** in Blazor. Never call `GetValueAsync()` to read a field value - that method does not exist on `IgbInput`.
|
|
297
|
-
5. **`IgbSlider` and `IgbRangeSlider` have separate modules** - register both if you use range sliders.
|
|
138
|
+
- Drive every control through `@bind-Value` / `@bind-Checked`; the `Change` events are for reacting, not for reading state.
|
|
139
|
+
- Surface validation with the `Invalid` parameter and your own model validation. Do not assume a component participates in a plain HTML `<form>` — `IgbCombo` and `IgbRadio` do not.
|
|
@@ -1,49 +1,56 @@
|
|
|
1
|
-
# Layout
|
|
1
|
+
# Layout Managers — Tile Manager & Dock Manager
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
| Component | Package | Use for |
|
|
4
|
+
|---|---|---|
|
|
5
|
+
| `IgbTileManager` | `IgniteUI.Blazor.Lite` or full | Resizable, draggable widget dashboard on a CSS grid |
|
|
6
|
+
| `IgbDockManager` | `IgniteUI.Blazor` / `.Trial` only | IDE-style dockable, floating, pinnable panes |
|
|
5
7
|
|
|
6
|
-
##
|
|
8
|
+
## Tile Manager
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
```razor
|
|
11
|
+
<IgbTileManager @ref="TilesRef" ColumnCount="4" Gap="8px"
|
|
12
|
+
MinColumnWidth="220px" MinRowHeight="140px"
|
|
13
|
+
ResizeMode="TileManagerResizeMode.Always"
|
|
14
|
+
DragMode="TileManagerDragMode.TileHeader">
|
|
15
|
+
<IgbTile ColSpan="2" RowSpan="1">
|
|
16
|
+
<span slot="title">Revenue</span>
|
|
17
|
+
<!-- tile content -->
|
|
18
|
+
</IgbTile>
|
|
19
|
+
<IgbTile ColSpan="1" RowSpan="2" DisableResize="true">
|
|
20
|
+
<span slot="title">KPIs</span>
|
|
21
|
+
</IgbTile>
|
|
22
|
+
</IgbTileManager>
|
|
13
23
|
|
|
14
|
-
|
|
24
|
+
@code {
|
|
25
|
+
IgbTileManager TilesRef { get; set; } = default!;
|
|
15
26
|
|
|
16
|
-
|
|
17
|
-
|
|
27
|
+
Task<string> Save() => TilesRef.SaveLayoutAsync();
|
|
28
|
+
Task Restore(string json) => TilesRef.LoadLayoutAsync(json);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
18
31
|
|
|
19
|
-
|
|
32
|
+
`IgbTileManager`: `ColumnCount`, `Gap`, `MinColumnWidth`, `MinRowHeight`, `ResizeMode` (`None | Hover | Always`), `DragMode` (`None | TileHeader | Tile`), `SaveLayoutAsync()` / `LoadLayoutAsync(json)`, plus `TileDragStart` / `TileDragEnd` / `TileMaximize` / `TileFullscreen` events.
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
`IgbTile`: `ColSpan`, `RowSpan`, `ColStart`, `RowStart`, `Position`, `Maximized`, `DisableResize`, `DisableMaximize`, `DisableFullscreen`, `GetFullscreenAsync()`, and a `title` slot.
|
|
22
35
|
|
|
23
|
-
|
|
24
|
-
// In Program.cs or Startup.cs
|
|
25
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbDockManagerModule));
|
|
26
|
-
```
|
|
36
|
+
The saved layout stores tile geometry and state only — tile **content** always stays in the Razor markup.
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
## Dock Manager
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
Requires `IgniteUI.Blazor` or `IgniteUI.Blazor.Trial` and `IgbDockManagerModule`. Pane structure is a C# object graph on the `Layout` parameter; pane bodies are projected through named slots matched by `ContentId`.
|
|
31
41
|
|
|
32
42
|
```razor
|
|
33
43
|
<IgbDockManager @ref="DockRef" Layout="DockLayout" style="height: 600px;">
|
|
34
|
-
<!-- Content slots - the slot name matches IgbContentPane.ContentId -->
|
|
35
44
|
<div slot="panel1">Panel 1 Content</div>
|
|
36
45
|
<div slot="panel2">Panel 2 Content</div>
|
|
37
46
|
<div slot="panel3">Panel 3 Content</div>
|
|
38
47
|
</IgbDockManager>
|
|
39
48
|
|
|
40
49
|
@code {
|
|
41
|
-
IgbDockManager DockRef { get; set; }
|
|
50
|
+
IgbDockManager DockRef { get; set; } = default!;
|
|
42
51
|
|
|
43
|
-
// IgbDockManagerLayout
|
|
44
|
-
|
|
45
|
-
// FloatingPanes (IgbSplitPaneCollection) - initially floating panes
|
|
46
|
-
IgbDockManagerLayout DockLayout { get; set; } = new IgbDockManagerLayout
|
|
52
|
+
// IgbDockManagerLayout: RootPane (IgbSplitPane) + FloatingPanes (IgbSplitPaneCollection)
|
|
53
|
+
IgbDockManagerLayout DockLayout { get; set; } = new()
|
|
47
54
|
{
|
|
48
55
|
RootPane = new IgbSplitPane
|
|
49
56
|
{
|
|
@@ -56,73 +63,17 @@ Dock Manager uses a C# layout object graph to define pane structure. Pane conten
|
|
|
56
63
|
PaneType = DockManagerPaneType.TabGroupPane,
|
|
57
64
|
Panes = new()
|
|
58
65
|
{
|
|
59
|
-
new IgbContentPane
|
|
60
|
-
{
|
|
61
|
-
PaneType = DockManagerPaneType.ContentPane,
|
|
62
|
-
ContentId = "panel1",
|
|
63
|
-
Header = "Panel 1"
|
|
64
|
-
},
|
|
65
|
-
new IgbContentPane
|
|
66
|
-
{
|
|
67
|
-
PaneType = DockManagerPaneType.ContentPane,
|
|
68
|
-
ContentId = "panel2",
|
|
69
|
-
Header = "Panel 2"
|
|
70
|
-
}
|
|
66
|
+
new IgbContentPane { PaneType = DockManagerPaneType.ContentPane, ContentId = "panel1", Header = "Panel 1" },
|
|
67
|
+
new IgbContentPane { PaneType = DockManagerPaneType.ContentPane, ContentId = "panel2", Header = "Panel 2" }
|
|
71
68
|
}
|
|
72
69
|
},
|
|
73
|
-
new IgbContentPane
|
|
74
|
-
{
|
|
75
|
-
PaneType = DockManagerPaneType.ContentPane,
|
|
76
|
-
ContentId = "panel3",
|
|
77
|
-
Header = "Panel 3",
|
|
78
|
-
Size = 250
|
|
79
|
-
}
|
|
70
|
+
new IgbContentPane { PaneType = DockManagerPaneType.ContentPane, ContentId = "panel3", Header = "Panel 3", Size = 250 }
|
|
80
71
|
}
|
|
81
72
|
}
|
|
82
73
|
};
|
|
83
74
|
}
|
|
84
75
|
```
|
|
85
76
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
> **AGENT INSTRUCTION - Layout serialization:** The serialized JSON contains only pane structure and positions. It does **not** serialize the slot content. The slot content markup must remain static in the Razor template; only pane arrangement changes at runtime.
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Tile Manager
|
|
95
|
-
|
|
96
|
-
Tile Manager provides a resizable, draggable tile/widget dashboard layout.
|
|
97
|
-
|
|
98
|
-
```csharp
|
|
99
|
-
builder.Services.AddIgniteUIBlazor(typeof(IgbTileManagerModule));
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
```razor
|
|
103
|
-
<IgbTileManager ColumnCount="4" Gap="8px" ResizeMode="@TileManagerResizeMode.Always" DragMode="@TileManagerDragMode.TileHeader">
|
|
104
|
-
<IgbTile ColSpan="2" RowSpan="1">
|
|
105
|
-
<span slot="title">Revenue Chart</span>
|
|
106
|
-
<!-- tile content -->
|
|
107
|
-
</IgbTile>
|
|
108
|
-
<IgbTile ColSpan="1" RowSpan="2">
|
|
109
|
-
<span slot="title">KPIs</span>
|
|
110
|
-
<!-- tile content -->
|
|
111
|
-
</IgbTile>
|
|
112
|
-
<IgbTile ColSpan="1">
|
|
113
|
-
<span slot="title">Recent Orders</span>
|
|
114
|
-
<!-- tile content -->
|
|
115
|
-
</IgbTile>
|
|
116
|
-
</IgbTileManager>
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## Key Rules
|
|
122
|
-
|
|
123
|
-
1. **`IgbContentPane.ContentId` must exactly match the `slot` attribute of the projected HTML element.** A mismatch causes the pane to render empty.
|
|
124
|
-
2. **Dock Manager must have an explicit height** (via CSS or inline style). Without a height it renders as 0px.
|
|
125
|
-
3. **Layout serialization only persists structure, not content.** Slot content is always defined in Razor markup.
|
|
126
|
-
4. **`IgbTileManager` uses CSS Grid internally.** Set `ColumnCount` to control the number of columns.
|
|
127
|
-
5. **Do not invent Dock Manager serialization APIs.** Use `dock-manager` and the installed API before writing persistence code.
|
|
128
|
-
6. **Tile Manager serialization uses `SaveLayout()` / `LoadLayout(string)`.** The saved payload stores tile layout properties, not tile content.
|
|
77
|
+
- `IgbContentPane.ContentId` must match the projected element's `slot` exactly, or the pane renders empty.
|
|
78
|
+
- The Dock Manager needs an explicit height; without one it collapses to 0px.
|
|
79
|
+
- Layout persistence is version-sensitive. Check the installed API before writing serialization code — only pane structure and positions round-trip, never the slot content.
|