@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.
Files changed (99) hide show
  1. package/generated/docs/components_components-alert-docs.md +1054 -0
  2. package/generated/docs/components_components-autocomplete-docs.md +3304 -0
  3. package/generated/docs/components_components-autocomplete-recipes-docs.md +98 -0
  4. package/generated/docs/components_components-badge-docs.md +312 -0
  5. package/generated/docs/components_components-button-docs.md +2339 -0
  6. package/generated/docs/components_components-buttongroup-docs.md +980 -0
  7. package/generated/docs/components_components-card-docs.md +1970 -0
  8. package/generated/docs/components_components-checkbox-docs.md +1083 -0
  9. package/generated/docs/components_components-checkboxgroup-docs.md +1597 -0
  10. package/generated/docs/components_components-checkboxgroup-recipes-docs.md +209 -0
  11. package/generated/docs/components_components-col-docs.md +755 -0
  12. package/generated/docs/components_components-container-docs.md +172 -0
  13. package/generated/docs/components_components-divider-docs.md +235 -0
  14. package/generated/docs/components_components-expander-docs.md +428 -0
  15. package/generated/docs/components_components-field-docs.md +3345 -0
  16. package/generated/docs/components_components-filter-docs.md +4091 -0
  17. package/generated/docs/components_components-hide-docs.md +450 -0
  18. package/generated/docs/components_components-icon-docs.md +1017 -0
  19. package/generated/docs/components_components-image-docs.md +168 -0
  20. package/generated/docs/components_components-inline-docs.md +1962 -0
  21. package/generated/docs/components_components-input-docs.md +1388 -0
  22. package/generated/docs/components_components-input-recipes-docs.md +349 -0
  23. package/generated/docs/components_components-inputcurrency-docs.md +636 -0
  24. package/generated/docs/components_components-inputcurrency-recipes-docs.md +208 -0
  25. package/generated/docs/components_components-introduction-docs.md +448 -0
  26. package/generated/docs/components_components-label-docs.md +229 -0
  27. package/generated/docs/components_components-link-docs.md +454 -0
  28. package/generated/docs/components_components-menu-docs.md +2219 -0
  29. package/generated/docs/components_components-menu-menuitem-docs.md +1455 -0
  30. package/generated/docs/components_components-modal-docs.md +2002 -0
  31. package/generated/docs/components_components-panel-docs.md +342 -0
  32. package/generated/docs/components_components-placeholder-docs.md +98 -0
  33. package/generated/docs/components_components-popover-docs.md +1631 -0
  34. package/generated/docs/components_components-popover-recipes-docs.md +537 -0
  35. package/generated/docs/components_components-progress-docs.md +128 -0
  36. package/generated/docs/components_components-provider-docs.md +123 -0
  37. package/generated/docs/components_components-radio-docs.md +499 -0
  38. package/generated/docs/components_components-radiogroup-docs.md +1573 -0
  39. package/generated/docs/components_components-readonly-docs.md +277 -0
  40. package/generated/docs/components_components-richselect-docs.md +6101 -0
  41. package/generated/docs/components_components-row-docs.md +2172 -0
  42. package/generated/docs/components_components-select-docs.md +1110 -0
  43. package/generated/docs/components_components-skeleton-docs.md +467 -0
  44. package/generated/docs/components_components-skeleton-recipes-docs.md +110 -0
  45. package/generated/docs/components_components-skiplink-docs.md +220 -0
  46. package/generated/docs/components_components-slideout-docs.md +1910 -0
  47. package/generated/docs/components_components-slider-docs.md +1284 -0
  48. package/generated/docs/components_components-spinner-docs.md +90 -0
  49. package/generated/docs/components_components-stack-docs.md +730 -0
  50. package/generated/docs/components_components-table-docs.md +4038 -0
  51. package/generated/docs/components_components-tabset-docs.md +955 -0
  52. package/generated/docs/components_components-tabset-tab-docs.md +342 -0
  53. package/generated/docs/components_components-tag-docs.md +410 -0
  54. package/generated/docs/components_components-text-docs.md +593 -0
  55. package/generated/docs/components_components-toaster-docs.md +451 -0
  56. package/generated/docs/components_components-toggle-docs.md +513 -0
  57. package/generated/docs/components_components-tooltip-docs.md +564 -0
  58. package/generated/docs/components_components-validationmessage-docs.md +608 -0
  59. package/generated/docs/components_contact-us-docs.md +9 -0
  60. package/generated/docs/components_foundations-accessibility-docs.md +33 -0
  61. package/generated/docs/components_foundations-consistency-docs.md +44 -0
  62. package/generated/docs/components_foundations-content-docs.md +18 -0
  63. package/generated/docs/components_foundations-introduction-docs.md +17 -0
  64. package/generated/docs/components_foundations-principles-docs.md +60 -0
  65. package/generated/docs/components_foundations-responsive-layout-docs.md +2692 -0
  66. package/generated/docs/components_foundations-user-experience-docs.md +53 -0
  67. package/generated/docs/components_foundations-visual-design-docs.md +39 -0
  68. package/generated/docs/components_foundations-z-index-stacking-docs.md +288 -0
  69. package/generated/docs/components_frequently-asked-questions-docs.md +44 -0
  70. package/generated/docs/components_get-started-develop-docs.md +47 -0
  71. package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
  72. package/generated/docs/components_introduction-docs.md +85 -0
  73. package/generated/docs/components_patterns-form-docs.md +2469 -0
  74. package/generated/docs/components_patterns-form-recipes-docs.md +1597 -0
  75. package/generated/docs/components_patterns-introduction-docs.md +31 -0
  76. package/generated/docs/components_patterns-loading-docs.md +1908 -0
  77. package/generated/docs/components_patterns-shadow-docs.md +195 -0
  78. package/generated/docs/components_resources-code-katas-docs.md +25 -0
  79. package/generated/docs/components_resources-introduction-docs.md +28 -0
  80. package/generated/docs/components_resources-mcp-server-docs.md +23 -0
  81. package/generated/docs/components_resources-migration-guides-from-v4-to-v5-docs.md +142 -0
  82. package/generated/docs/components_styling-props-colour-docs.md +91 -0
  83. package/generated/docs/components_styling-props-elevation-docs.md +69 -0
  84. package/generated/docs/components_styling-props-radius-docs.md +63 -0
  85. package/generated/docs/components_styling-props-reference-docs.md +160 -0
  86. package/generated/docs/components_styling-props-screen-readers-docs.md +66 -0
  87. package/generated/docs/components_styling-props-sizing-docs.md +217 -0
  88. package/generated/docs/components_styling-props-spacing-docs.md +545 -0
  89. package/generated/docs/components_styling-props-typography-docs.md +66 -0
  90. package/generated/docs/components_versions-docs.md +14 -0
  91. package/generated/docs/guidelines.md +3083 -0
  92. package/generated/docs/introduction-docs.md +37 -0
  93. package/generated/docs/tokens_colour-docs.md +479 -0
  94. package/generated/docs/tokens_elevation-docs.md +39 -0
  95. package/generated/docs/tokens_introduction-docs.md +150 -0
  96. package/generated/docs/tokens_radius-docs.md +67 -0
  97. package/generated/docs/tokens_spacing-docs.md +87 -0
  98. package/generated/docs/tokens_typography-docs.md +305 -0
  99. package/package.json +2 -2
