@iress-oss/ids-mcp-server 6.0.0-alpha.1-canary-20251204032753-fe18cab → 6.0.0-alpha.1-canary-20251204040305-3639454
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/generated/docs/components_components-alert-docs.md +1054 -0
- package/generated/docs/components_components-autocomplete-docs.md +3304 -0
- package/generated/docs/components_components-autocomplete-recipes-docs.md +98 -0
- package/generated/docs/components_components-badge-docs.md +312 -0
- package/generated/docs/components_components-button-docs.md +2339 -0
- package/generated/docs/components_components-buttongroup-docs.md +980 -0
- package/generated/docs/components_components-card-docs.md +1970 -0
- package/generated/docs/components_components-checkbox-docs.md +1083 -0
- package/generated/docs/components_components-checkboxgroup-docs.md +1597 -0
- package/generated/docs/components_components-checkboxgroup-recipes-docs.md +209 -0
- package/generated/docs/components_components-col-docs.md +755 -0
- package/generated/docs/components_components-container-docs.md +172 -0
- package/generated/docs/components_components-divider-docs.md +235 -0
- package/generated/docs/components_components-expander-docs.md +428 -0
- package/generated/docs/components_components-field-docs.md +3345 -0
- package/generated/docs/components_components-filter-docs.md +4091 -0
- package/generated/docs/components_components-hide-docs.md +450 -0
- package/generated/docs/components_components-icon-docs.md +1017 -0
- package/generated/docs/components_components-image-docs.md +168 -0
- package/generated/docs/components_components-inline-docs.md +1962 -0
- package/generated/docs/components_components-input-docs.md +1388 -0
- package/generated/docs/components_components-input-recipes-docs.md +349 -0
- package/generated/docs/components_components-inputcurrency-docs.md +636 -0
- package/generated/docs/components_components-inputcurrency-recipes-docs.md +208 -0
- package/generated/docs/components_components-introduction-docs.md +448 -0
- package/generated/docs/components_components-label-docs.md +229 -0
- package/generated/docs/components_components-link-docs.md +454 -0
- package/generated/docs/components_components-menu-docs.md +2219 -0
- package/generated/docs/components_components-menu-menuitem-docs.md +1455 -0
- package/generated/docs/components_components-modal-docs.md +2002 -0
- package/generated/docs/components_components-panel-docs.md +342 -0
- package/generated/docs/components_components-placeholder-docs.md +98 -0
- package/generated/docs/components_components-popover-docs.md +1631 -0
- package/generated/docs/components_components-popover-recipes-docs.md +537 -0
- package/generated/docs/components_components-progress-docs.md +128 -0
- package/generated/docs/components_components-provider-docs.md +123 -0
- package/generated/docs/components_components-radio-docs.md +499 -0
- package/generated/docs/components_components-radiogroup-docs.md +1573 -0
- package/generated/docs/components_components-readonly-docs.md +277 -0
- package/generated/docs/components_components-richselect-docs.md +6101 -0
- package/generated/docs/components_components-row-docs.md +2172 -0
- package/generated/docs/components_components-select-docs.md +1110 -0
- package/generated/docs/components_components-skeleton-docs.md +467 -0
- package/generated/docs/components_components-skeleton-recipes-docs.md +110 -0
- package/generated/docs/components_components-skiplink-docs.md +220 -0
- package/generated/docs/components_components-slideout-docs.md +1910 -0
- package/generated/docs/components_components-slider-docs.md +1284 -0
- package/generated/docs/components_components-spinner-docs.md +90 -0
- package/generated/docs/components_components-stack-docs.md +730 -0
- package/generated/docs/components_components-table-docs.md +4038 -0
- package/generated/docs/components_components-tabset-docs.md +955 -0
- package/generated/docs/components_components-tabset-tab-docs.md +342 -0
- package/generated/docs/components_components-tag-docs.md +410 -0
- package/generated/docs/components_components-text-docs.md +593 -0
- package/generated/docs/components_components-toaster-docs.md +451 -0
- package/generated/docs/components_components-toggle-docs.md +513 -0
- package/generated/docs/components_components-tooltip-docs.md +564 -0
- package/generated/docs/components_components-validationmessage-docs.md +608 -0
- package/generated/docs/components_contact-us-docs.md +9 -0
- package/generated/docs/components_foundations-accessibility-docs.md +33 -0
- package/generated/docs/components_foundations-consistency-docs.md +44 -0
- package/generated/docs/components_foundations-content-docs.md +18 -0
- package/generated/docs/components_foundations-introduction-docs.md +17 -0
- package/generated/docs/components_foundations-principles-docs.md +60 -0
- package/generated/docs/components_foundations-responsive-layout-docs.md +2692 -0
- package/generated/docs/components_foundations-user-experience-docs.md +53 -0
- package/generated/docs/components_foundations-visual-design-docs.md +39 -0
- package/generated/docs/components_foundations-z-index-stacking-docs.md +288 -0
- package/generated/docs/components_frequently-asked-questions-docs.md +44 -0
- package/generated/docs/components_get-started-develop-docs.md +47 -0
- package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
- package/generated/docs/components_introduction-docs.md +85 -0
- package/generated/docs/components_patterns-form-docs.md +2469 -0
- package/generated/docs/components_patterns-form-recipes-docs.md +1597 -0
- package/generated/docs/components_patterns-introduction-docs.md +31 -0
- package/generated/docs/components_patterns-loading-docs.md +1908 -0
- package/generated/docs/components_patterns-shadow-docs.md +195 -0
- package/generated/docs/components_resources-code-katas-docs.md +25 -0
- package/generated/docs/components_resources-introduction-docs.md +28 -0
- package/generated/docs/components_resources-mcp-server-docs.md +23 -0
- package/generated/docs/components_resources-migration-guides-from-v4-to-v5-docs.md +142 -0
- package/generated/docs/components_styling-props-colour-docs.md +91 -0
- package/generated/docs/components_styling-props-elevation-docs.md +69 -0
- package/generated/docs/components_styling-props-radius-docs.md +63 -0
- package/generated/docs/components_styling-props-reference-docs.md +160 -0
- package/generated/docs/components_styling-props-screen-readers-docs.md +66 -0
- package/generated/docs/components_styling-props-sizing-docs.md +217 -0
- package/generated/docs/components_styling-props-spacing-docs.md +545 -0
- package/generated/docs/components_styling-props-typography-docs.md +66 -0
- package/generated/docs/components_versions-docs.md +14 -0
- package/generated/docs/guidelines.md +3083 -0
- package/generated/docs/introduction-docs.md +37 -0
- package/generated/docs/tokens_colour-docs.md +479 -0
- package/generated/docs/tokens_elevation-docs.md +39 -0
- package/generated/docs/tokens_introduction-docs.md +150 -0
- package/generated/docs/tokens_radius-docs.md +67 -0
- package/generated/docs/tokens_spacing-docs.md +87 -0
- package/generated/docs/tokens_typography-docs.md +305 -0
- package/package.json +2 -2
|
@@ -0,0 +1,1455 @@
|
|
|
1
|
+
Menu Item
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
Menu items are headings, buttons and dividers used inside an \`IressMenu\`
|
|
8
|
+
|
|
9
|
+
* * *
|
|
10
|
+
|
|
11
|
+
Updated
|
|
12
|
+
|
|
13
|
+
**Recently updated**
|
|
14
|
+
|
|
15
|
+
This component has been recently updated with new props. The props have been marked as beta. Please tell us if there are any issues.
|
|
16
|
+
|
|
17
|
+
[](./iframe.html?id=components-menu-menuitem--unselected)
|
|
18
|
+
|
|
19
|
+
Menu item
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<IressMenuItem\>
|
|
24
|
+
Menu item
|
|
25
|
+
</IressMenuItem\>
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Props
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
| Name | Description | Default | Control |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| append |
|
|
35
|
+
Section after menu item content.
|
|
36
|
+
|
|
37
|
+
ReactNode
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
| \- | Set object |
|
|
42
|
+
| canToggle |
|
|
43
|
+
|
|
44
|
+
When true, the item can be toggled even in single-select mode.
|
|
45
|
+
|
|
46
|
+
boolean
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
| \- | Set boolean |
|
|
51
|
+
| children |
|
|
52
|
+
|
|
53
|
+
The children to be rendered inside the menu item, describing the action.
|
|
54
|
+
|
|
55
|
+
ReactNode
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
| \- |
|
|
60
|
+
|
|
61
|
+
"Menu item"
|
|
62
|
+
|
|
63
|
+
|
|
|
64
|
+
| className |
|
|
65
|
+
|
|
66
|
+
The class name to be applied to the menu item.
|
|
67
|
+
|
|
68
|
+
string
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
| \- | Set string |
|
|
73
|
+
| divider |
|
|
74
|
+
|
|
75
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
76
|
+
|
|
77
|
+
boolean
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
| \- | Set boolean |
|
|
82
|
+
| element |
|
|
83
|
+
|
|
84
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
85
|
+
|
|
86
|
+
C
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
| \- | Set object |
|
|
91
|
+
| href |
|
|
92
|
+
|
|
93
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
94
|
+
|
|
95
|
+
THref
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
| \- | Set object |
|
|
100
|
+
| loading |
|
|
101
|
+
|
|
102
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
103
|
+
|
|
104
|
+
union
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
| \- | Set object |
|
|
109
|
+
| onBlur |
|
|
110
|
+
|
|
111
|
+
Emitted when the menu item is blurred.
|
|
112
|
+
|
|
113
|
+
FocusEventHandler
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
| \- | Set object |
|
|
118
|
+
| onClick |
|
|
119
|
+
|
|
120
|
+
Emitted when the menu item is clicked.
|
|
121
|
+
|
|
122
|
+
MouseEventHandler
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
| \- | Set object |
|
|
127
|
+
| onKeyDown |
|
|
128
|
+
|
|
129
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
130
|
+
|
|
131
|
+
KeyboardEventHandler
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
| \- | Set object |
|
|
136
|
+
| prepend |
|
|
137
|
+
|
|
138
|
+
Section before menu item content.
|
|
139
|
+
|
|
140
|
+
ReactNode
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
| \- | Set object |
|
|
145
|
+
| selected |
|
|
146
|
+
|
|
147
|
+
When true, shows the item in selected state.
|
|
148
|
+
|
|
149
|
+
boolean
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
| \- | Set boolean |
|
|
154
|
+
| value |
|
|
155
|
+
|
|
156
|
+
To be used when menu type is listbox.
|
|
157
|
+
|
|
158
|
+
FormControlValue
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
| \- | Set object |
|
|
163
|
+
|
|
164
|
+
Examples
|
|
165
|
+
--------
|
|
166
|
+
|
|
167
|
+
### Selected
|
|
168
|
+
|
|
169
|
+
The `IressMenuItem` can be set to selected using the `selected` prop.
|
|
170
|
+
|
|
171
|
+
**Note:** If you are using `IressMenu` with a `role` of `listbox`, you should use the `defaultSelected` or `selected` prop on the `IressMenu` to set the selected state of its `<IressMenuItem />` children, as the `selected` prop will be ignored.
|
|
172
|
+
|
|
173
|
+
[](./iframe.html?id=components-menu-menuitem--selected)
|
|
174
|
+
|
|
175
|
+
Menu item
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
<IressMenuItem selected\>
|
|
180
|
+
Menu item
|
|
181
|
+
</IressMenuItem\>
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### Props
|
|
186
|
+
|
|
187
|
+
| Name | Description | Default | Control |
|
|
188
|
+
| --- | --- | --- | --- |
|
|
189
|
+
| append |
|
|
190
|
+
Section after menu item content.
|
|
191
|
+
|
|
192
|
+
ReactNode
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
| \- | Set object |
|
|
197
|
+
| canToggle |
|
|
198
|
+
|
|
199
|
+
When true, the item can be toggled even in single-select mode.
|
|
200
|
+
|
|
201
|
+
boolean
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
| \- | Set boolean |
|
|
206
|
+
| children |
|
|
207
|
+
|
|
208
|
+
The children to be rendered inside the menu item, describing the action.
|
|
209
|
+
|
|
210
|
+
ReactNode
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
| \- |
|
|
215
|
+
|
|
216
|
+
"Menu item"
|
|
217
|
+
|
|
218
|
+
|
|
|
219
|
+
| className |
|
|
220
|
+
|
|
221
|
+
The class name to be applied to the menu item.
|
|
222
|
+
|
|
223
|
+
string
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
| \- | Set string |
|
|
228
|
+
| divider |
|
|
229
|
+
|
|
230
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
231
|
+
|
|
232
|
+
boolean
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
| \- | Set boolean |
|
|
237
|
+
| element |
|
|
238
|
+
|
|
239
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
240
|
+
|
|
241
|
+
C
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
| \- | Set object |
|
|
246
|
+
| href |
|
|
247
|
+
|
|
248
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
249
|
+
|
|
250
|
+
THref
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
| \- | Set object |
|
|
255
|
+
| loading |
|
|
256
|
+
|
|
257
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
258
|
+
|
|
259
|
+
union
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
| \- | Set object |
|
|
264
|
+
| onBlur |
|
|
265
|
+
|
|
266
|
+
Emitted when the menu item is blurred.
|
|
267
|
+
|
|
268
|
+
FocusEventHandler
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
| \- | Set object |
|
|
273
|
+
| onClick |
|
|
274
|
+
|
|
275
|
+
Emitted when the menu item is clicked.
|
|
276
|
+
|
|
277
|
+
MouseEventHandler
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
| \- | Set object |
|
|
282
|
+
| onKeyDown |
|
|
283
|
+
|
|
284
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
285
|
+
|
|
286
|
+
KeyboardEventHandler
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
| \- | Set object |
|
|
291
|
+
| prepend |
|
|
292
|
+
|
|
293
|
+
Section before menu item content.
|
|
294
|
+
|
|
295
|
+
ReactNode
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
| \- | Set object |
|
|
300
|
+
| selected |
|
|
301
|
+
|
|
302
|
+
When true, shows the item in selected state.
|
|
303
|
+
|
|
304
|
+
boolean
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
| \- | FalseTrue |
|
|
309
|
+
| value |
|
|
310
|
+
|
|
311
|
+
To be used when menu type is listbox.
|
|
312
|
+
|
|
313
|
+
FormControlValue
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
| \- | Set object |
|
|
318
|
+
|
|
319
|
+
### Value
|
|
320
|
+
|
|
321
|
+
A menu item can have a unique value set to it, used to determine its selected state in a `IressMenu` component with a `role` of `listbox`. The value is not visible to end users.
|
|
322
|
+
|
|
323
|
+
[](./iframe.html?id=components-menu-menuitem--value)
|
|
324
|
+
|
|
325
|
+
Menu item with value
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
<IressMenu role\="listbox"\>
|
|
330
|
+
<IressMenuItem value\={9}\>
|
|
331
|
+
Menu item with value </IressMenuItem\>
|
|
332
|
+
</IressMenu\>
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
#### Props
|
|
337
|
+
|
|
338
|
+
| Name | Description | Default | Control |
|
|
339
|
+
| --- | --- | --- | --- |
|
|
340
|
+
| append |
|
|
341
|
+
Section after menu item content.
|
|
342
|
+
|
|
343
|
+
ReactNode
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
| \- | Set object |
|
|
348
|
+
| canToggle |
|
|
349
|
+
|
|
350
|
+
When true, the item can be toggled even in single-select mode.
|
|
351
|
+
|
|
352
|
+
boolean
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
| \- | Set boolean |
|
|
357
|
+
| children |
|
|
358
|
+
|
|
359
|
+
The children to be rendered inside the menu item, describing the action.
|
|
360
|
+
|
|
361
|
+
ReactNode
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
| \- |
|
|
366
|
+
|
|
367
|
+
"Menu item with value"
|
|
368
|
+
|
|
369
|
+
|
|
|
370
|
+
| className |
|
|
371
|
+
|
|
372
|
+
The class name to be applied to the menu item.
|
|
373
|
+
|
|
374
|
+
string
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
| \- | Set string |
|
|
379
|
+
| divider |
|
|
380
|
+
|
|
381
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
382
|
+
|
|
383
|
+
boolean
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
| \- | Set boolean |
|
|
388
|
+
| element |
|
|
389
|
+
|
|
390
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
391
|
+
|
|
392
|
+
C
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
| \- | Set object |
|
|
397
|
+
| href |
|
|
398
|
+
|
|
399
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
400
|
+
|
|
401
|
+
THref
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
| \- | Set object |
|
|
406
|
+
| loading |
|
|
407
|
+
|
|
408
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
409
|
+
|
|
410
|
+
union
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
| \- | Set object |
|
|
415
|
+
| onBlur |
|
|
416
|
+
|
|
417
|
+
Emitted when the menu item is blurred.
|
|
418
|
+
|
|
419
|
+
FocusEventHandler
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
| \- | Set object |
|
|
424
|
+
| onClick |
|
|
425
|
+
|
|
426
|
+
Emitted when the menu item is clicked.
|
|
427
|
+
|
|
428
|
+
MouseEventHandler
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
| \- | Set object |
|
|
433
|
+
| onKeyDown |
|
|
434
|
+
|
|
435
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
436
|
+
|
|
437
|
+
KeyboardEventHandler
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
| \- | Set object |
|
|
442
|
+
| prepend |
|
|
443
|
+
|
|
444
|
+
Section before menu item content.
|
|
445
|
+
|
|
446
|
+
ReactNode
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
| \- | Set object |
|
|
451
|
+
| selected |
|
|
452
|
+
|
|
453
|
+
When true, shows the item in selected state.
|
|
454
|
+
|
|
455
|
+
boolean
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
| \- | Set boolean |
|
|
460
|
+
| value |
|
|
461
|
+
|
|
462
|
+
To be used when menu type is listbox.
|
|
463
|
+
|
|
464
|
+
FormControlValue
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
| \- |
|
|
469
|
+
|
|
470
|
+
9
|
|
471
|
+
|
|
472
|
+
|
|
|
473
|
+
|
|
474
|
+
### `canToggle`
|
|
475
|
+
|
|
476
|
+
When `canToggle` is set to true, the menu item can be toggled between selected and unselected states. This only works in a `IressMenu` component with a `role` of `listbox`.
|
|
477
|
+
|
|
478
|
+
[](./iframe.html?id=components-menu-menuitem--can-toggle)
|
|
479
|
+
|
|
480
|
+
Menu item with value
|
|
481
|
+
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
<IressMenu role\="listbox"\>
|
|
485
|
+
<IressMenuItem
|
|
486
|
+
canToggle
|
|
487
|
+
value\={9}
|
|
488
|
+
\>
|
|
489
|
+
Menu item with value </IressMenuItem\>
|
|
490
|
+
</IressMenu\>
|
|
491
|
+
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
#### Props
|
|
495
|
+
|
|
496
|
+
| Name | Description | Default | Control |
|
|
497
|
+
| --- | --- | --- | --- |
|
|
498
|
+
| append |
|
|
499
|
+
Section after menu item content.
|
|
500
|
+
|
|
501
|
+
ReactNode
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
| \- | Set object |
|
|
506
|
+
| canToggle |
|
|
507
|
+
|
|
508
|
+
When true, the item can be toggled even in single-select mode.
|
|
509
|
+
|
|
510
|
+
boolean
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
| \- | FalseTrue |
|
|
515
|
+
| children |
|
|
516
|
+
|
|
517
|
+
The children to be rendered inside the menu item, describing the action.
|
|
518
|
+
|
|
519
|
+
ReactNode
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
| \- |
|
|
524
|
+
|
|
525
|
+
"Menu item with value"
|
|
526
|
+
|
|
527
|
+
|
|
|
528
|
+
| className |
|
|
529
|
+
|
|
530
|
+
The class name to be applied to the menu item.
|
|
531
|
+
|
|
532
|
+
string
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
| \- | Set string |
|
|
537
|
+
| divider |
|
|
538
|
+
|
|
539
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
540
|
+
|
|
541
|
+
boolean
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
| \- | Set boolean |
|
|
546
|
+
| element |
|
|
547
|
+
|
|
548
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
549
|
+
|
|
550
|
+
C
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
| \- | Set object |
|
|
555
|
+
| href |
|
|
556
|
+
|
|
557
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
558
|
+
|
|
559
|
+
THref
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
| \- | Set object |
|
|
564
|
+
| loading |
|
|
565
|
+
|
|
566
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
567
|
+
|
|
568
|
+
union
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
| \- | Set object |
|
|
573
|
+
| onBlur |
|
|
574
|
+
|
|
575
|
+
Emitted when the menu item is blurred.
|
|
576
|
+
|
|
577
|
+
FocusEventHandler
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
| \- | Set object |
|
|
582
|
+
| onClick |
|
|
583
|
+
|
|
584
|
+
Emitted when the menu item is clicked.
|
|
585
|
+
|
|
586
|
+
MouseEventHandler
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
| \- | Set object |
|
|
591
|
+
| onKeyDown |
|
|
592
|
+
|
|
593
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
594
|
+
|
|
595
|
+
KeyboardEventHandler
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
| \- | Set object |
|
|
600
|
+
| prepend |
|
|
601
|
+
|
|
602
|
+
Section before menu item content.
|
|
603
|
+
|
|
604
|
+
ReactNode
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
| \- | Set object |
|
|
609
|
+
| selected |
|
|
610
|
+
|
|
611
|
+
When true, shows the item in selected state.
|
|
612
|
+
|
|
613
|
+
boolean
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
| \- | Set boolean |
|
|
618
|
+
| value |
|
|
619
|
+
|
|
620
|
+
To be used when menu type is listbox.
|
|
621
|
+
|
|
622
|
+
FormControlValue
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
| \- |
|
|
627
|
+
|
|
628
|
+
9
|
|
629
|
+
|
|
630
|
+
|
|
|
631
|
+
|
|
632
|
+
### Prepend and append
|
|
633
|
+
|
|
634
|
+
You can prepend and append content to a menu item using the `prepend` and `append` props.
|
|
635
|
+
|
|
636
|
+
[](./iframe.html?id=components-menu-menuitem--prepend-and-append)
|
|
637
|
+
|
|
638
|
+
Menu itemNew
|
|
639
|
+
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
<IressMenuItem
|
|
643
|
+
append\={<IressBadge mode\="success"\>New</IressBadge\>}
|
|
644
|
+
prepend\={<IressIcon name\="home" />}
|
|
645
|
+
\>
|
|
646
|
+
Menu item
|
|
647
|
+
</IressMenuItem\>
|
|
648
|
+
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
#### Props
|
|
652
|
+
|
|
653
|
+
| Name | Description | Default | Control |
|
|
654
|
+
| --- | --- | --- | --- |
|
|
655
|
+
| append |
|
|
656
|
+
Section after menu item content.
|
|
657
|
+
|
|
658
|
+
ReactNode
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
| \- |
|
|
663
|
+
|
|
664
|
+
RAW
|
|
665
|
+
|
|
666
|
+
append :
|
|
667
|
+
|
|
668
|
+
{
|
|
669
|
+
|
|
670
|
+
* $$typeof : Symbol(react.transitional.element)
|
|
671
|
+
* type : ({ children, mode = "neutral", pill, className, host, ...restProps }) => { const classes = badgeStyles.raw({ mode, pill, host: !!host }); const \[styleProps, nonStyleProps\] = splitCssProps(restProps); const badge = /\* @\_\_PURE\_\_ \*/ jsxDEV( styled.span, { ...nonStyleProps, className: cx( css(classes.root, classes.badge, styleProps), className, GlobalCSSClass.Badge ), children }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/Badge/Badge.tsx", lineNumber: 43, columnNumber: 3 }, this ); return host ? /\* @\_\_PURE\_\_ \*/ jsxDEV( "div", { className: css(classes.host), "data-testid": propagateTestid(restProps\["data-testid"\], "host"), children: \[ host, badge \] }, void 0, true, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/Badge/Badge.tsx", lineNumber: 56, columnNumber: 3 }, this ) : badge; }
|
|
672
|
+
* key : null
|
|
673
|
+
* props :
|
|
674
|
+
|
|
675
|
+
{...} 2 keys
|
|
676
|
+
|
|
677
|
+
* \_owner : null
|
|
678
|
+
* \_store :
|
|
679
|
+
|
|
680
|
+
{...} 0 keys
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
|
692
|
+
| canToggle |
|
|
693
|
+
|
|
694
|
+
When true, the item can be toggled even in single-select mode.
|
|
695
|
+
|
|
696
|
+
boolean
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
| \- | Set boolean |
|
|
701
|
+
| children |
|
|
702
|
+
|
|
703
|
+
The children to be rendered inside the menu item, describing the action.
|
|
704
|
+
|
|
705
|
+
ReactNode
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
| \- |
|
|
710
|
+
|
|
711
|
+
"Menu item"
|
|
712
|
+
|
|
713
|
+
|
|
|
714
|
+
| className |
|
|
715
|
+
|
|
716
|
+
The class name to be applied to the menu item.
|
|
717
|
+
|
|
718
|
+
string
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
| \- | Set string |
|
|
723
|
+
| divider |
|
|
724
|
+
|
|
725
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
726
|
+
|
|
727
|
+
boolean
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
| \- | Set boolean |
|
|
732
|
+
| element |
|
|
733
|
+
|
|
734
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
735
|
+
|
|
736
|
+
C
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
| \- | Set object |
|
|
741
|
+
| href |
|
|
742
|
+
|
|
743
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
744
|
+
|
|
745
|
+
THref
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
| \- | Set object |
|
|
750
|
+
| loading |
|
|
751
|
+
|
|
752
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
753
|
+
|
|
754
|
+
union
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
| \- | Set object |
|
|
759
|
+
| onBlur |
|
|
760
|
+
|
|
761
|
+
Emitted when the menu item is blurred.
|
|
762
|
+
|
|
763
|
+
FocusEventHandler
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
| \- | Set object |
|
|
768
|
+
| onClick |
|
|
769
|
+
|
|
770
|
+
Emitted when the menu item is clicked.
|
|
771
|
+
|
|
772
|
+
MouseEventHandler
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
| \- | Set object |
|
|
777
|
+
| onKeyDown |
|
|
778
|
+
|
|
779
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
780
|
+
|
|
781
|
+
KeyboardEventHandler
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
| \- | Set object |
|
|
786
|
+
| prepend |
|
|
787
|
+
|
|
788
|
+
Section before menu item content.
|
|
789
|
+
|
|
790
|
+
ReactNode
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
| \- |
|
|
795
|
+
|
|
796
|
+
RAW
|
|
797
|
+
|
|
798
|
+
prepend :
|
|
799
|
+
|
|
800
|
+
{
|
|
801
|
+
|
|
802
|
+
* $$typeof : Symbol(react.transitional.element)
|
|
803
|
+
* type : ({ className, fixedWidth, flip, name, rotate, screenreaderText, set = "fal", spin, ...restProps }) => { const prefix = "fa-"; const classes = icon({ flip, rotate, spin }); return /\* @\_\_PURE\_\_ \*/ jsxDEV( styled.span, { role: "img", className: cx( classes, GlobalCSSClass.Icon, set, \`${prefix}${name}\`, fixedWidth && "fa-fw", className ), "aria-hidden": !screenreaderText && "true", "aria-label": screenreaderText, ...restProps }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/Icon/Icon.tsx", lineNumber: 67, columnNumber: 5 }, this ); }
|
|
804
|
+
* key : null
|
|
805
|
+
* props :
|
|
806
|
+
|
|
807
|
+
{...} 1 key
|
|
808
|
+
|
|
809
|
+
* \_owner : null
|
|
810
|
+
* \_store :
|
|
811
|
+
|
|
812
|
+
{...} 0 keys
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
|
824
|
+
| selected |
|
|
825
|
+
|
|
826
|
+
When true, shows the item in selected state.
|
|
827
|
+
|
|
828
|
+
boolean
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
| \- | Set boolean |
|
|
833
|
+
| value |
|
|
834
|
+
|
|
835
|
+
To be used when menu type is listbox.
|
|
836
|
+
|
|
837
|
+
FormControlValue
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
| \- | Set object |
|
|
842
|
+
|
|
843
|
+
### Multi-select menus
|
|
844
|
+
|
|
845
|
+
Inside a `IressMenu` with a `role` of `listbox` and the `multiSelect` prop set to true, the menu item will display with a checkbox.
|
|
846
|
+
|
|
847
|
+
[](./iframe.html?id=components-menu-menuitem--multi-select)
|
|
848
|
+
|
|
849
|
+
Menu item with valueMenu item with value
|
|
850
|
+
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
<IressMenu
|
|
854
|
+
multiSelect
|
|
855
|
+
role\="listbox"
|
|
856
|
+
\>
|
|
857
|
+
<IressMenuItem value\={9}\>
|
|
858
|
+
Menu item with value </IressMenuItem\>
|
|
859
|
+
<IressMenuItem value\={9}\>
|
|
860
|
+
Menu item with value </IressMenuItem\>
|
|
861
|
+
</IressMenu\>
|
|
862
|
+
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
#### Props
|
|
866
|
+
|
|
867
|
+
| Name | Description | Default | Control |
|
|
868
|
+
| --- | --- | --- | --- |
|
|
869
|
+
| append |
|
|
870
|
+
Section after menu item content.
|
|
871
|
+
|
|
872
|
+
ReactNode
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
| \- | Set object |
|
|
877
|
+
| canToggle |
|
|
878
|
+
|
|
879
|
+
When true, the item can be toggled even in single-select mode.
|
|
880
|
+
|
|
881
|
+
boolean
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
| \- | Set boolean |
|
|
886
|
+
| children |
|
|
887
|
+
|
|
888
|
+
The children to be rendered inside the menu item, describing the action.
|
|
889
|
+
|
|
890
|
+
ReactNode
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
| \- |
|
|
895
|
+
|
|
896
|
+
"Menu item with value"
|
|
897
|
+
|
|
898
|
+
|
|
|
899
|
+
| className |
|
|
900
|
+
|
|
901
|
+
The class name to be applied to the menu item.
|
|
902
|
+
|
|
903
|
+
string
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
| \- | Set string |
|
|
908
|
+
| divider |
|
|
909
|
+
|
|
910
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
911
|
+
|
|
912
|
+
boolean
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
| \- | Set boolean |
|
|
917
|
+
| element |
|
|
918
|
+
|
|
919
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
920
|
+
|
|
921
|
+
C
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
| \- | Set object |
|
|
926
|
+
| href |
|
|
927
|
+
|
|
928
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
929
|
+
|
|
930
|
+
THref
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
| \- | Set object |
|
|
935
|
+
| loading |
|
|
936
|
+
|
|
937
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
938
|
+
|
|
939
|
+
union
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
| \- | Set object |
|
|
944
|
+
| onBlur |
|
|
945
|
+
|
|
946
|
+
Emitted when the menu item is blurred.
|
|
947
|
+
|
|
948
|
+
FocusEventHandler
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
| \- | Set object |
|
|
953
|
+
| onClick |
|
|
954
|
+
|
|
955
|
+
Emitted when the menu item is clicked.
|
|
956
|
+
|
|
957
|
+
MouseEventHandler
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
| \- | Set object |
|
|
962
|
+
| onKeyDown |
|
|
963
|
+
|
|
964
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
965
|
+
|
|
966
|
+
KeyboardEventHandler
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
| \- | Set object |
|
|
971
|
+
| prepend |
|
|
972
|
+
|
|
973
|
+
Section before menu item content.
|
|
974
|
+
|
|
975
|
+
ReactNode
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
| \- | Set object |
|
|
980
|
+
| selected |
|
|
981
|
+
|
|
982
|
+
When true, shows the item in selected state.
|
|
983
|
+
|
|
984
|
+
boolean
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
| \- | Set boolean |
|
|
989
|
+
| value |
|
|
990
|
+
|
|
991
|
+
To be used when menu type is listbox.
|
|
992
|
+
|
|
993
|
+
FormControlValue
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
| \- |
|
|
998
|
+
|
|
999
|
+
9
|
|
1000
|
+
|
|
1001
|
+
|
|
|
1002
|
+
|
|
1003
|
+
### Element
|
|
1004
|
+
|
|
1005
|
+
You can use the `element` prop to render a custom component inside the menu item. This is useful for rendering a component from a third-party library, such as `react-router-dom`.
|
|
1006
|
+
|
|
1007
|
+
[](./iframe.html?id=components-menu-menuitem--element)
|
|
1008
|
+
|
|
1009
|
+
[Iress](https://iress.com)[Google](https://google.com)
|
|
1010
|
+
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
import { IressMenu, IressMenuItem } from '@iress-oss/ids-components';
|
|
1014
|
+
import { type HTMLAttributes } from 'react';
|
|
1015
|
+
/\*\*
|
|
1016
|
+
\* This could be the \`Link\` component from \`react-router-dom\` or any other routing library. \*/
|
|
1017
|
+
const Link \= ({
|
|
1018
|
+
to,
|
|
1019
|
+
...restProps
|
|
1020
|
+
}: Omit<HTMLAttributes<HTMLAnchorElement\>, 'href'\> & { to: string }) \=> (
|
|
1021
|
+
<a {...restProps} href\={to} />
|
|
1022
|
+
);
|
|
1023
|
+
export const RoutingLinkMenu \= () \=> {
|
|
1024
|
+
return (
|
|
1025
|
+
<IressMenu role\="menu" fluid\>
|
|
1026
|
+
<IressMenuItem element\={Link} to\="https://iress.com" selected\>
|
|
1027
|
+
Iress </IressMenuItem\>
|
|
1028
|
+
<IressMenuItem element\={Link} to\="https://google.com"\>
|
|
1029
|
+
Google </IressMenuItem\>
|
|
1030
|
+
</IressMenu\>
|
|
1031
|
+
);
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
#### Props
|
|
1037
|
+
|
|
1038
|
+
| Name | Description | Default | Control |
|
|
1039
|
+
| --- | --- | --- | --- |
|
|
1040
|
+
| append |
|
|
1041
|
+
Section after menu item content.
|
|
1042
|
+
|
|
1043
|
+
ReactNode
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
| \- | Set object |
|
|
1048
|
+
| canToggle |
|
|
1049
|
+
|
|
1050
|
+
When true, the item can be toggled even in single-select mode.
|
|
1051
|
+
|
|
1052
|
+
boolean
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
| \- | Set boolean |
|
|
1057
|
+
| children |
|
|
1058
|
+
|
|
1059
|
+
The children to be rendered inside the menu item, describing the action.
|
|
1060
|
+
|
|
1061
|
+
ReactNode
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
| \- | Set object |
|
|
1066
|
+
| className |
|
|
1067
|
+
|
|
1068
|
+
The class name to be applied to the menu item.
|
|
1069
|
+
|
|
1070
|
+
string
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
| \- | Set string |
|
|
1075
|
+
| divider |
|
|
1076
|
+
|
|
1077
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
1078
|
+
|
|
1079
|
+
boolean
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
| \- | Set boolean |
|
|
1084
|
+
| element |
|
|
1085
|
+
|
|
1086
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
1087
|
+
|
|
1088
|
+
C
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
| \- | Set object |
|
|
1093
|
+
| href |
|
|
1094
|
+
|
|
1095
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
1096
|
+
|
|
1097
|
+
THref
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
| \- | Set object |
|
|
1102
|
+
| loading |
|
|
1103
|
+
|
|
1104
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
1105
|
+
|
|
1106
|
+
union
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
| \- | Set object |
|
|
1111
|
+
| onBlur |
|
|
1112
|
+
|
|
1113
|
+
Emitted when the menu item is blurred.
|
|
1114
|
+
|
|
1115
|
+
FocusEventHandler
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
| \- | Set object |
|
|
1120
|
+
| onClick |
|
|
1121
|
+
|
|
1122
|
+
Emitted when the menu item is clicked.
|
|
1123
|
+
|
|
1124
|
+
MouseEventHandler
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
| \- | Set object |
|
|
1129
|
+
| onKeyDown |
|
|
1130
|
+
|
|
1131
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
1132
|
+
|
|
1133
|
+
KeyboardEventHandler
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
| \- | Set object |
|
|
1138
|
+
| prepend |
|
|
1139
|
+
|
|
1140
|
+
Section before menu item content.
|
|
1141
|
+
|
|
1142
|
+
ReactNode
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
| \- | Set object |
|
|
1147
|
+
| selected |
|
|
1148
|
+
|
|
1149
|
+
When true, shows the item in selected state.
|
|
1150
|
+
|
|
1151
|
+
boolean
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
| \- | Set boolean |
|
|
1156
|
+
| value |
|
|
1157
|
+
|
|
1158
|
+
To be used when menu type is listbox.
|
|
1159
|
+
|
|
1160
|
+
FormControlValue
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
| \- | Set object |
|
|
1165
|
+
|
|
1166
|
+
### Divider
|
|
1167
|
+
|
|
1168
|
+
When `divider` is set to true, the menu item will render with a bottom border.
|
|
1169
|
+
|
|
1170
|
+
[](./iframe.html?id=components-menu-menuitem--divider)
|
|
1171
|
+
|
|
1172
|
+
Menu item with divider
|
|
1173
|
+
|
|
1174
|
+
* * *
|
|
1175
|
+
|
|
1176
|
+
```
|
|
1177
|
+
|
|
1178
|
+
<IressMenuItem divider\>
|
|
1179
|
+
Menu item with divider
|
|
1180
|
+
</IressMenuItem\>
|
|
1181
|
+
|
|
1182
|
+
```
|
|
1183
|
+
|
|
1184
|
+
#### Props
|
|
1185
|
+
|
|
1186
|
+
| Name | Description | Default | Control |
|
|
1187
|
+
| --- | --- | --- | --- |
|
|
1188
|
+
| append |
|
|
1189
|
+
Section after menu item content.
|
|
1190
|
+
|
|
1191
|
+
ReactNode
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
| \- | Set object |
|
|
1196
|
+
| canToggle |
|
|
1197
|
+
|
|
1198
|
+
When true, the item can be toggled even in single-select mode.
|
|
1199
|
+
|
|
1200
|
+
boolean
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
| \- | Set boolean |
|
|
1205
|
+
| children |
|
|
1206
|
+
|
|
1207
|
+
The children to be rendered inside the menu item, describing the action.
|
|
1208
|
+
|
|
1209
|
+
ReactNode
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
| \- |
|
|
1214
|
+
|
|
1215
|
+
"Menu item with divider"
|
|
1216
|
+
|
|
1217
|
+
|
|
|
1218
|
+
| className |
|
|
1219
|
+
|
|
1220
|
+
The class name to be applied to the menu item.
|
|
1221
|
+
|
|
1222
|
+
string
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
| \- | Set string |
|
|
1227
|
+
| divider |
|
|
1228
|
+
|
|
1229
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
1230
|
+
|
|
1231
|
+
boolean
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
| \- | FalseTrue |
|
|
1236
|
+
| element |
|
|
1237
|
+
|
|
1238
|
+
Change the component that will be rendered as the menu item, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
1239
|
+
|
|
1240
|
+
C
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
| \- | Set object |
|
|
1245
|
+
| href |
|
|
1246
|
+
|
|
1247
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set and no `element` was set, an anchor tag will be rendered. Otherwise, a button will be rendered.
|
|
1248
|
+
|
|
1249
|
+
THref
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
| \- | Set object |
|
|
1254
|
+
| loading |
|
|
1255
|
+
|
|
1256
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
1257
|
+
|
|
1258
|
+
union
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
| \- | Set object |
|
|
1263
|
+
| onBlur |
|
|
1264
|
+
|
|
1265
|
+
Emitted when the menu item is blurred.
|
|
1266
|
+
|
|
1267
|
+
FocusEventHandler
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
| \- | Set object |
|
|
1272
|
+
| onClick |
|
|
1273
|
+
|
|
1274
|
+
Emitted when the menu item is clicked.
|
|
1275
|
+
|
|
1276
|
+
MouseEventHandler
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
| \- | Set object |
|
|
1281
|
+
| onKeyDown |
|
|
1282
|
+
|
|
1283
|
+
Emitted when a key is pressed while focused on the menu item.
|
|
1284
|
+
|
|
1285
|
+
KeyboardEventHandler
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
| \- | Set object |
|
|
1290
|
+
| prepend |
|
|
1291
|
+
|
|
1292
|
+
Section before menu item content.
|
|
1293
|
+
|
|
1294
|
+
ReactNode
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
| \- | Set object |
|
|
1299
|
+
| selected |
|
|
1300
|
+
|
|
1301
|
+
When true, shows the item in selected state.
|
|
1302
|
+
|
|
1303
|
+
boolean
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
| \- | Set boolean |
|
|
1308
|
+
| value |
|
|
1309
|
+
|
|
1310
|
+
To be used when menu type is listbox.
|
|
1311
|
+
|
|
1312
|
+
FormControlValue
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
| \- | Set object |
|
|
1317
|
+
|
|
1318
|
+
However, it is recommended to use the `IressMenuDivider` component instead.
|
|
1319
|
+
|
|
1320
|
+
[](./iframe.html?id=components-menu-menuitem-divider--divider)
|
|
1321
|
+
|
|
1322
|
+
* * *
|
|
1323
|
+
|
|
1324
|
+
```
|
|
1325
|
+
|
|
1326
|
+
<IressMenuDivider />
|
|
1327
|
+
|
|
1328
|
+
```
|
|
1329
|
+
|
|
1330
|
+
#### Props
|
|
1331
|
+
|
|
1332
|
+
### Heading
|
|
1333
|
+
|
|
1334
|
+
You can use the `IressMenuHeading` to render headings within a menu. This adds styling so the appropriate padding is applied.
|
|
1335
|
+
|
|
1336
|
+
[](./iframe.html?id=components-menu-menuitem-heading--heading)
|
|
1337
|
+
|
|
1338
|
+
Menu text
|
|
1339
|
+
---------
|
|
1340
|
+
|
|
1341
|
+
```
|
|
1342
|
+
|
|
1343
|
+
<IressMenu\>
|
|
1344
|
+
<IressMenuHeading\>
|
|
1345
|
+
Menu text </IressMenuHeading\>
|
|
1346
|
+
</IressMenu\>
|
|
1347
|
+
|
|
1348
|
+
```
|
|
1349
|
+
|
|
1350
|
+
#### Props
|
|
1351
|
+
|
|
1352
|
+
| Name | Description | Default | Control |
|
|
1353
|
+
| --- | --- | --- | --- |
|
|
1354
|
+
| append |
|
|
1355
|
+
Section after menu item content.
|
|
1356
|
+
|
|
1357
|
+
ReactNode
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
| \- | Set object |
|
|
1362
|
+
| children |
|
|
1363
|
+
|
|
1364
|
+
string
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
| \- | Menu text |
|
|
1369
|
+
| divider |
|
|
1370
|
+
|
|
1371
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
1372
|
+
|
|
1373
|
+
boolean
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
| \- | Set boolean |
|
|
1378
|
+
| element |
|
|
1379
|
+
|
|
1380
|
+
|
|
|
1381
|
+
|
|
1382
|
+
'h2'
|
|
1383
|
+
|
|
1384
|
+
| Set object |
|
|
1385
|
+
| prepend |
|
|
1386
|
+
|
|
1387
|
+
Section before menu item content.
|
|
1388
|
+
|
|
1389
|
+
ReactNode
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
| \- | Set object |
|
|
1394
|
+
| textStyle |
|
|
1395
|
+
|
|
1396
|
+
|
|
|
1397
|
+
|
|
1398
|
+
'typography.heading.4'
|
|
1399
|
+
|
|
1400
|
+
| Set object |
|
|
1401
|
+
|
|
1402
|
+
### Text
|
|
1403
|
+
|
|
1404
|
+
You can use the `IressMenuText` to render other text within a menu. This adds styling so the appropriate padding is applied.
|
|
1405
|
+
|
|
1406
|
+
[](./iframe.html?id=components-menu-menuitem-text--text)
|
|
1407
|
+
|
|
1408
|
+
Menu text
|
|
1409
|
+
|
|
1410
|
+
```
|
|
1411
|
+
|
|
1412
|
+
<IressMenu\>
|
|
1413
|
+
<IressMenuText\>
|
|
1414
|
+
Menu text </IressMenuText\>
|
|
1415
|
+
</IressMenu\>
|
|
1416
|
+
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
#### Props
|
|
1420
|
+
|
|
1421
|
+
| Name | Description | Default | Control |
|
|
1422
|
+
| --- | --- | --- | --- |
|
|
1423
|
+
| append |
|
|
1424
|
+
Section after menu item content.
|
|
1425
|
+
|
|
1426
|
+
ReactNode
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
| \- | Set object |
|
|
1431
|
+
| children |
|
|
1432
|
+
|
|
1433
|
+
string
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
|
|
1437
|
+
| \- | Menu text |
|
|
1438
|
+
| divider |
|
|
1439
|
+
|
|
1440
|
+
Adds a divider after any content. If you would like to add content before the menu item, use a `<hr />` instead.
|
|
1441
|
+
|
|
1442
|
+
boolean
|
|
1443
|
+
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
| \- | Set boolean |
|
|
1447
|
+
| prepend |
|
|
1448
|
+
|
|
1449
|
+
Section before menu item content.
|
|
1450
|
+
|
|
1451
|
+
ReactNode
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
| \- | Set object |
|