@@ -0,0 +1,3345 @@
1
+ Field
2
+ =====
3
+
4
+ Overview
5
+ --------
6
+
7
+ The field component is used to place label, hint and error information around form controls.
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-field--default)
18
+
19
+ First name
20
+
21
+ ```
22
+
23
+ <IressField label\="First name"\>
24
+ <IressInput
25
+ id\="name"
26
+ name\="input1"
27
+ required
28
+ type\="text"
29
+ />
30
+ </IressField\>
31
+
32
+ ```
33
+
34
+ Props
35
+ -----
36
+
37
+ | Name | Description | Default | Control |
38
+ | --- | --- | --- | --- |
39
+ | children |
40
+ The form control this field is related to.
41
+
42
+ ReactNode
43
+
44
+
45
+
46
+ | \- | \- |
47
+ | error |
48
+
49
+ Validation error to be displayed above the field.
50
+
51
+ ReactNode
52
+
53
+
54
+
55
+ | \- | Set object |
56
+ | errorMessages |
57
+
58
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
59
+
60
+ ValidationMessageObj\[\]
61
+
62
+ | \- | Set object |
63
+ | hint |
64
+
65
+ Text to be displayed as supporting field description.
66
+
67
+ ReactNode
68
+
69
+
70
+
71
+ | \- | Set object |
72
+ | horizontal |
73
+
74
+ Displays the label and input field inline instead of stacked vertically.
75
+
76
+ boolean
77
+
78
+
79
+
80
+ | \- | Set boolean |
81
+ | htmlFor |
82
+
83
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
84
+
85
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
86
+
87
+ unknown
88
+
89
+
90
+
91
+ | \- | Set object |
92
+ | label\* |
93
+
94
+ Text to be displayed in the label.
95
+
96
+ ReactNode
97
+
98
+
99
+
100
+ | \- |
101
+
102
+ "First name"
103
+
104
+ |
105
+ | labelWidth |
106
+
107
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
108
+
109
+ string
110
+
111
+
112
+
113
+ | \- | Set string |
114
+ | readOnly |
115
+
116
+ Renders the group in a read-only state (no asterisk symbol).
117
+
118
+ boolean
119
+
120
+
121
+
122
+ | \- | Set boolean |
123
+ | removeErrorMargin |
124
+
125
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
126
+
127
+ boolean
128
+
129
+
130
+
131
+ |
132
+
133
+ false
134
+
135
+ | Set boolean |
136
+ | supplementary |
137
+
138
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
139
+
140
+ ReactNode
141
+
142
+
143
+
144
+ | \- | Set object |
145
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
146
+
147
+ Examples
148
+ --------
149
+
150
+ ### Label
151
+
152
+ The `label` prop is required to describe the field.
153
+
154
+ [](./iframe.html?id=components-field--label)
155
+
156
+ Find your address
157
+
158
+ ```
159
+
160
+ <IressField label\={<span\><IressIcon name\="home" />{' '}Find your address</span\>}\>
161
+ <IressInput
162
+ id\="name"
163
+ name\="input1"
164
+ required
165
+ type\="text"
166
+ />
167
+ </IressField\>
168
+
169
+ ```
170
+
171
+ #### Props
172
+
173
+ | Name | Description | Default | Control |
174
+ | --- | --- | --- | --- |
175
+ | children |
176
+ The form control this field is related to.
177
+
178
+ ReactNode
179
+
180
+
181
+
182
+ | \- | \- |
183
+ | error |
184
+
185
+ Validation error to be displayed above the field.
186
+
187
+ ReactNode
188
+
189
+
190
+
191
+ | \- | Set object |
192
+ | errorMessages |
193
+
194
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
195
+
196
+ ValidationMessageObj\[\]
197
+
198
+ | \- | Set object |
199
+ | hint |
200
+
201
+ Text to be displayed as supporting field description.
202
+
203
+ ReactNode
204
+
205
+
206
+
207
+ | \- | Set object |
208
+ | horizontal |
209
+
210
+ Displays the label and input field inline instead of stacked vertically.
211
+
212
+ boolean
213
+
214
+
215
+
216
+ | \- | Set boolean |
217
+ | htmlFor |
218
+
219
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
220
+
221
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
222
+
223
+ unknown
224
+
225
+
226
+
227
+ | \- | Set object |
228
+ | label\* |
229
+
230
+ Text to be displayed in the label.
231
+
232
+ ReactNode
233
+
234
+
235
+
236
+ | \- | \- |
237
+ | labelWidth |
238
+
239
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
240
+
241
+ string
242
+
243
+
244
+
245
+ | \- | Set string |
246
+ | readOnly |
247
+
248
+ Renders the group in a read-only state (no asterisk symbol).
249
+
250
+ boolean
251
+
252
+
253
+
254
+ | \- | Set boolean |
255
+ | removeErrorMargin |
256
+
257
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
258
+
259
+ boolean
260
+
261
+
262
+
263
+ |
264
+
265
+ false
266
+
267
+ | Set boolean |
268
+ | supplementary |
269
+
270
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
271
+
272
+ ReactNode
273
+
274
+
275
+
276
+ | \- | Set object |
277
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
278
+
279
+ ### Hint
280
+
281
+ Extra information on the field can be provided using the `hint` prop. It can accept any React node, so you can add your own custom mark up (eg. external links) to the hint text.
282
+
283
+ [](./iframe.html?id=components-field--hint)
284
+
285
+ Email address
286
+
287
+ For us to be able to contact you in the future
288
+
289
+ ```
290
+
291
+ <IressField
292
+ hint\="For us to be able to contact you in the future"
293
+ label\="Email address"
294
+ \>
295
+ <IressInput
296
+ id\="email"
297
+ name\="email"
298
+ required
299
+ type\="email"
300
+ />
301
+ </IressField\>
302
+
303
+ ```
304
+
305
+ #### Props
306
+
307
+ | Name | Description | Default | Control |
308
+ | --- | --- | --- | --- |
309
+ | children |
310
+ The form control this field is related to.
311
+
312
+ ReactNode
313
+
314
+
315
+
316
+ | \- | \- |
317
+ | error |
318
+
319
+ Validation error to be displayed above the field.
320
+
321
+ ReactNode
322
+
323
+
324
+
325
+ | \- | Set object |
326
+ | errorMessages |
327
+
328
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
329
+
330
+ ValidationMessageObj\[\]
331
+
332
+ | \- | Set object |
333
+ | hint |
334
+
335
+ Text to be displayed as supporting field description.
336
+
337
+ ReactNode
338
+
339
+
340
+
341
+ | \- |
342
+
343
+ "For us to be able to contact you in the future"
344
+
345
+ |
346
+ | horizontal |
347
+
348
+ Displays the label and input field inline instead of stacked vertically.
349
+
350
+ boolean
351
+
352
+
353
+
354
+ | \- | Set boolean |
355
+ | htmlFor |
356
+
357
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
358
+
359
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
360
+
361
+ unknown
362
+
363
+
364
+
365
+ | \- | Set object |
366
+ | label\* |
367
+
368
+ Text to be displayed in the label.
369
+
370
+ ReactNode
371
+
372
+
373
+
374
+ | \- |
375
+
376
+ "Email address"
377
+
378
+ |
379
+ | labelWidth |
380
+
381
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
382
+
383
+ string
384
+
385
+
386
+
387
+ | \- | Set string |
388
+ | readOnly |
389
+
390
+ Renders the group in a read-only state (no asterisk symbol).
391
+
392
+ boolean
393
+
394
+
395
+
396
+ | \- | Set boolean |
397
+ | removeErrorMargin |
398
+
399
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
400
+
401
+ boolean
402
+
403
+
404
+
405
+ |
406
+
407
+ false
408
+
409
+ | Set boolean |
410
+ | supplementary |
411
+
412
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
413
+
414
+ ReactNode
415
+
416
+
417
+
418
+ | \- | Set object |
419
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
420
+
421
+ ### Error message
422
+
423
+ To display error messages associated with the field, you can use the `errorMessages` prop. This prop accepts an array of `ValidationMessageObj`, and will display each error message in a separate paragraph.
424
+
425
+ **Note:** `IressField` requires validation to be handled by the consumer. If you want out-of-the-box validation, use [`IressFormField` alongside `IressForm` instead](/docs/components-form--docs#fields).
426
+
427
+ [](./iframe.html?id=components-field--error-message)
428
+
429
+ Error message
430
+
431
+ * This field is required
432
+
433
+
434
+ ```
435
+
436
+ <IressField
437
+ errorMessages\={\[
438
+ {
439
+ message: 'This field is required'
440
+ }
441
+ \]}
442
+ label\="Error message"
443
+ \>
444
+ <IressInput
445
+ append\={<IressButton data-testid\="show-password-icon" mode\="tertiary" prepend\={<IressIcon name\="eye" screenreaderText\="Show"/>}/>}
446
+ id\="name"
447
+ name\="name"
448
+ required
449
+ />
450
+ </IressField\>
451
+
452
+ ```
453
+
454
+ #### Props
455
+
456
+ | Name | Description | Default | Control |
457
+ | --- | --- | --- | --- |
458
+ | children |
459
+ The form control this field is related to.
460
+
461
+ ReactNode
462
+
463
+
464
+
465
+ | \- | \- |
466
+ | error |
467
+
468
+ Validation error to be displayed above the field.
469
+
470
+ ReactNode
471
+
472
+
473
+
474
+ | \- | Set object |
475
+ | errorMessages |
476
+
477
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
478
+
479
+ ValidationMessageObj\[\]
480
+
481
+ | \- |
482
+
483
+ RAW
484
+
485
+ * errorMessages :
486
+
487
+ \[
488
+
489
+ * 0 :
490
+
491
+ {...} 1 key
492
+
493
+
494
+ \]
495
+
496
+
497
+
498
+
499
+ |
500
+ | hint |
501
+
502
+ Text to be displayed as supporting field description.
503
+
504
+ ReactNode
505
+
506
+
507
+
508
+ | \- | Set object |
509
+ | horizontal |
510
+
511
+ Displays the label and input field inline instead of stacked vertically.
512
+
513
+ boolean
514
+
515
+
516
+
517
+ | \- | Set boolean |
518
+ | htmlFor |
519
+
520
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
521
+
522
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
523
+
524
+ unknown
525
+
526
+
527
+
528
+ | \- | Set object |
529
+ | label\* |
530
+
531
+ Text to be displayed in the label.
532
+
533
+ ReactNode
534
+
535
+
536
+
537
+ | \- |
538
+
539
+ "Error message"
540
+
541
+ |
542
+ | labelWidth |
543
+
544
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
545
+
546
+ string
547
+
548
+
549
+
550
+ | \- | Set string |
551
+ | readOnly |
552
+
553
+ Renders the group in a read-only state (no asterisk symbol).
554
+
555
+ boolean
556
+
557
+
558
+
559
+ | \- | Set boolean |
560
+ | removeErrorMargin |
561
+
562
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
563
+
564
+ boolean
565
+
566
+
567
+
568
+ |
569
+
570
+ false
571
+
572
+ | Set boolean |
573
+ | supplementary |
574
+
575
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
576
+
577
+ ReactNode
578
+
579
+
580
+
581
+ | \- | Set object |
582
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
583
+
584
+ ### Custom error
585
+
586
+ For more control over the formatting of the error, you can use the `error` prop. This prop accepts any React node, so you can add your own custom mark up (eg. icons) to the error message.
587
+
588
+ **Note:** `IressField` requires validation to be handled by the consumer. If you want out-of-the-box validation, use [`IressFormField` alongside `IressForm` instead](/docs/components-form--docs#fields).
589
+
590
+ [](./iframe.html?id=components-field--custom-error)
591
+
592
+ Custom error
593
+
594
+ * This is a custom error message
595
+
596
+
597
+ ```
598
+
599
+ <IressField
600
+ error\={<IressText color\="colour.system.danger.text" element\="small"\>This is a custom error message</IressText\>}
601
+ label\="Custom error"
602
+ \>
603
+ <IressInput
604
+ id\="name"
605
+ name\="name"
606
+ required
607
+ />
608
+ </IressField\>
609
+
610
+ ```
611
+
612
+ #### Props
613
+
614
+ | Name | Description | Default | Control |
615
+ | --- | --- | --- | --- |
616
+ | children |
617
+ The form control this field is related to.
618
+
619
+ ReactNode
620
+
621
+
622
+
623
+ | \- | \- |
624
+ | error |
625
+
626
+ Validation error to be displayed above the field.
627
+
628
+ ReactNode
629
+
630
+
631
+
632
+ | \- |
633
+
634
+ RAW
635
+
636
+ error :
637
+
638
+ {
639
+
640
+ * $$typeof : Symbol(react.transitional.element)
641
+ * type : ({ className, ...restProps }) => { \_s(); const Component = useMemo( () => styled(restProps.element ?? "div", text), \[restProps.element\] ); return /\* @\_\_PURE\_\_ \*/ jsxDEV( Component, { ...restProps, className: cx(className, GlobalCSSClass.Text) }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/Text/Text.tsx", lineNumber: 46, columnNumber: 5 }, this ); }
642
+ * key : null
643
+ * props :
644
+
645
+ {...} 3 keys
646
+
647
+ * \_owner : null
648
+ * \_store :
649
+
650
+ {...} 0 keys
651
+
652
+
653
+ }
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+ |
662
+ | errorMessages |
663
+
664
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
665
+
666
+ ValidationMessageObj\[\]
667
+
668
+ | \- | Set object |
669
+ | hint |
670
+
671
+ Text to be displayed as supporting field description.
672
+
673
+ ReactNode
674
+
675
+
676
+
677
+ | \- | Set object |
678
+ | horizontal |
679
+
680
+ Displays the label and input field inline instead of stacked vertically.
681
+
682
+ boolean
683
+
684
+
685
+
686
+ | \- | Set boolean |
687
+ | htmlFor |
688
+
689
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
690
+
691
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
692
+
693
+ unknown
694
+
695
+
696
+
697
+ | \- | Set object |
698
+ | label\* |
699
+
700
+ Text to be displayed in the label.
701
+
702
+ ReactNode
703
+
704
+
705
+
706
+ | \- |
707
+
708
+ "Custom error"
709
+
710
+ |
711
+ | labelWidth |
712
+
713
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
714
+
715
+ string
716
+
717
+
718
+
719
+ | \- | Set string |
720
+ | readOnly |
721
+
722
+ Renders the group in a read-only state (no asterisk symbol).
723
+
724
+ boolean
725
+
726
+
727
+
728
+ | \- | Set boolean |
729
+ | removeErrorMargin |
730
+
731
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
732
+
733
+ boolean
734
+
735
+
736
+
737
+ |
738
+
739
+ false
740
+
741
+ | Set boolean |
742
+ | supplementary |
743
+
744
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
745
+
746
+ ReactNode
747
+
748
+
749
+
750
+ | \- | Set object |
751
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
752
+
753
+ ### Hidden label
754
+
755
+ There may be certain situations where you might want to (accessibly) hide the field label (in a search field for instance). This can be done by setting the `hiddenLabel` prop.
756
+
757
+ [](./iframe.html?id=components-field--hidden-label)
758
+
759
+ This label is hidden
760
+
761
+ This hint text is hidden
762
+
763
+ ```
764
+
765
+ <IressField
766
+ hiddenLabel
767
+ hint\="This hint text is hidden"
768
+ label\="This label is hidden"
769
+ \>
770
+ <IressInput
771
+ id\="name"
772
+ name\="input1"
773
+ required
774
+ type\="text"
775
+ />
776
+ </IressField\>
777
+
778
+ ```
779
+
780
+ #### Props
781
+
782
+ | Name | Description | Default | Control |
783
+ | --- | --- | --- | --- |
784
+ | children |
785
+ The form control this field is related to.
786
+
787
+ ReactNode
788
+
789
+
790
+
791
+ | \- | \- |
792
+ | error |
793
+
794
+ Validation error to be displayed above the field.
795
+
796
+ ReactNode
797
+
798
+
799
+
800
+ | \- | Set object |
801
+ | errorMessages |
802
+
803
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
804
+
805
+ ValidationMessageObj\[\]
806
+
807
+ | \- | Set object |
808
+ | hiddenLabel |
809
+
810
+ boolean
811
+
812
+
813
+
814
+ | \- | FalseTrue |
815
+ | hint |
816
+
817
+ Text to be displayed as supporting field description.
818
+
819
+ ReactNode
820
+
821
+
822
+
823
+ | \- |
824
+
825
+ "This hint text is hidden"
826
+
827
+ |
828
+ | horizontal |
829
+
830
+ Displays the label and input field inline instead of stacked vertically.
831
+
832
+ boolean
833
+
834
+
835
+
836
+ | \- | Set boolean |
837
+ | htmlFor |
838
+
839
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
840
+
841
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
842
+
843
+ unknown
844
+
845
+
846
+
847
+ | \- | Set object |
848
+ | label\* |
849
+
850
+ Text to be displayed in the label.
851
+
852
+ ReactNode
853
+
854
+
855
+
856
+ | \- |
857
+
858
+ "This label is hidden"
859
+
860
+ |
861
+ | labelWidth |
862
+
863
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
864
+
865
+ string
866
+
867
+
868
+
869
+ | \- | Set string |
870
+ | readOnly |
871
+
872
+ Renders the group in a read-only state (no asterisk symbol).
873
+
874
+ boolean
875
+
876
+
877
+
878
+ | \- | Set boolean |
879
+ | removeErrorMargin |
880
+
881
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
882
+
883
+ boolean
884
+
885
+
886
+
887
+ |
888
+
889
+ false
890
+
891
+ | Set boolean |
892
+ | supplementary |
893
+
894
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
895
+
896
+ ReactNode
897
+
898
+
899
+
900
+ | \- | Set object |
901
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
902
+
903
+ [](./iframe.html?id=components-field--hidden-label-with-error)
904
+
905
+ This label is hidden
906
+
907
+ This hint text is hidden
908
+
909
+ * Even fields with hidden labels will show their validation message
910
+
911
+
912
+ ```
913
+
914
+ <IressField
915
+ error\={<IressText color\="colour.system.danger.text" element\="small"\>Even fields with hidden labels will show their validation message</IressText\>}
916
+ hiddenLabel
917
+ hint\="This hint text is hidden"
918
+ label\="This label is hidden"
919
+ \>
920
+ <IressInput
921
+ id\="name"
922
+ name\="input1"
923
+ required
924
+ type\="text"
925
+ />
926
+ </IressField\>
927
+
928
+ ```
929
+
930
+ #### Props
931
+
932
+ | Name | Description | Default | Control |
933
+ | --- | --- | --- | --- |
934
+ | children |
935
+ The form control this field is related to.
936
+
937
+ ReactNode
938
+
939
+
940
+
941
+ | \- | \- |
942
+ | error |
943
+
944
+ Validation error to be displayed above the field.
945
+
946
+ ReactNode
947
+
948
+
949
+
950
+ | \- |
951
+
952
+ RAW
953
+
954
+ error :
955
+
956
+ {
957
+
958
+ * $$typeof : Symbol(react.transitional.element)
959
+ * type : ({ className, ...restProps }) => { \_s(); const Component = useMemo( () => styled(restProps.element ?? "div", text), \[restProps.element\] ); return /\* @\_\_PURE\_\_ \*/ jsxDEV( Component, { ...restProps, className: cx(className, GlobalCSSClass.Text) }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/Text/Text.tsx", lineNumber: 46, columnNumber: 5 }, this ); }
960
+ * key : null
961
+ * props :
962
+
963
+ {...} 3 keys
964
+
965
+ * \_owner : null
966
+ * \_store :
967
+
968
+ {...} 0 keys
969
+
970
+
971
+ }
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+ |
980
+ | errorMessages |
981
+
982
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
983
+
984
+ ValidationMessageObj\[\]
985
+
986
+ | \- | Set object |
987
+ | hiddenLabel |
988
+
989
+ boolean
990
+
991
+
992
+
993
+ | \- | FalseTrue |
994
+ | hint |
995
+
996
+ Text to be displayed as supporting field description.
997
+
998
+ ReactNode
999
+
1000
+
1001
+
1002
+ | \- |
1003
+
1004
+ "This hint text is hidden"
1005
+
1006
+ |
1007
+ | horizontal |
1008
+
1009
+ Displays the label and input field inline instead of stacked vertically.
1010
+
1011
+ boolean
1012
+
1013
+
1014
+
1015
+ | \- | Set boolean |
1016
+ | htmlFor |
1017
+
1018
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
1019
+
1020
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
1021
+
1022
+ unknown
1023
+
1024
+
1025
+
1026
+ | \- | Set object |
1027
+ | label\* |
1028
+
1029
+ Text to be displayed in the label.
1030
+
1031
+ ReactNode
1032
+
1033
+
1034
+
1035
+ | \- |
1036
+
1037
+ "This label is hidden"
1038
+
1039
+ |
1040
+ | labelWidth |
1041
+
1042
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
1043
+
1044
+ string
1045
+
1046
+
1047
+
1048
+ | \- | Set string |
1049
+ | readOnly |
1050
+
1051
+ Renders the group in a read-only state (no asterisk symbol).
1052
+
1053
+ boolean
1054
+
1055
+
1056
+
1057
+ | \- | Set boolean |
1058
+ | removeErrorMargin |
1059
+
1060
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
1061
+
1062
+ boolean
1063
+
1064
+
1065
+
1066
+ |
1067
+
1068
+ false
1069
+
1070
+ | Set boolean |
1071
+ | supplementary |
1072
+
1073
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
1074
+
1075
+ ReactNode
1076
+
1077
+
1078
+
1079
+ | \- | Set object |
1080
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
1081
+
1082
+ ### Required
1083
+
1084
+ Fields marked as `required` will have an asterisk prepended to the label.
1085
+
1086
+ [](./iframe.html?id=components-field--required)
1087
+
1088
+ \*RequiredThis field is required
1089
+
1090
+ ```
1091
+
1092
+ <IressField
1093
+ label\="This field is required"
1094
+ required
1095
+ \>
1096
+ <IressInput
1097
+ id\="name"
1098
+ name\="input1"
1099
+ required
1100
+ type\="text"
1101
+ />
1102
+ </IressField\>
1103
+
1104
+ ```
1105
+
1106
+ #### Props
1107
+
1108
+ | Name | Description | Default | Control |
1109
+ | --- | --- | --- | --- |
1110
+ | children |
1111
+ The form control this field is related to.
1112
+
1113
+ ReactNode
1114
+
1115
+
1116
+
1117
+ | \- | \- |
1118
+ | error |
1119
+
1120
+ Validation error to be displayed above the field.
1121
+
1122
+ ReactNode
1123
+
1124
+
1125
+
1126
+ | \- | Set object |
1127
+ | errorMessages |
1128
+
1129
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
1130
+
1131
+ ValidationMessageObj\[\]
1132
+
1133
+ | \- | Set object |
1134
+ | hint |
1135
+
1136
+ Text to be displayed as supporting field description.
1137
+
1138
+ ReactNode
1139
+
1140
+
1141
+
1142
+ | \- | Set object |
1143
+ | horizontal |
1144
+
1145
+ Displays the label and input field inline instead of stacked vertically.
1146
+
1147
+ boolean
1148
+
1149
+
1150
+
1151
+ | \- | Set boolean |
1152
+ | htmlFor |
1153
+
1154
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
1155
+
1156
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
1157
+
1158
+ unknown
1159
+
1160
+
1161
+
1162
+ | \- | Set object |
1163
+ | label\* |
1164
+
1165
+ Text to be displayed in the label.
1166
+
1167
+ ReactNode
1168
+
1169
+
1170
+
1171
+ | \- |
1172
+
1173
+ "This field is required"
1174
+
1175
+ |
1176
+ | labelWidth |
1177
+
1178
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
1179
+
1180
+ string
1181
+
1182
+
1183
+
1184
+ | \- | Set string |
1185
+ | readOnly |
1186
+
1187
+ Renders the group in a read-only state (no asterisk symbol).
1188
+
1189
+ boolean
1190
+
1191
+
1192
+
1193
+ | \- | Set boolean |
1194
+ | removeErrorMargin |
1195
+
1196
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
1197
+
1198
+ boolean
1199
+
1200
+
1201
+
1202
+ |
1203
+
1204
+ false
1205
+
1206
+ | Set boolean |
1207
+ | required |
1208
+
1209
+ boolean
1210
+
1211
+
1212
+
1213
+ | \- | FalseTrue |
1214
+ | supplementary |
1215
+
1216
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
1217
+
1218
+ ReactNode
1219
+
1220
+
1221
+
1222
+ | \- | Set object |
1223
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
1224
+
1225
+ ### Readonly data
1226
+
1227
+ Fields can be used to display read-only data. This is useful when you want to display data that the user can't change, but you still want to display it in a form-like layout.
1228
+
1229
+ You can also pass `readOnly` prop to remove the asterisk symbol (\*) even when the field is `required`.
1230
+
1231
+ [](./iframe.html?id=components-field--readonly-data)
1232
+
1233
+ First name
1234
+
1235
+ This field is readonly
1236
+
1237
+ Luke Skywalker
1238
+
1239
+ ```
1240
+
1241
+ <IressField
1242
+ hint\="This field is readonly"
1243
+ label\="First name"
1244
+ readOnly
1245
+ required
1246
+ \>
1247
+ <IressReadonly
1248
+ id\="name"
1249
+ name\="input1"
1250
+ required
1251
+ type\="text"
1252
+ value\="Luke Skywalker"
1253
+ />
1254
+ </IressField\>
1255
+
1256
+ ```
1257
+
1258
+ #### Props
1259
+
1260
+ | Name | Description | Default | Control |
1261
+ | --- | --- | --- | --- |
1262
+ | children |
1263
+ The form control this field is related to.
1264
+
1265
+ ReactNode
1266
+
1267
+
1268
+
1269
+ | \- | \- |
1270
+ | error |
1271
+
1272
+ Validation error to be displayed above the field.
1273
+
1274
+ ReactNode
1275
+
1276
+
1277
+
1278
+ | \- | Set object |
1279
+ | errorMessages |
1280
+
1281
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
1282
+
1283
+ ValidationMessageObj\[\]
1284
+
1285
+ | \- | Set object |
1286
+ | hint |
1287
+
1288
+ Text to be displayed as supporting field description.
1289
+
1290
+ ReactNode
1291
+
1292
+
1293
+
1294
+ | \- |
1295
+
1296
+ "This field is readonly"
1297
+
1298
+ |
1299
+ | horizontal |
1300
+
1301
+ Displays the label and input field inline instead of stacked vertically.
1302
+
1303
+ boolean
1304
+
1305
+
1306
+
1307
+ | \- | Set boolean |
1308
+ | htmlFor |
1309
+
1310
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
1311
+
1312
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
1313
+
1314
+ unknown
1315
+
1316
+
1317
+
1318
+ | \- | Set object |
1319
+ | label\* |
1320
+
1321
+ Text to be displayed in the label.
1322
+
1323
+ ReactNode
1324
+
1325
+
1326
+
1327
+ | \- |
1328
+
1329
+ "First name"
1330
+
1331
+ |
1332
+ | labelWidth |
1333
+
1334
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
1335
+
1336
+ string
1337
+
1338
+
1339
+
1340
+ | \- | Set string |
1341
+ | readOnly |
1342
+
1343
+ Renders the group in a read-only state (no asterisk symbol).
1344
+
1345
+ boolean
1346
+
1347
+
1348
+
1349
+ | \- | FalseTrue |
1350
+ | removeErrorMargin |
1351
+
1352
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
1353
+
1354
+ boolean
1355
+
1356
+
1357
+
1358
+ |
1359
+
1360
+ false
1361
+
1362
+ | Set boolean |
1363
+ | required |
1364
+
1365
+ boolean
1366
+
1367
+
1368
+
1369
+ | \- | FalseTrue |
1370
+ | supplementary |
1371
+
1372
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
1373
+
1374
+ ReactNode
1375
+
1376
+
1377
+
1378
+ | \- | Set object |
1379
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
1380
+
1381
+ ### Supplementary
1382
+
1383
+ The `supplementary` prop can be used to display additional information about the field.
1384
+
1385
+ This is used to display some metadata based on the value of the field in context. Examples include:
1386
+
1387
+ * A trading share field that displays the current price of the share.
1388
+ * A commission percentage field that displays the expected commission based on the value of multiple fields.
1389
+
1390
+ #### Notes
1391
+
1392
+ * The `supplementary` prop is not a replacement for the `hint` prop. The `hint` prop should be used to provide additional information about the field itself, while the `supplementary` prop should be used to display additional information about the value of the field.
1393
+ * The `supplementary` prop will only be displayed if the field is not in an error state. If the field is in an error state, the `error` and `errorMessages` prop will be displayed instead.
1394
+
1395
+ [](./iframe.html?id=components-field--supplementary)
1396
+
1397
+ Show error
1398
+
1399
+ First name
1400
+
1401
+ I only show if there is no error
1402
+
1403
+ ```
1404
+
1405
+ <IressStack gap\="spacing.500"\>
1406
+ <IressToggle
1407
+ onChange\={(checked) \=> setError(checked ? "This field is required" : void 0)}
1408
+ \>
1409
+ Show error </IressToggle\>
1410
+ <IressField
1411
+ label\="First name"
1412
+ supplementary\="I only show if there is no error"
1413
+ \>
1414
+ <IressInput
1415
+ id\="name"
1416
+ name\="input1"
1417
+ required
1418
+ type\="text"
1419
+ />
1420
+ </IressField\>
1421
+ </IressStack\>
1422
+
1423
+ ```
1424
+
1425
+ #### Props
1426
+
1427
+ | Name | Description | Default | Control |
1428
+ | --- | --- | --- | --- |
1429
+ | children |
1430
+ The form control this field is related to.
1431
+
1432
+ ReactNode
1433
+
1434
+
1435
+
1436
+ | \- | \- |
1437
+ | error |
1438
+
1439
+ Validation error to be displayed above the field.
1440
+
1441
+ ReactNode
1442
+
1443
+
1444
+
1445
+ | \- | \- |
1446
+ | errorMessages |
1447
+
1448
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
1449
+
1450
+ ValidationMessageObj\[\]
1451
+
1452
+ | \- | \- |
1453
+ | hint |
1454
+
1455
+ Text to be displayed as supporting field description.
1456
+
1457
+ ReactNode
1458
+
1459
+
1460
+
1461
+ | \- | Set object |
1462
+ | horizontal |
1463
+
1464
+ Displays the label and input field inline instead of stacked vertically.
1465
+
1466
+ boolean
1467
+
1468
+
1469
+
1470
+ | \- | Set boolean |
1471
+ | htmlFor |
1472
+
1473
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
1474
+
1475
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
1476
+
1477
+ unknown
1478
+
1479
+
1480
+
1481
+ | \- | Set object |
1482
+ | label\* |
1483
+
1484
+ Text to be displayed in the label.
1485
+
1486
+ ReactNode
1487
+
1488
+
1489
+
1490
+ | \- |
1491
+
1492
+ "First name"
1493
+
1494
+ |
1495
+ | labelWidth |
1496
+
1497
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
1498
+
1499
+ string
1500
+
1501
+
1502
+
1503
+ | \- | Set string |
1504
+ | readOnly |
1505
+
1506
+ Renders the group in a read-only state (no asterisk symbol).
1507
+
1508
+ boolean
1509
+
1510
+
1511
+
1512
+ | \- | Set boolean |
1513
+ | removeErrorMargin |
1514
+
1515
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
1516
+
1517
+ boolean
1518
+
1519
+
1520
+
1521
+ |
1522
+
1523
+ false
1524
+
1525
+ | Set boolean |
1526
+ | supplementary |
1527
+
1528
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
1529
+
1530
+ ReactNode
1531
+
1532
+
1533
+
1534
+ | \- |
1535
+
1536
+ "I only show if there is no error"
1537
+
1538
+ |
1539
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
1540
+
1541
+ ### Horizontal layout
1542
+
1543
+ Fields can be displayed with a horizontal layout where the label and input are on the same line, which can save vertical space in forms. Use the `horizontal` prop to enable this layout. In horizontal mode, hint text is displayed as a tooltip when hovering over the info icon, rather than being shown below the label as in the default vertical layout.
1544
+
1545
+ #### Avoid using horizontal mode for majority of cases
1546
+
1547
+ Vertical layout is preferred, it is more accessible in more scenarios by ensuring a consistent layout on different devices and keep the label closer to the input ensuring its relationship and making forms easier to scan. There are studies showing [vertical layouts can be faster to fill out](https://content-and-marketing.com/blog/10-mobile-form-design-best-practices-2024). Here are a few cases where you may use a horizontal layout:
1548
+
1549
+ * On dashboards where space is limited, it may be necessary to display fields in a horizontal layout to make use of the space and give prominence to dashboard visuals.
1550
+ * Collaborative visual tools that require real-time editing and previews, such as Styler, Miro, Figma, where fields are less prominent to give prominence to the intended output.
1551
+
1552
+ [](./iframe.html?id=components-field--horizontal)
1553
+
1554
+ Email address
1555
+
1556
+ We will not share your email with third parties (Supplementary text)
1557
+
1558
+ ```
1559
+
1560
+ <IressField
1561
+ hint\="Enter your email address for contact"
1562
+ horizontal
1563
+ label\="Email address"
1564
+ labelWidth\="250px"
1565
+ supplementary\="We will not share your email with third parties (Supplementary text)"
1566
+ \>
1567
+ <IressInput
1568
+ id\="email"
1569
+ name\="email"
1570
+ placeholder\="john.doe@example.com"
1571
+ required
1572
+ type\="email"
1573
+ />
1574
+ </IressField\>
1575
+
1576
+ ```
1577
+
1578
+ #### Props
1579
+
1580
+ | Name | Description | Default | Control |
1581
+ | --- | --- | --- | --- |
1582
+ | children |
1583
+ The form control this field is related to.
1584
+
1585
+ ReactNode
1586
+
1587
+
1588
+
1589
+ | \- | \- |
1590
+ | error |
1591
+
1592
+ Validation error to be displayed above the field.
1593
+
1594
+ ReactNode
1595
+
1596
+
1597
+
1598
+ | \- | Set object |
1599
+ | errorMessages |
1600
+
1601
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
1602
+
1603
+ ValidationMessageObj\[\]
1604
+
1605
+ | \- | Set object |
1606
+ | hint |
1607
+
1608
+ Text to be displayed as supporting field description.
1609
+
1610
+ ReactNode
1611
+
1612
+
1613
+
1614
+ | \- |
1615
+
1616
+ "Enter your email address for contact"
1617
+
1618
+ |
1619
+ | horizontal |
1620
+
1621
+ Displays the label and input field inline instead of stacked vertically.
1622
+
1623
+ boolean
1624
+
1625
+
1626
+
1627
+ | \- | FalseTrue |
1628
+ | htmlFor |
1629
+
1630
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
1631
+
1632
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
1633
+
1634
+ unknown
1635
+
1636
+
1637
+
1638
+ | \- | Set object |
1639
+ | label\* |
1640
+
1641
+ Text to be displayed in the label.
1642
+
1643
+ ReactNode
1644
+
1645
+
1646
+
1647
+ | \- |
1648
+
1649
+ "Email address"
1650
+
1651
+ |
1652
+ | labelWidth |
1653
+
1654
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
1655
+
1656
+ string
1657
+
1658
+
1659
+
1660
+ | \- | 250px |
1661
+ | readOnly |
1662
+
1663
+ Renders the group in a read-only state (no asterisk symbol).
1664
+
1665
+ boolean
1666
+
1667
+
1668
+
1669
+ | \- | Set boolean |
1670
+ | removeErrorMargin |
1671
+
1672
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
1673
+
1674
+ boolean
1675
+
1676
+
1677
+
1678
+ |
1679
+
1680
+ false
1681
+
1682
+ | Set boolean |
1683
+ | supplementary |
1684
+
1685
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
1686
+
1687
+ ReactNode
1688
+
1689
+
1690
+
1691
+ | \- |
1692
+
1693
+ "We will not share your email with third parties (Supplementary text)"
1694
+
1695
+ |
1696
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
1697
+
1698
+ #### Horizontal with error
1699
+
1700
+ Error messages in horizontal layout are displayed below both the label and input field, spanning the full width.
1701
+
1702
+ [](./iframe.html?id=components-field--horizontal-with-error)
1703
+
1704
+ Email address
1705
+
1706
+ * Please enter a valid email address
1707
+
1708
+
1709
+ ```
1710
+
1711
+ <IressField
1712
+ errorMessages\={\[
1713
+ {
1714
+ message: 'Please enter a valid email address'
1715
+ }
1716
+ \]}
1717
+ hint\="Enter your email address for contact"
1718
+ horizontal
1719
+ label\="Email address"
1720
+ labelWidth\="250px"
1721
+ supplementary\="We will not share your email with third parties (Supplementary text)"
1722
+ \>
1723
+ <IressInput
1724
+ id\="email"
1725
+ name\="email"
1726
+ placeholder\="john.doe@example.com"
1727
+ required
1728
+ type\="email"
1729
+ />
1730
+ </IressField\>
1731
+
1732
+ ```
1733
+
1734
+ #### Props
1735
+
1736
+ | Name | Description | Default | Control |
1737
+ | --- | --- | --- | --- |
1738
+ | children |
1739
+ The form control this field is related to.
1740
+
1741
+ ReactNode
1742
+
1743
+
1744
+
1745
+ | \- | \- |
1746
+ | error |
1747
+
1748
+ Validation error to be displayed above the field.
1749
+
1750
+ ReactNode
1751
+
1752
+
1753
+
1754
+ | \- | Set object |
1755
+ | errorMessages |
1756
+
1757
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
1758
+
1759
+ ValidationMessageObj\[\]
1760
+
1761
+ | \- |
1762
+
1763
+ RAW
1764
+
1765
+ * errorMessages :
1766
+
1767
+ \[
1768
+
1769
+ * 0 :
1770
+
1771
+ {...} 1 key
1772
+
1773
+
1774
+ \]
1775
+
1776
+
1777
+
1778
+
1779
+ |
1780
+ | hint |
1781
+
1782
+ Text to be displayed as supporting field description.
1783
+
1784
+ ReactNode
1785
+
1786
+
1787
+
1788
+ | \- |
1789
+
1790
+ "Enter your email address for contact"
1791
+
1792
+ |
1793
+ | horizontal |
1794
+
1795
+ Displays the label and input field inline instead of stacked vertically.
1796
+
1797
+ boolean
1798
+
1799
+
1800
+
1801
+ | \- | FalseTrue |
1802
+ | htmlFor |
1803
+
1804
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
1805
+
1806
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
1807
+
1808
+ unknown
1809
+
1810
+
1811
+
1812
+ | \- | Set object |
1813
+ | label\* |
1814
+
1815
+ Text to be displayed in the label.
1816
+
1817
+ ReactNode
1818
+
1819
+
1820
+
1821
+ | \- |
1822
+
1823
+ "Email address"
1824
+
1825
+ |
1826
+ | labelWidth |
1827
+
1828
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
1829
+
1830
+ string
1831
+
1832
+
1833
+
1834
+ | \- | 250px |
1835
+ | readOnly |
1836
+
1837
+ Renders the group in a read-only state (no asterisk symbol).
1838
+
1839
+ boolean
1840
+
1841
+
1842
+
1843
+ | \- | Set boolean |
1844
+ | removeErrorMargin |
1845
+
1846
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
1847
+
1848
+ boolean
1849
+
1850
+
1851
+
1852
+ |
1853
+
1854
+ false
1855
+
1856
+ | Set boolean |
1857
+ | supplementary |
1858
+
1859
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
1860
+
1861
+ ReactNode
1862
+
1863
+
1864
+
1865
+ | \- |
1866
+
1867
+ "We will not share your email with third parties (Supplementary text)"
1868
+
1869
+ |
1870
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
1871
+
1872
+ #### Horizontal label width
1873
+
1874
+ In horizontal layout, you can control the width of the label using the `labelWidth` prop. This accepts CSS width values like pixels, percentages, or `auto`.
1875
+
1876
+ [](./iframe.html?id=components-field--horizontal-label-width-examples)
1877
+
1878
+ labelWidth: 100px
1879
+
1880
+ labelWidth: 200px
1881
+
1882
+ labelWidth: 25%
1883
+
1884
+ labelWidth: auto
1885
+
1886
+ Default (no labelWidth)
1887
+
1888
+ ```
1889
+
1890
+ <IressStack gap\="spacing.500"\>
1891
+ <IressField
1892
+ horizontal
1893
+ label\="labelWidth: 100px"
1894
+ labelWidth\="100px"
1895
+ \>
1896
+ <IressInput
1897
+ id\="name"
1898
+ name\="input1"
1899
+ placeholder\="Label width: 100px"
1900
+ required
1901
+ type\="text"
1902
+ />
1903
+ </IressField\>
1904
+ <IressField
1905
+ horizontal
1906
+ label\="labelWidth: 200px"
1907
+ labelWidth\="200px"
1908
+ \>
1909
+ <IressInput
1910
+ id\="name"
1911
+ name\="input1"
1912
+ placeholder\="Label width: 200px"
1913
+ required
1914
+ type\="text"
1915
+ />
1916
+ </IressField\>
1917
+ <IressField
1918
+ horizontal
1919
+ label\="labelWidth: 25%"
1920
+ labelWidth\="25%"
1921
+ \>
1922
+ <IressInput
1923
+ id\="name"
1924
+ name\="input1"
1925
+ placeholder\="Label width: 25%"
1926
+ required
1927
+ type\="text"
1928
+ />
1929
+ </IressField\>
1930
+ <IressField
1931
+ horizontal
1932
+ label\="labelWidth: auto"
1933
+ labelWidth\="auto"
1934
+ \>
1935
+ <IressInput
1936
+ id\="name"
1937
+ name\="input1"
1938
+ placeholder\="Label width: auto"
1939
+ required
1940
+ type\="text"
1941
+ />
1942
+ </IressField\>
1943
+ <IressField
1944
+ horizontal
1945
+ label\="Default (no labelWidth)"
1946
+ \>
1947
+ <IressInput
1948
+ id\="name"
1949
+ name\="input1"
1950
+ placeholder\="Default horizontal layout"
1951
+ required
1952
+ type\="text"
1953
+ />
1954
+ </IressField\>
1955
+ </IressStack\>
1956
+
1957
+ ```
1958
+
1959
+ #### Props
1960
+
1961
+ | Name | Description | Default | Control |
1962
+ | --- | --- | --- | --- |
1963
+ | children |
1964
+ The form control this field is related to.
1965
+
1966
+ ReactNode
1967
+
1968
+
1969
+
1970
+ | \- | \- |
1971
+ | error |
1972
+
1973
+ Validation error to be displayed above the field.
1974
+
1975
+ ReactNode
1976
+
1977
+
1978
+
1979
+ | \- | Set object |
1980
+ | errorMessages |
1981
+
1982
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
1983
+
1984
+ ValidationMessageObj\[\]
1985
+
1986
+ | \- | Set object |
1987
+ | hint |
1988
+
1989
+ Text to be displayed as supporting field description.
1990
+
1991
+ ReactNode
1992
+
1993
+
1994
+
1995
+ | \- | Set object |
1996
+ | horizontal |
1997
+
1998
+ Displays the label and input field inline instead of stacked vertically.
1999
+
2000
+ boolean
2001
+
2002
+
2003
+
2004
+ | \- | FalseTrue |
2005
+ | htmlFor |
2006
+
2007
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
2008
+
2009
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
2010
+
2011
+ unknown
2012
+
2013
+
2014
+
2015
+ | \- | Set object |
2016
+ | label\* |
2017
+
2018
+ Text to be displayed in the label.
2019
+
2020
+ ReactNode
2021
+
2022
+
2023
+
2024
+ | \- |
2025
+
2026
+ "Label Width"
2027
+
2028
+ |
2029
+ | labelWidth |
2030
+
2031
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
2032
+
2033
+ string
2034
+
2035
+
2036
+
2037
+ | \- | Set string |
2038
+ | readOnly |
2039
+
2040
+ Renders the group in a read-only state (no asterisk symbol).
2041
+
2042
+ boolean
2043
+
2044
+
2045
+
2046
+ | \- | Set boolean |
2047
+ | removeErrorMargin |
2048
+
2049
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
2050
+
2051
+ boolean
2052
+
2053
+
2054
+
2055
+ |
2056
+
2057
+ false
2058
+
2059
+ | Set boolean |
2060
+ | supplementary |
2061
+
2062
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
2063
+
2064
+ ReactNode
2065
+
2066
+
2067
+
2068
+ | \- | Set object |
2069
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
2070
+
2071
+ ### Remove error margin
2072
+
2073
+ By default, fields reserve space for error messages to maintain consistent spacing. Use the `removeErrorMargin` prop to remove this reserved space, creating tighter field spacing when stacking multiple fields.
2074
+
2075
+ This is particularly useful in dense forms or when you want to minimize vertical space usage.
2076
+
2077
+ **Note:** When `removeErrorMargin` is enabled, subsequent fields will be pushed down when error or supplementary messages appear, as no space is reserved for these messages. You can use the `IressStack` component to control field gaps and spacing as needed.
2078
+
2079
+ [](./iframe.html?id=components-field--remove-error-margin)
2080
+
2081
+ Remove error margin (tighter field spacing)
2082
+
2083
+ Show error message
2084
+
2085
+ ### Vertical Label Layout
2086
+
2087
+ First Name
2088
+
2089
+ Last Name
2090
+
2091
+ This is always-displayed supplementary text
2092
+
2093
+ Email Address
2094
+
2095
+ ### Horizontal Label Layout
2096
+
2097
+ First Name
2098
+
2099
+ Last Name
2100
+
2101
+ This is always-displayed supplementary text
2102
+
2103
+ Email Address
2104
+
2105
+ ```
2106
+
2107
+ <IressStack gap\="spacing.500"\>
2108
+ <IressInline gap\="spacing.400"\>
2109
+ <IressToggle
2110
+ onChange\={(checked) \=> setRemoveErrorMargin(checked)}
2111
+ \>
2112
+ Remove error margin (tighter field spacing) </IressToggle\>
2113
+ <IressToggle
2114
+ onChange\={(checked) \=> setShowError(checked)}
2115
+ \>
2116
+ Show error message </IressToggle\>
2117
+ </IressInline\>
2118
+ <IressRow gutter\="spacing.600"\>
2119
+ <IressCol span\="6"\>
2120
+ <IressStack gap\="spacing.200"\>
2121
+ <IressText
2122
+ element\="h3"
2123
+ textStyle\="typography.body.lg.strong"
2124
+ \>
2125
+ Vertical Label Layout </IressText\>
2126
+ <IressStack gap\="spacing.000"\>
2127
+ <IressField
2128
+ label\="First Name"
2129
+ \>
2130
+ <IressInput
2131
+ id\="name"
2132
+ name\="input1"
2133
+ placeholder\="Enter first name"
2134
+ required
2135
+ type\="text"
2136
+ />
2137
+ </IressField\>
2138
+ <IressField
2139
+ label\="Last Name"
2140
+ supplementary\="This is always-displayed supplementary text"
2141
+ \>
2142
+ <IressInput
2143
+ id\="name"
2144
+ name\="input1"
2145
+ placeholder\="Enter last name"
2146
+ required
2147
+ type\="text"
2148
+ />
2149
+ </IressField\>
2150
+ <IressField
2151
+ label\="Email Address"
2152
+ \>
2153
+ <IressInput
2154
+ id\="name"
2155
+ name\="input1"
2156
+ placeholder\="Enter email"
2157
+ required
2158
+ type\="email"
2159
+ />
2160
+ </IressField\>
2161
+ </IressStack\>
2162
+ </IressStack\>
2163
+ </IressCol\>
2164
+ <IressCol span\="6"\>
2165
+ <IressStack gap\="spacing.200"\>
2166
+ <IressText
2167
+ element\="h3"
2168
+ textStyle\="typography.body.lg.strong"
2169
+ \>
2170
+ Horizontal Label Layout </IressText\>
2171
+ <IressStack gap\="spacing.000"\>
2172
+ <IressField
2173
+ horizontal
2174
+ label\="First Name"
2175
+ labelWidth\="120px"
2176
+ \>
2177
+ <IressInput
2178
+ id\="name"
2179
+ name\="input1"
2180
+ placeholder\="Enter first name"
2181
+ required
2182
+ type\="text"
2183
+ />
2184
+ </IressField\>
2185
+ <IressField
2186
+ horizontal
2187
+ label\="Last Name"
2188
+ labelWidth\="120px"
2189
+ supplementary\="This is always-displayed supplementary text"
2190
+ \>
2191
+ <IressInput
2192
+ id\="name"
2193
+ name\="input1"
2194
+ placeholder\="Enter last name"
2195
+ required
2196
+ type\="text"
2197
+ />
2198
+ </IressField\>
2199
+ <IressField
2200
+ horizontal
2201
+ label\="Email Address"
2202
+ labelWidth\="120px"
2203
+ \>
2204
+ <IressInput
2205
+ id\="name"
2206
+ name\="input1"
2207
+ placeholder\="Enter email"
2208
+ required
2209
+ type\="email"
2210
+ />
2211
+ </IressField\>
2212
+ </IressStack\>
2213
+ </IressStack\>
2214
+ </IressCol\>
2215
+ </IressRow\>
2216
+ </IressStack\>
2217
+
2218
+ ```
2219
+
2220
+ #### Props
2221
+
2222
+ | Name | Description | Default | Control |
2223
+ | --- | --- | --- | --- |
2224
+ | children |
2225
+ The form control this field is related to.
2226
+
2227
+ ReactNode
2228
+
2229
+
2230
+
2231
+ | \- | \- |
2232
+ | error |
2233
+
2234
+ Validation error to be displayed above the field.
2235
+
2236
+ ReactNode
2237
+
2238
+
2239
+
2240
+ | \- | Set object |
2241
+ | errorMessages |
2242
+
2243
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
2244
+
2245
+ ValidationMessageObj\[\]
2246
+
2247
+ | \- | Set object |
2248
+ | hint |
2249
+
2250
+ Text to be displayed as supporting field description.
2251
+
2252
+ ReactNode
2253
+
2254
+
2255
+
2256
+ | \- | Set object |
2257
+ | horizontal |
2258
+
2259
+ Displays the label and input field inline instead of stacked vertically.
2260
+
2261
+ boolean
2262
+
2263
+
2264
+
2265
+ | \- | Set boolean |
2266
+ | htmlFor |
2267
+
2268
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
2269
+
2270
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
2271
+
2272
+ unknown
2273
+
2274
+
2275
+
2276
+ | \- | Set object |
2277
+ | label\* |
2278
+
2279
+ Text to be displayed in the label.
2280
+
2281
+ ReactNode
2282
+
2283
+
2284
+
2285
+ | \- |
2286
+
2287
+ "Field Label"
2288
+
2289
+ |
2290
+ | labelWidth |
2291
+
2292
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
2293
+
2294
+ string
2295
+
2296
+
2297
+
2298
+ | \- | Set string |
2299
+ | readOnly |
2300
+
2301
+ Renders the group in a read-only state (no asterisk symbol).
2302
+
2303
+ boolean
2304
+
2305
+
2306
+
2307
+ | \- | Set boolean |
2308
+ | removeErrorMargin |
2309
+
2310
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
2311
+
2312
+ boolean
2313
+
2314
+
2315
+
2316
+ |
2317
+
2318
+ false
2319
+
2320
+ | Set boolean |
2321
+ | supplementary |
2322
+
2323
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
2324
+
2325
+ ReactNode
2326
+
2327
+
2328
+
2329
+ | \- | Set object |
2330
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
2331
+
2332
+ `IressFieldGroup`
2333
+ -----------------
2334
+
2335
+ The `IressFieldGroup` component is used to group multiple `Field` components together. This is useful when you have multiple fields that are related to each other, and you want to display them together.
2336
+
2337
+ Under the hood it uses a `fieldset` and `legend` element to group the fields together, improving the semantics of your form if you use multiple inputs (eg. in the case of a checkbox group) and making it more accessible.
2338
+
2339
+ [](./iframe.html?id=components-field-fieldgroup--default)
2340
+
2341
+ Full name
2342
+
2343
+ Title
2344
+
2345
+ \*RequiredFirst name
2346
+
2347
+ \*RequiredLast name
2348
+
2349
+ ```
2350
+
2351
+ <IressFieldGroup label\="Full name"\>
2352
+ <IressField
2353
+ htmlFor\="title"
2354
+ label\="Title"
2355
+ \>
2356
+ <IressInput
2357
+ id\="title"
2358
+ name\="title"
2359
+ type\="text"
2360
+ width\="2"
2361
+ />
2362
+ </IressField\>
2363
+ <IressField
2364
+ htmlFor\="firstName"
2365
+ label\="First name"
2366
+ required
2367
+ \>
2368
+ <IressInput
2369
+ id\="firstName"
2370
+ name\="firstName"
2371
+ required
2372
+ type\="text"
2373
+ />
2374
+ </IressField\>
2375
+ <IressField
2376
+ htmlFor\="lastName"
2377
+ label\="Last name"
2378
+ required
2379
+ \>
2380
+ <IressInput
2381
+ id\="lastName"
2382
+ name\="lastName"
2383
+ required
2384
+ type\="text"
2385
+ />
2386
+ </IressField\>
2387
+ </IressFieldGroup\>
2388
+
2389
+ ```
2390
+
2391
+ #### Props
2392
+
2393
+ | Name | Description | Default | Control |
2394
+ | --- | --- | --- | --- |
2395
+ | children |
2396
+ The form control this field is related to.
2397
+
2398
+ ReactNode
2399
+
2400
+
2401
+
2402
+ | \- | \- |
2403
+ | error |
2404
+
2405
+ Validation error to be displayed above the field.
2406
+
2407
+ ReactNode
2408
+
2409
+
2410
+
2411
+ | \- | Set object |
2412
+ | errorMessages |
2413
+
2414
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
2415
+
2416
+ ValidationMessageObj\[\]
2417
+
2418
+ | \- | Set object |
2419
+ | hint |
2420
+
2421
+ Text to be displayed as supporting field description.
2422
+
2423
+ ReactNode
2424
+
2425
+
2426
+
2427
+ | \- | Set object |
2428
+ | horizontal |
2429
+
2430
+ Displays the label and input field inline instead of stacked vertically.
2431
+
2432
+ boolean
2433
+
2434
+
2435
+
2436
+ | \- | Set boolean |
2437
+ | htmlFor |
2438
+
2439
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
2440
+
2441
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
2442
+
2443
+ unknown
2444
+
2445
+
2446
+
2447
+ | \- | Set object |
2448
+ | inline |
2449
+
2450
+ Displays multiple children inline rather than stacked, with a small gap.
2451
+
2452
+ boolean
2453
+
2454
+
2455
+
2456
+ | \- | Set boolean |
2457
+ | join |
2458
+
2459
+ Displays multiple children inline and removes column gap.
2460
+
2461
+ boolean
2462
+
2463
+
2464
+
2465
+ | \- | Set boolean |
2466
+ | label\* |
2467
+
2468
+ Text to be displayed in the label.
2469
+
2470
+ ReactNode
2471
+
2472
+
2473
+
2474
+ | \- |
2475
+
2476
+ "Full name"
2477
+
2478
+ |
2479
+ | labelWidth |
2480
+
2481
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
2482
+
2483
+ string
2484
+
2485
+
2486
+
2487
+ | \- | Set string |
2488
+ | readOnly |
2489
+
2490
+ Renders the group in a read-only state (no asterisk symbol).
2491
+
2492
+ boolean
2493
+
2494
+
2495
+
2496
+ | \- | Set boolean |
2497
+ | removeErrorMargin |
2498
+
2499
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
2500
+
2501
+ boolean
2502
+
2503
+
2504
+
2505
+ | \- | Set boolean |
2506
+ | supplementary |
2507
+
2508
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
2509
+
2510
+ ReactNode
2511
+
2512
+
2513
+
2514
+ | \- | Set object |
2515
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
2516
+
2517
+ ### Inline
2518
+
2519
+ Multiple fields can be displayed inline using the `inline` prop. On smaller screens, inline elements will wrap on to a new line if there's not enough space for everything on one line.
2520
+
2521
+ [](./iframe.html?id=components-field-fieldgroup--inline)
2522
+
2523
+ Full name
2524
+
2525
+ Title
2526
+
2527
+ \*RequiredFirst name
2528
+
2529
+ \*RequiredLast name
2530
+
2531
+ ```
2532
+
2533
+ <IressFieldGroup
2534
+ inline
2535
+ label\="Full name"
2536
+ \>
2537
+ <IressField
2538
+ htmlFor\="title"
2539
+ label\="Title"
2540
+ \>
2541
+ <IressInput
2542
+ id\="title"
2543
+ name\="title"
2544
+ type\="text"
2545
+ width\="2"
2546
+ />
2547
+ </IressField\>
2548
+ <IressField
2549
+ htmlFor\="firstName"
2550
+ label\="First name"
2551
+ required
2552
+ \>
2553
+ <IressInput
2554
+ id\="firstName"
2555
+ name\="firstName"
2556
+ required
2557
+ type\="text"
2558
+ />
2559
+ </IressField\>
2560
+ <IressField
2561
+ htmlFor\="lastName"
2562
+ label\="Last name"
2563
+ required
2564
+ \>
2565
+ <IressInput
2566
+ id\="lastName"
2567
+ name\="lastName"
2568
+ required
2569
+ type\="text"
2570
+ />
2571
+ </IressField\>
2572
+ </IressFieldGroup\>
2573
+
2574
+ ```
2575
+
2576
+ #### Props
2577
+
2578
+ | Name | Description | Default | Control |
2579
+ | --- | --- | --- | --- |
2580
+ | children |
2581
+ The form control this field is related to.
2582
+
2583
+ ReactNode
2584
+
2585
+
2586
+
2587
+ | \- | \- |
2588
+ | error |
2589
+
2590
+ Validation error to be displayed above the field.
2591
+
2592
+ ReactNode
2593
+
2594
+
2595
+
2596
+ | \- | Set object |
2597
+ | errorMessages |
2598
+
2599
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
2600
+
2601
+ ValidationMessageObj\[\]
2602
+
2603
+ | \- | Set object |
2604
+ | hint |
2605
+
2606
+ Text to be displayed as supporting field description.
2607
+
2608
+ ReactNode
2609
+
2610
+
2611
+
2612
+ | \- | Set object |
2613
+ | horizontal |
2614
+
2615
+ Displays the label and input field inline instead of stacked vertically.
2616
+
2617
+ boolean
2618
+
2619
+
2620
+
2621
+ | \- | Set boolean |
2622
+ | htmlFor |
2623
+
2624
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
2625
+
2626
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
2627
+
2628
+ unknown
2629
+
2630
+
2631
+
2632
+ | \- | Set object |
2633
+ | inline |
2634
+
2635
+ Displays multiple children inline rather than stacked, with a small gap.
2636
+
2637
+ boolean
2638
+
2639
+
2640
+
2641
+ | \- | FalseTrue |
2642
+ | join |
2643
+
2644
+ Displays multiple children inline and removes column gap.
2645
+
2646
+ boolean
2647
+
2648
+
2649
+
2650
+ | \- | Set boolean |
2651
+ | label\* |
2652
+
2653
+ Text to be displayed in the label.
2654
+
2655
+ ReactNode
2656
+
2657
+
2658
+
2659
+ | \- |
2660
+
2661
+ "Full name"
2662
+
2663
+ |
2664
+ | labelWidth |
2665
+
2666
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
2667
+
2668
+ string
2669
+
2670
+
2671
+
2672
+ | \- | Set string |
2673
+ | readOnly |
2674
+
2675
+ Renders the group in a read-only state (no asterisk symbol).
2676
+
2677
+ boolean
2678
+
2679
+
2680
+
2681
+ | \- | Set boolean |
2682
+ | removeErrorMargin |
2683
+
2684
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
2685
+
2686
+ boolean
2687
+
2688
+
2689
+
2690
+ | \- | Set boolean |
2691
+ | supplementary |
2692
+
2693
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
2694
+
2695
+ ReactNode
2696
+
2697
+
2698
+
2699
+ | \- | Set object |
2700
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
2701
+
2702
+ [](./iframe.html?id=components-field-fieldgroup--inline-sink)
2703
+
2704
+ Full name
2705
+
2706
+ Emoji
2707
+
2708
+ Title
2709
+
2710
+ MrMrsMiss
2711
+
2712
+ \*RequiredFirst name
2713
+
2714
+ \*RequiredLast name
2715
+
2716
+ Submit
2717
+
2718
+ Settings goes here
2719
+
2720
+ ```
2721
+
2722
+ <form\>
2723
+ <IressFieldGroup
2724
+ inline
2725
+ label\="Full name"
2726
+ \>
2727
+ <IressField
2728
+ htmlFor\="emoji"
2729
+ label\="Emoji"
2730
+ \>
2731
+ <IressRichSelect
2732
+ container\={document.body}
2733
+ id\="emoji"
2734
+ options\={\[
2735
+ {
2736
+ label: '🐶',
2737
+ value: 'dog'
2738
+ },
2739
+ {
2740
+ label: '🐱',
2741
+ value: 'cat'
2742
+ },
2743
+ {
2744
+ label: '🐭',
2745
+ value: 'mouse'
2746
+ }
2747
+ \]}
2748
+ width\="2"
2749
+ />
2750
+ </IressField\>
2751
+ <IressField
2752
+ htmlFor\="title"
2753
+ label\="Title"
2754
+ \>
2755
+ <IressSelect
2756
+ id\="title"
2757
+ width\="2"
2758
+ \>
2759
+ <option value\="mr"\>
2760
+ Mr </option\>
2761
+ <option value\="mrs"\>
2762
+ Mrs </option\>
2763
+ <option value\="miss"\>
2764
+ Miss </option\>
2765
+ </IressSelect\>
2766
+ </IressField\>
2767
+ <IressField
2768
+ htmlFor\="firstName"
2769
+ label\="First name"
2770
+ required
2771
+ \>
2772
+ <IressInput
2773
+ id\="firstName"
2774
+ required
2775
+ />
2776
+ </IressField\>
2777
+ <IressField
2778
+ htmlFor\="lastName"
2779
+ label\="Last name"
2780
+ required
2781
+ \>
2782
+ <IressInput
2783
+ id\="lastName"
2784
+ required
2785
+ />
2786
+ </IressField\>
2787
+ <IressButton type\="submit"\>
2788
+ Submit </IressButton\>
2789
+ <IressPopover activator\={<IressButton\><IressIcon name\="cog" /></IressButton\>}\>
2790
+ <IressPanel\>
2791
+ Settings goes here </IressPanel\>
2792
+ </IressPopover\>
2793
+ </IressFieldGroup\>
2794
+ </form\>
2795
+
2796
+ ```
2797
+
2798
+ #### Props
2799
+
2800
+ | Name | Description | Default | Control |
2801
+ | --- | --- | --- | --- |
2802
+ | children |
2803
+ The form control this field is related to.
2804
+
2805
+ ReactNode
2806
+
2807
+
2808
+
2809
+ | \- | \- |
2810
+ | error |
2811
+
2812
+ Validation error to be displayed above the field.
2813
+
2814
+ ReactNode
2815
+
2816
+
2817
+
2818
+ | \- | Set object |
2819
+ | errorMessages |
2820
+
2821
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
2822
+
2823
+ ValidationMessageObj\[\]
2824
+
2825
+ | \- | Set object |
2826
+ | hint |
2827
+
2828
+ Text to be displayed as supporting field description.
2829
+
2830
+ ReactNode
2831
+
2832
+
2833
+
2834
+ | \- | Set object |
2835
+ | horizontal |
2836
+
2837
+ Displays the label and input field inline instead of stacked vertically.
2838
+
2839
+ boolean
2840
+
2841
+
2842
+
2843
+ | \- | Set boolean |
2844
+ | htmlFor |
2845
+
2846
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
2847
+
2848
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
2849
+
2850
+ unknown
2851
+
2852
+
2853
+
2854
+ | \- | Set object |
2855
+ | inline |
2856
+
2857
+ Displays multiple children inline rather than stacked, with a small gap.
2858
+
2859
+ boolean
2860
+
2861
+
2862
+
2863
+ | \- | FalseTrue |
2864
+ | join |
2865
+
2866
+ Displays multiple children inline and removes column gap.
2867
+
2868
+ boolean
2869
+
2870
+
2871
+
2872
+ | \- | Set boolean |
2873
+ | label\* |
2874
+
2875
+ Text to be displayed in the label.
2876
+
2877
+ ReactNode
2878
+
2879
+
2880
+
2881
+ | \- |
2882
+
2883
+ "Full name"
2884
+
2885
+ |
2886
+ | labelWidth |
2887
+
2888
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
2889
+
2890
+ string
2891
+
2892
+
2893
+
2894
+ | \- | Set string |
2895
+ | readOnly |
2896
+
2897
+ Renders the group in a read-only state (no asterisk symbol).
2898
+
2899
+ boolean
2900
+
2901
+
2902
+
2903
+ | \- | Set boolean |
2904
+ | removeErrorMargin |
2905
+
2906
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
2907
+
2908
+ boolean
2909
+
2910
+
2911
+
2912
+ | \- | Set boolean |
2913
+ | supplementary |
2914
+
2915
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
2916
+
2917
+ ReactNode
2918
+
2919
+
2920
+
2921
+ | \- | Set object |
2922
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
2923
+
2924
+ ### Join
2925
+
2926
+ Elements can also be joined together using the `join` prop. Joined elements won't wrap on to a new line, so make sure you test your designs on small screens; depending on the use case, you may be better off with a standard inline layout (or two separate fields!).
2927
+
2928
+ **Note:** The `join` prop works out of the box with IDS components. To enable your custom components to work with the `join` prop, you need to ensure the direct child of `IressFieldGroup` has the class `GlobalCSSClass.FormElement`. If the direct child is not the element with the border, add the class `GlobalCSSClass.FormElementInner` to the element with the border.
2929
+
2930
+ [](./iframe.html?id=components-field-fieldgroup--join)
2931
+
2932
+ Full name
2933
+
2934
+ Title
2935
+
2936
+ \*RequiredFirst name
2937
+
2938
+ \*RequiredLast name
2939
+
2940
+ ```
2941
+
2942
+ <IressFieldGroup
2943
+ join
2944
+ label\="Full name"
2945
+ \>
2946
+ <IressField
2947
+ htmlFor\="title"
2948
+ label\="Title"
2949
+ \>
2950
+ <IressInput
2951
+ id\="title"
2952
+ name\="title"
2953
+ type\="text"
2954
+ width\="2"
2955
+ />
2956
+ </IressField\>
2957
+ <IressField
2958
+ htmlFor\="firstName"
2959
+ label\="First name"
2960
+ required
2961
+ \>
2962
+ <IressInput
2963
+ id\="firstName"
2964
+ name\="firstName"
2965
+ required
2966
+ type\="text"
2967
+ />
2968
+ </IressField\>
2969
+ <IressField
2970
+ htmlFor\="lastName"
2971
+ label\="Last name"
2972
+ required
2973
+ \>
2974
+ <IressInput
2975
+ id\="lastName"
2976
+ name\="lastName"
2977
+ required
2978
+ type\="text"
2979
+ />
2980
+ </IressField\>
2981
+ </IressFieldGroup\>
2982
+
2983
+ ```
2984
+
2985
+ #### Props
2986
+
2987
+ | Name | Description | Default | Control |
2988
+ | --- | --- | --- | --- |
2989
+ | children |
2990
+ The form control this field is related to.
2991
+
2992
+ ReactNode
2993
+
2994
+
2995
+
2996
+ | \- | \- |
2997
+ | error |
2998
+
2999
+ Validation error to be displayed above the field.
3000
+
3001
+ ReactNode
3002
+
3003
+
3004
+
3005
+ | \- | Set object |
3006
+ | errorMessages |
3007
+
3008
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
3009
+
3010
+ ValidationMessageObj\[\]
3011
+
3012
+ | \- | Set object |
3013
+ | hint |
3014
+
3015
+ Text to be displayed as supporting field description.
3016
+
3017
+ ReactNode
3018
+
3019
+
3020
+
3021
+ | \- | Set object |
3022
+ | horizontal |
3023
+
3024
+ Displays the label and input field inline instead of stacked vertically.
3025
+
3026
+ boolean
3027
+
3028
+
3029
+
3030
+ | \- | Set boolean |
3031
+ | htmlFor |
3032
+
3033
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
3034
+
3035
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
3036
+
3037
+ unknown
3038
+
3039
+
3040
+
3041
+ | \- | Set object |
3042
+ | inline |
3043
+
3044
+ Displays multiple children inline rather than stacked, with a small gap.
3045
+
3046
+ boolean
3047
+
3048
+
3049
+
3050
+ | \- | Set boolean |
3051
+ | join |
3052
+
3053
+ Displays multiple children inline and removes column gap.
3054
+
3055
+ boolean
3056
+
3057
+
3058
+
3059
+ | \- | FalseTrue |
3060
+ | label\* |
3061
+
3062
+ Text to be displayed in the label.
3063
+
3064
+ ReactNode
3065
+
3066
+
3067
+
3068
+ | \- |
3069
+
3070
+ "Full name"
3071
+
3072
+ |
3073
+ | labelWidth |
3074
+
3075
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
3076
+
3077
+ string
3078
+
3079
+
3080
+
3081
+ | \- | Set string |
3082
+ | readOnly |
3083
+
3084
+ Renders the group in a read-only state (no asterisk symbol).
3085
+
3086
+ boolean
3087
+
3088
+
3089
+
3090
+ | \- | Set boolean |
3091
+ | removeErrorMargin |
3092
+
3093
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
3094
+
3095
+ boolean
3096
+
3097
+
3098
+
3099
+ | \- | Set boolean |
3100
+ | supplementary |
3101
+
3102
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
3103
+
3104
+ ReactNode
3105
+
3106
+
3107
+
3108
+ | \- | Set object |
3109
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
3110
+
3111
+ [](./iframe.html?id=components-field-fieldgroup--join-sink)
3112
+
3113
+ Full name
3114
+
3115
+ Emoji
3116
+
3117
+ Title
3118
+
3119
+ MrMrsMiss
3120
+
3121
+ \*RequiredFirst name
3122
+
3123
+ \*RequiredLast name
3124
+
3125
+ Submit
3126
+
3127
+ Settings goes here
3128
+
3129
+ ```
3130
+
3131
+ <form\>
3132
+ <IressFieldGroup
3133
+ inline
3134
+ join
3135
+ label\="Full name"
3136
+ \>
3137
+ <IressField
3138
+ htmlFor\="emoji"
3139
+ label\="Emoji"
3140
+ \>
3141
+ <IressRichSelect
3142
+ container\={document.body}
3143
+ id\="emoji"
3144
+ options\={\[
3145
+ {
3146
+ label: '🐶',
3147
+ value: 'dog'
3148
+ },
3149
+ {
3150
+ label: '🐱',
3151
+ value: 'cat'
3152
+ },
3153
+ {
3154
+ label: '🐭',
3155
+ value: 'mouse'
3156
+ }
3157
+ \]}
3158
+ width\="2"
3159
+ />
3160
+ </IressField\>
3161
+ <IressField
3162
+ htmlFor\="title"
3163
+ label\="Title"
3164
+ \>
3165
+ <IressSelect
3166
+ id\="title"
3167
+ width\="2"
3168
+ \>
3169
+ <option value\="mr"\>
3170
+ Mr </option\>
3171
+ <option value\="mrs"\>
3172
+ Mrs </option\>
3173
+ <option value\="miss"\>
3174
+ Miss </option\>
3175
+ </IressSelect\>
3176
+ </IressField\>
3177
+ <IressField
3178
+ htmlFor\="firstName"
3179
+ label\="First name"
3180
+ required
3181
+ \>
3182
+ <IressInput
3183
+ id\="firstName"
3184
+ required
3185
+ />
3186
+ </IressField\>
3187
+ <IressField
3188
+ htmlFor\="lastName"
3189
+ label\="Last name"
3190
+ required
3191
+ \>
3192
+ <IressInput
3193
+ id\="lastName"
3194
+ required
3195
+ />
3196
+ </IressField\>
3197
+ <IressButton type\="submit"\>
3198
+ Submit </IressButton\>
3199
+ <IressPopover activator\={<IressButton\><IressIcon name\="cog" /></IressButton\>}\>
3200
+ <IressPanel\>
3201
+ Settings goes here </IressPanel\>
3202
+ </IressPopover\>
3203
+ </IressFieldGroup\>
3204
+ </form\>
3205
+
3206
+ ```
3207
+
3208
+ #### Props
3209
+
3210
+ | Name | Description | Default | Control |
3211
+ | --- | --- | --- | --- |
3212
+ | children |
3213
+ The form control this field is related to.
3214
+
3215
+ ReactNode
3216
+
3217
+
3218
+
3219
+ | \- | \- |
3220
+ | error |
3221
+
3222
+ Validation error to be displayed above the field.
3223
+
3224
+ ReactNode
3225
+
3226
+
3227
+
3228
+ | \- | Set object |
3229
+ | errorMessages |
3230
+
3231
+ Validation errors to be displayed above the field, an array of validation messages to be displayed in `IressValidationSummary`.
3232
+
3233
+ ValidationMessageObj\[\]
3234
+
3235
+ | \- | Set object |
3236
+ | hint |
3237
+
3238
+ Text to be displayed as supporting field description.
3239
+
3240
+ ReactNode
3241
+
3242
+
3243
+
3244
+ | \- | Set object |
3245
+ | horizontal |
3246
+
3247
+ Displays the label and input field inline instead of stacked vertically.
3248
+
3249
+ boolean
3250
+
3251
+
3252
+
3253
+ | \- | Set boolean |
3254
+ | htmlFor |
3255
+
3256
+ Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
3257
+
3258
+ [Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
3259
+
3260
+ unknown
3261
+
3262
+
3263
+
3264
+ | \- | Set object |
3265
+ | inline |
3266
+
3267
+ Displays multiple children inline rather than stacked, with a small gap.
3268
+
3269
+ boolean
3270
+
3271
+
3272
+
3273
+ | \- | FalseTrue |
3274
+ | join |
3275
+
3276
+ Displays multiple children inline and removes column gap.
3277
+
3278
+ boolean
3279
+
3280
+
3281
+
3282
+ | \- | FalseTrue |
3283
+ | label\* |
3284
+
3285
+ Text to be displayed in the label.
3286
+
3287
+ ReactNode
3288
+
3289
+
3290
+
3291
+ | \- |
3292
+
3293
+ "Full name"
3294
+
3295
+ |
3296
+ | labelWidth |
3297
+
3298
+ Controls the width of the label container when in horizontal mode. Can be any valid CSS width value (e.g., '200px', '20%', 'auto'). Only applies when `horizontal` is true.
3299
+
3300
+ string
3301
+
3302
+
3303
+
3304
+ | \- | Set string |
3305
+ | readOnly |
3306
+
3307
+ Renders the group in a read-only state (no asterisk symbol).
3308
+
3309
+ boolean
3310
+
3311
+
3312
+
3313
+ | \- | Set boolean |
3314
+ | removeErrorMargin |
3315
+
3316
+ Removes the reserved space for error messages, allowing fields to stack with narrower gaps. When true, no margin is reserved for potential error messages.
3317
+
3318
+ boolean
3319
+
3320
+
3321
+
3322
+ | \- | Set boolean |
3323
+ | supplementary |
3324
+
3325
+ Supplementary content to be displayed below the field. Is only shown when the field is not in an error state.
3326
+
3327
+ ReactNode
3328
+
3329
+
3330
+
3331
+ | \- | Set object |
3332
+ | Show Storybook only itemsStorybook only | Show Storybook only items |
3333
+
3334
+ `IressForm` integration
3335
+ -----------------------
3336
+
3337
+ As of version 5, `IressField` is a standalone component and does not handle validation.
3338
+
3339
+ If you want out-of-the-box validation, use the `IressFormField` inside an `IressForm`. This will handle validation for you, and provide a consistent way to handle form state.
3340
+
3341
+ [
3342
+
3343
+ View forms documentation for fields
3344
+
3345
+ ](/?path=/docs/components-form--docs#fields)