@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,1573 @@
|
|
|
1
|
+
RadioGroup
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
A radio group is a group of radio buttons that allows the user to select one option from multiple options, where all options are visible.
|
|
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-radiogroup--radio-children)
|
|
18
|
+
|
|
19
|
+
Google
|
|
20
|
+
|
|
21
|
+
Newspaper
|
|
22
|
+
|
|
23
|
+
Friend
|
|
24
|
+
|
|
25
|
+
Other
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<IressRadioGroup\>
|
|
30
|
+
<IressRadio value\="google"\>
|
|
31
|
+
Google </IressRadio\>
|
|
32
|
+
<IressRadio value\="newspaper"\>
|
|
33
|
+
Newspaper </IressRadio\>
|
|
34
|
+
<IressRadio value\="friend"\>
|
|
35
|
+
Friend </IressRadio\>
|
|
36
|
+
<IressRadio value\="other"\>
|
|
37
|
+
Other </IressRadio\>
|
|
38
|
+
</IressRadioGroup\>
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Props
|
|
43
|
+
-----
|
|
44
|
+
|
|
45
|
+
IressRadioGroupIressRadio
|
|
46
|
+
|
|
47
|
+
Tabs
|
|
48
|
+
|
|
49
|
+
| Name | Description | Default | Control |
|
|
50
|
+
| --- | --- | --- | --- |
|
|
51
|
+
| children |
|
|
52
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
53
|
+
|
|
54
|
+
ReactNode
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
| \- | \- |
|
|
59
|
+
| defaultValue |
|
|
60
|
+
|
|
61
|
+
Initial value of radio group when in uncontrolled mode.
|
|
62
|
+
|
|
63
|
+
T
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
| \- | Set object |
|
|
68
|
+
| hiddenRadio |
|
|
69
|
+
|
|
70
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
71
|
+
|
|
72
|
+
boolean
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
| \- | Set boolean |
|
|
77
|
+
| layout |
|
|
78
|
+
|
|
79
|
+
Sets which of the block / inline layout options apply.
|
|
80
|
+
|
|
81
|
+
union
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
|
86
|
+
|
|
87
|
+
'stack'
|
|
88
|
+
|
|
89
|
+
|
|
|
90
|
+
|
|
91
|
+
stackblockinlineinlineFlexinlineEqualWidth
|
|
92
|
+
|
|
93
|
+
|
|
|
94
|
+
| name |
|
|
95
|
+
|
|
96
|
+
Name to be applied to all radios in the group.
|
|
97
|
+
|
|
98
|
+
string
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
| \- | Set string |
|
|
103
|
+
| onChange |
|
|
104
|
+
|
|
105
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
106
|
+
|
|
107
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
108
|
+
|
|
109
|
+
| \- | \- |
|
|
110
|
+
| readOnly |
|
|
111
|
+
|
|
112
|
+
Renders a readOnly radio group.
|
|
113
|
+
|
|
114
|
+
boolean
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
| \- | Set boolean |
|
|
119
|
+
| required |
|
|
120
|
+
|
|
121
|
+
When true, marks the field as required
|
|
122
|
+
|
|
123
|
+
boolean
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
| \- | Set boolean |
|
|
128
|
+
| role |
|
|
129
|
+
|
|
130
|
+
|
|
|
131
|
+
|
|
132
|
+
'radiogroup'
|
|
133
|
+
|
|
134
|
+
| Set object |
|
|
135
|
+
| touch |
|
|
136
|
+
|
|
137
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
138
|
+
|
|
139
|
+
boolean
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
| \- | Set boolean |
|
|
144
|
+
| value |
|
|
145
|
+
|
|
146
|
+
Value of radio group when in controlled mode.
|
|
147
|
+
|
|
148
|
+
T
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
| \- | Set object |
|
|
153
|
+
|
|
154
|
+
Examples
|
|
155
|
+
--------
|
|
156
|
+
|
|
157
|
+
### Radio children
|
|
158
|
+
|
|
159
|
+
Individual radio buttons can be passed directly into `IressRadioGroup`.
|
|
160
|
+
|
|
161
|
+
**Note:** The `mapRadioGroupOptions` helper function, originally used to map options to `IressRadio` components, is now deprecated. Instead, you can use `array.map` to map the options to `IressRadio` components.
|
|
162
|
+
|
|
163
|
+
[](./iframe.html?id=components-radiogroup--radio-children)
|
|
164
|
+
|
|
165
|
+
Google
|
|
166
|
+
|
|
167
|
+
Newspaper
|
|
168
|
+
|
|
169
|
+
Friend
|
|
170
|
+
|
|
171
|
+
Other
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
<IressRadioGroup\>
|
|
176
|
+
<IressRadio value\="google"\>
|
|
177
|
+
Google </IressRadio\>
|
|
178
|
+
<IressRadio value\="newspaper"\>
|
|
179
|
+
Newspaper </IressRadio\>
|
|
180
|
+
<IressRadio value\="friend"\>
|
|
181
|
+
Friend </IressRadio\>
|
|
182
|
+
<IressRadio value\="other"\>
|
|
183
|
+
Other </IressRadio\>
|
|
184
|
+
</IressRadioGroup\>
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### Props
|
|
189
|
+
|
|
190
|
+
IressRadioGroupIressRadio
|
|
191
|
+
|
|
192
|
+
Tabs
|
|
193
|
+
|
|
194
|
+
| Name | Description | Default | Control |
|
|
195
|
+
| --- | --- | --- | --- |
|
|
196
|
+
| children |
|
|
197
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
198
|
+
|
|
199
|
+
ReactNode
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
| \- | \- |
|
|
204
|
+
| defaultValue |
|
|
205
|
+
|
|
206
|
+
Initial value of radio group when in uncontrolled mode.
|
|
207
|
+
|
|
208
|
+
T
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
| \- | Set object |
|
|
213
|
+
| hiddenRadio |
|
|
214
|
+
|
|
215
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
216
|
+
|
|
217
|
+
boolean
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
| \- | Set boolean |
|
|
222
|
+
| layout |
|
|
223
|
+
|
|
224
|
+
Sets which of the block / inline layout options apply.
|
|
225
|
+
|
|
226
|
+
union
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
|
231
|
+
|
|
232
|
+
'stack'
|
|
233
|
+
|
|
234
|
+
|
|
|
235
|
+
|
|
236
|
+
stackblockinlineinlineFlexinlineEqualWidth
|
|
237
|
+
|
|
238
|
+
|
|
|
239
|
+
| name |
|
|
240
|
+
|
|
241
|
+
Name to be applied to all radios in the group.
|
|
242
|
+
|
|
243
|
+
string
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
| \- | Set string |
|
|
248
|
+
| onChange |
|
|
249
|
+
|
|
250
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
251
|
+
|
|
252
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
253
|
+
|
|
254
|
+
| \- | \- |
|
|
255
|
+
| readOnly |
|
|
256
|
+
|
|
257
|
+
Renders a readOnly radio group.
|
|
258
|
+
|
|
259
|
+
boolean
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
| \- | Set boolean |
|
|
264
|
+
| required |
|
|
265
|
+
|
|
266
|
+
When true, marks the field as required
|
|
267
|
+
|
|
268
|
+
boolean
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
| \- | Set boolean |
|
|
273
|
+
| role |
|
|
274
|
+
|
|
275
|
+
|
|
|
276
|
+
|
|
277
|
+
'radiogroup'
|
|
278
|
+
|
|
279
|
+
| Set object |
|
|
280
|
+
| touch |
|
|
281
|
+
|
|
282
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
283
|
+
|
|
284
|
+
boolean
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
| \- | Set boolean |
|
|
289
|
+
| value |
|
|
290
|
+
|
|
291
|
+
Value of radio group when in controlled mode.
|
|
292
|
+
|
|
293
|
+
T
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
| \- | Set object |
|
|
298
|
+
|
|
299
|
+
### Radio selection
|
|
300
|
+
|
|
301
|
+
The default checked state of the radio children should always be set using the `value` prop. Sometimes you may wish to use the `IressRadioGroup` as an "uncontrolled" component - for example, because you are using a third party form library that requires it. In this case, simply use `defaultValue` instead of `value`.
|
|
302
|
+
|
|
303
|
+
**Note:** The `value` prop on the `IressRadioGroup` component will always override the `checked` state of the `IressRadio` children.
|
|
304
|
+
|
|
305
|
+
[](./iframe.html?id=components-radiogroup--radio-selection)
|
|
306
|
+
|
|
307
|
+
Google
|
|
308
|
+
|
|
309
|
+
Newspaper
|
|
310
|
+
|
|
311
|
+
Friend
|
|
312
|
+
|
|
313
|
+
Other
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
<IressRadioGroup defaultValue\="newspaper"\>
|
|
318
|
+
<IressRadio value\="google"\>
|
|
319
|
+
Google </IressRadio\>
|
|
320
|
+
<IressRadio value\="newspaper"\>
|
|
321
|
+
Newspaper </IressRadio\>
|
|
322
|
+
<IressRadio value\="friend"\>
|
|
323
|
+
Friend </IressRadio\>
|
|
324
|
+
<IressRadio value\="other"\>
|
|
325
|
+
Other </IressRadio\>
|
|
326
|
+
</IressRadioGroup\>
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
#### Props
|
|
331
|
+
|
|
332
|
+
IressRadioGroupIressRadio
|
|
333
|
+
|
|
334
|
+
Tabs
|
|
335
|
+
|
|
336
|
+
| Name | Description | Default | Control |
|
|
337
|
+
| --- | --- | --- | --- |
|
|
338
|
+
| children |
|
|
339
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
340
|
+
|
|
341
|
+
ReactNode
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
| \- | \- |
|
|
346
|
+
| defaultValue |
|
|
347
|
+
|
|
348
|
+
Initial value of radio group when in uncontrolled mode.
|
|
349
|
+
|
|
350
|
+
T
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
| \- |
|
|
355
|
+
|
|
356
|
+
"newspaper"
|
|
357
|
+
|
|
358
|
+
|
|
|
359
|
+
| hiddenRadio |
|
|
360
|
+
|
|
361
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
362
|
+
|
|
363
|
+
boolean
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
| \- | Set boolean |
|
|
368
|
+
| layout |
|
|
369
|
+
|
|
370
|
+
Sets which of the block / inline layout options apply.
|
|
371
|
+
|
|
372
|
+
union
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
|
377
|
+
|
|
378
|
+
'stack'
|
|
379
|
+
|
|
380
|
+
|
|
|
381
|
+
|
|
382
|
+
stackblockinlineinlineFlexinlineEqualWidth
|
|
383
|
+
|
|
384
|
+
|
|
|
385
|
+
| name |
|
|
386
|
+
|
|
387
|
+
Name to be applied to all radios in the group.
|
|
388
|
+
|
|
389
|
+
string
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
| \- | Set string |
|
|
394
|
+
| onChange |
|
|
395
|
+
|
|
396
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
397
|
+
|
|
398
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
399
|
+
|
|
400
|
+
| \- | \- |
|
|
401
|
+
| readOnly |
|
|
402
|
+
|
|
403
|
+
Renders a readOnly radio group.
|
|
404
|
+
|
|
405
|
+
boolean
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
| \- | Set boolean |
|
|
410
|
+
| required |
|
|
411
|
+
|
|
412
|
+
When true, marks the field as required
|
|
413
|
+
|
|
414
|
+
boolean
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
| \- | Set boolean |
|
|
419
|
+
| role |
|
|
420
|
+
|
|
421
|
+
|
|
|
422
|
+
|
|
423
|
+
'radiogroup'
|
|
424
|
+
|
|
425
|
+
| Set object |
|
|
426
|
+
| touch |
|
|
427
|
+
|
|
428
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
429
|
+
|
|
430
|
+
boolean
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
| \- | Set boolean |
|
|
435
|
+
| value |
|
|
436
|
+
|
|
437
|
+
Value of radio group when in controlled mode.
|
|
438
|
+
|
|
439
|
+
T
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
| \- | Set object |
|
|
444
|
+
|
|
445
|
+
### Layout
|
|
446
|
+
|
|
447
|
+
The layout prop controls how the radio group is displayed and can have three basic layouts:
|
|
448
|
+
|
|
449
|
+
* **stack (Default):** Radio buttons are laid out vertically. Labels are only as wide as their text.
|
|
450
|
+
* **block:** Same as Stack, but labels take up the full width of the container.
|
|
451
|
+
* **inline:** Radio buttons are laid out horizontally. Labels are only as wide as their text.
|
|
452
|
+
* **inlineFlex:** Radio buttons are laid out horizontally. The container is only as wide as its contents.
|
|
453
|
+
* **inlineEqualWidth:** Radio buttons are laid out horizontally. Labels take up an equal amount of space in the container.
|
|
454
|
+
|
|
455
|
+
Note:
|
|
456
|
+
-----
|
|
457
|
+
|
|
458
|
+
If using any of the inline\* props within a `Field` component, the `Field` also needs the inline prop to be set for the inline layouts to take effect.
|
|
459
|
+
|
|
460
|
+
[](./iframe.html?id=components-radiogroup--layout)
|
|
461
|
+
|
|
462
|
+
### block (default)
|
|
463
|
+
|
|
464
|
+
Google
|
|
465
|
+
|
|
466
|
+
Newspaper
|
|
467
|
+
|
|
468
|
+
Friend
|
|
469
|
+
|
|
470
|
+
Other
|
|
471
|
+
|
|
472
|
+
### inline
|
|
473
|
+
|
|
474
|
+
Google
|
|
475
|
+
|
|
476
|
+
Newspaper
|
|
477
|
+
|
|
478
|
+
Friend
|
|
479
|
+
|
|
480
|
+
Other
|
|
481
|
+
|
|
482
|
+
### inlineEqualWidth
|
|
483
|
+
|
|
484
|
+
Google
|
|
485
|
+
|
|
486
|
+
Newspaper
|
|
487
|
+
|
|
488
|
+
Friend
|
|
489
|
+
|
|
490
|
+
Other
|
|
491
|
+
|
|
492
|
+
### inlineFlex
|
|
493
|
+
|
|
494
|
+
Google
|
|
495
|
+
|
|
496
|
+
Newspaper
|
|
497
|
+
|
|
498
|
+
Friend
|
|
499
|
+
|
|
500
|
+
Other
|
|
501
|
+
|
|
502
|
+
### stack
|
|
503
|
+
|
|
504
|
+
Google
|
|
505
|
+
|
|
506
|
+
Newspaper
|
|
507
|
+
|
|
508
|
+
Friend
|
|
509
|
+
|
|
510
|
+
Other
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
<IressStack gap\="md"\>
|
|
515
|
+
<IressText\>
|
|
516
|
+
<h3\>
|
|
517
|
+
block (default) </h3\>
|
|
518
|
+
<IressRadioGroup layout\="block"\>
|
|
519
|
+
<IressRadio
|
|
520
|
+
layerStyle\="elevation.raised"
|
|
521
|
+
value\="google"
|
|
522
|
+
\>
|
|
523
|
+
Google </IressRadio\>
|
|
524
|
+
<IressRadio
|
|
525
|
+
layerStyle\="elevation.raised"
|
|
526
|
+
value\="newspaper"
|
|
527
|
+
\>
|
|
528
|
+
Newspaper </IressRadio\>
|
|
529
|
+
<IressRadio
|
|
530
|
+
layerStyle\="elevation.raised"
|
|
531
|
+
value\="friend"
|
|
532
|
+
\>
|
|
533
|
+
Friend </IressRadio\>
|
|
534
|
+
<IressRadio
|
|
535
|
+
layerStyle\="elevation.raised"
|
|
536
|
+
value\="other"
|
|
537
|
+
\>
|
|
538
|
+
Other </IressRadio\>
|
|
539
|
+
</IressRadioGroup\>
|
|
540
|
+
</IressText\>
|
|
541
|
+
<IressText\>
|
|
542
|
+
<h3\>
|
|
543
|
+
inline </h3\>
|
|
544
|
+
<IressRadioGroup layout\="inline"\>
|
|
545
|
+
<IressRadio
|
|
546
|
+
layerStyle\="elevation.raised"
|
|
547
|
+
value\="google"
|
|
548
|
+
\>
|
|
549
|
+
Google </IressRadio\>
|
|
550
|
+
<IressRadio
|
|
551
|
+
layerStyle\="elevation.raised"
|
|
552
|
+
value\="newspaper"
|
|
553
|
+
\>
|
|
554
|
+
Newspaper </IressRadio\>
|
|
555
|
+
<IressRadio
|
|
556
|
+
layerStyle\="elevation.raised"
|
|
557
|
+
value\="friend"
|
|
558
|
+
\>
|
|
559
|
+
Friend </IressRadio\>
|
|
560
|
+
<IressRadio
|
|
561
|
+
layerStyle\="elevation.raised"
|
|
562
|
+
value\="other"
|
|
563
|
+
\>
|
|
564
|
+
Other </IressRadio\>
|
|
565
|
+
</IressRadioGroup\>
|
|
566
|
+
</IressText\>
|
|
567
|
+
<IressText\>
|
|
568
|
+
<h3\>
|
|
569
|
+
inlineEqualWidth </h3\>
|
|
570
|
+
<IressRadioGroup layout\="inlineEqualWidth"\>
|
|
571
|
+
<IressRadio
|
|
572
|
+
layerStyle\="elevation.raised"
|
|
573
|
+
value\="google"
|
|
574
|
+
\>
|
|
575
|
+
Google </IressRadio\>
|
|
576
|
+
<IressRadio
|
|
577
|
+
layerStyle\="elevation.raised"
|
|
578
|
+
value\="newspaper"
|
|
579
|
+
\>
|
|
580
|
+
Newspaper </IressRadio\>
|
|
581
|
+
<IressRadio
|
|
582
|
+
layerStyle\="elevation.raised"
|
|
583
|
+
value\="friend"
|
|
584
|
+
\>
|
|
585
|
+
Friend </IressRadio\>
|
|
586
|
+
<IressRadio
|
|
587
|
+
layerStyle\="elevation.raised"
|
|
588
|
+
value\="other"
|
|
589
|
+
\>
|
|
590
|
+
Other </IressRadio\>
|
|
591
|
+
</IressRadioGroup\>
|
|
592
|
+
</IressText\>
|
|
593
|
+
<IressText\>
|
|
594
|
+
<h3\>
|
|
595
|
+
inlineFlex </h3\>
|
|
596
|
+
<IressRadioGroup layout\="inlineFlex"\>
|
|
597
|
+
<IressRadio
|
|
598
|
+
layerStyle\="elevation.raised"
|
|
599
|
+
value\="google"
|
|
600
|
+
\>
|
|
601
|
+
Google </IressRadio\>
|
|
602
|
+
<IressRadio
|
|
603
|
+
layerStyle\="elevation.raised"
|
|
604
|
+
value\="newspaper"
|
|
605
|
+
\>
|
|
606
|
+
Newspaper </IressRadio\>
|
|
607
|
+
<IressRadio
|
|
608
|
+
layerStyle\="elevation.raised"
|
|
609
|
+
value\="friend"
|
|
610
|
+
\>
|
|
611
|
+
Friend </IressRadio\>
|
|
612
|
+
<IressRadio
|
|
613
|
+
layerStyle\="elevation.raised"
|
|
614
|
+
value\="other"
|
|
615
|
+
\>
|
|
616
|
+
Other </IressRadio\>
|
|
617
|
+
</IressRadioGroup\>
|
|
618
|
+
</IressText\>
|
|
619
|
+
<IressText\>
|
|
620
|
+
<h3\>
|
|
621
|
+
stack </h3\>
|
|
622
|
+
<IressRadioGroup layout\="stack"\>
|
|
623
|
+
<IressRadio
|
|
624
|
+
layerStyle\="elevation.raised"
|
|
625
|
+
value\="google"
|
|
626
|
+
\>
|
|
627
|
+
Google </IressRadio\>
|
|
628
|
+
<IressRadio
|
|
629
|
+
layerStyle\="elevation.raised"
|
|
630
|
+
value\="newspaper"
|
|
631
|
+
\>
|
|
632
|
+
Newspaper </IressRadio\>
|
|
633
|
+
<IressRadio
|
|
634
|
+
layerStyle\="elevation.raised"
|
|
635
|
+
value\="friend"
|
|
636
|
+
\>
|
|
637
|
+
Friend </IressRadio\>
|
|
638
|
+
<IressRadio
|
|
639
|
+
layerStyle\="elevation.raised"
|
|
640
|
+
value\="other"
|
|
641
|
+
\>
|
|
642
|
+
Other </IressRadio\>
|
|
643
|
+
</IressRadioGroup\>
|
|
644
|
+
</IressText\>
|
|
645
|
+
</IressStack\>
|
|
646
|
+
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
#### Props
|
|
650
|
+
|
|
651
|
+
IressRadioGroupIressRadio
|
|
652
|
+
|
|
653
|
+
Tabs
|
|
654
|
+
|
|
655
|
+
| Name | Description | Default | Control |
|
|
656
|
+
| --- | --- | --- | --- |
|
|
657
|
+
| children |
|
|
658
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
659
|
+
|
|
660
|
+
ReactNode
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
| \- | \- |
|
|
665
|
+
| defaultValue |
|
|
666
|
+
|
|
667
|
+
Initial value of radio group when in uncontrolled mode.
|
|
668
|
+
|
|
669
|
+
T
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
| \- | Set object |
|
|
674
|
+
| hiddenRadio |
|
|
675
|
+
|
|
676
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
677
|
+
|
|
678
|
+
boolean
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
| \- | Set boolean |
|
|
683
|
+
| layout |
|
|
684
|
+
|
|
685
|
+
Sets which of the block / inline layout options apply.
|
|
686
|
+
|
|
687
|
+
union
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
|
692
|
+
|
|
693
|
+
'stack'
|
|
694
|
+
|
|
695
|
+
| \- |
|
|
696
|
+
| name |
|
|
697
|
+
|
|
698
|
+
Name to be applied to all radios in the group.
|
|
699
|
+
|
|
700
|
+
string
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
| \- | Set string |
|
|
705
|
+
| onChange |
|
|
706
|
+
|
|
707
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
708
|
+
|
|
709
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
710
|
+
|
|
711
|
+
| \- | \- |
|
|
712
|
+
| readOnly |
|
|
713
|
+
|
|
714
|
+
Renders a readOnly radio group.
|
|
715
|
+
|
|
716
|
+
boolean
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
| \- | Set boolean |
|
|
721
|
+
| required |
|
|
722
|
+
|
|
723
|
+
When true, marks the field as required
|
|
724
|
+
|
|
725
|
+
boolean
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
| \- | Set boolean |
|
|
730
|
+
| role |
|
|
731
|
+
|
|
732
|
+
|
|
|
733
|
+
|
|
734
|
+
'radiogroup'
|
|
735
|
+
|
|
736
|
+
| Set object |
|
|
737
|
+
| touch |
|
|
738
|
+
|
|
739
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
740
|
+
|
|
741
|
+
boolean
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
| \- | Set boolean |
|
|
746
|
+
| value |
|
|
747
|
+
|
|
748
|
+
Value of radio group when in controlled mode.
|
|
749
|
+
|
|
750
|
+
T
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
| \- | Set object |
|
|
755
|
+
|
|
756
|
+
### Hidden radio buttons
|
|
757
|
+
|
|
758
|
+
You can use the `hiddenRadio` prop to create custom radio buttons. When enabled, the actual radio button will be visually hidden, allowing you to create more interesting controls. The checked state will be shown by the label's border, which is thicker when the radio button is checked.
|
|
759
|
+
|
|
760
|
+
When `hiddenRadio` is enabled, the label will have no padding. Padding can be added by using a Panel or utility classes.
|
|
761
|
+
|
|
762
|
+
[](./iframe.html?id=components-radiogroup--hidden-radio-buttons)
|
|
763
|
+
|
|
764
|
+
**I'd like to discuss the following in my financial review:**
|
|
765
|
+
|
|
766
|
+
Select one option
|
|
767
|
+
|
|
768
|
+
Buying my first home
|
|
769
|
+
|
|
770
|
+
Saving for a holiday
|
|
771
|
+
|
|
772
|
+
Reducing my debt
|
|
773
|
+
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
<IressField
|
|
777
|
+
hint\="Select one option"
|
|
778
|
+
label\="I'd like to discuss the following in my financial review:"
|
|
779
|
+
\>
|
|
780
|
+
<IressRadioGroup
|
|
781
|
+
defaultValue\="home"
|
|
782
|
+
hiddenRadio
|
|
783
|
+
layout\="inline"
|
|
784
|
+
required
|
|
785
|
+
\>
|
|
786
|
+
<IressRadio value\="home"\>
|
|
787
|
+
<IressPanel
|
|
788
|
+
bg\="transparent"
|
|
789
|
+
p\="lg"
|
|
790
|
+
textAlign\="center"
|
|
791
|
+
\>
|
|
792
|
+
<IressStack gap\="md"\>
|
|
793
|
+
<IressIcon
|
|
794
|
+
name\="house"
|
|
795
|
+
textStyle\="typography.heading.1"
|
|
796
|
+
/>
|
|
797
|
+
<IressText
|
|
798
|
+
noGutter
|
|
799
|
+
textStyle\="typography.heading.4"
|
|
800
|
+
\>
|
|
801
|
+
Buying my first home </IressText\>
|
|
802
|
+
</IressStack\>
|
|
803
|
+
</IressPanel\>
|
|
804
|
+
</IressRadio\>
|
|
805
|
+
<IressRadio value\="holiday"\>
|
|
806
|
+
<IressPanel
|
|
807
|
+
bg\="transparent"
|
|
808
|
+
p\="lg"
|
|
809
|
+
textAlign\="center"
|
|
810
|
+
\>
|
|
811
|
+
<IressStack gap\="md"\>
|
|
812
|
+
<IressIcon
|
|
813
|
+
name\="mountain"
|
|
814
|
+
textStyle\="typography.heading.1"
|
|
815
|
+
/>
|
|
816
|
+
<IressText
|
|
817
|
+
noGutter
|
|
818
|
+
textStyle\="typography.heading.4"
|
|
819
|
+
\>
|
|
820
|
+
Saving for a holiday </IressText\>
|
|
821
|
+
</IressStack\>
|
|
822
|
+
</IressPanel\>
|
|
823
|
+
</IressRadio\>
|
|
824
|
+
<IressRadio value\="debt"\>
|
|
825
|
+
<IressPanel
|
|
826
|
+
bg\="transparent"
|
|
827
|
+
p\="lg"
|
|
828
|
+
textAlign\="center"
|
|
829
|
+
\>
|
|
830
|
+
<IressStack gap\="md"\>
|
|
831
|
+
<IressIcon
|
|
832
|
+
name\="credit-card"
|
|
833
|
+
textStyle\="typography.heading.1"
|
|
834
|
+
/>
|
|
835
|
+
<IressText
|
|
836
|
+
noGutter
|
|
837
|
+
textStyle\="typography.heading.4"
|
|
838
|
+
\>
|
|
839
|
+
Reducing my debt </IressText\>
|
|
840
|
+
</IressStack\>
|
|
841
|
+
</IressPanel\>
|
|
842
|
+
</IressRadio\>
|
|
843
|
+
</IressRadioGroup\>
|
|
844
|
+
</IressField\>
|
|
845
|
+
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
#### Props
|
|
849
|
+
|
|
850
|
+
IressRadioGroupIressRadio
|
|
851
|
+
|
|
852
|
+
Tabs
|
|
853
|
+
|
|
854
|
+
| Name | Description | Default | Control |
|
|
855
|
+
| --- | --- | --- | --- |
|
|
856
|
+
| children |
|
|
857
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
858
|
+
|
|
859
|
+
ReactNode
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
| \- | \- |
|
|
864
|
+
| defaultValue |
|
|
865
|
+
|
|
866
|
+
Initial value of radio group when in uncontrolled mode.
|
|
867
|
+
|
|
868
|
+
T
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
| \- |
|
|
873
|
+
|
|
874
|
+
"home"
|
|
875
|
+
|
|
876
|
+
|
|
|
877
|
+
| hiddenRadio |
|
|
878
|
+
|
|
879
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
880
|
+
|
|
881
|
+
boolean
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
| \- | FalseTrue |
|
|
886
|
+
| layout |
|
|
887
|
+
|
|
888
|
+
Sets which of the block / inline layout options apply.
|
|
889
|
+
|
|
890
|
+
union
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
|
895
|
+
|
|
896
|
+
'stack'
|
|
897
|
+
|
|
898
|
+
|
|
|
899
|
+
|
|
900
|
+
stackblockinlineinlineFlexinlineEqualWidth
|
|
901
|
+
|
|
902
|
+
|
|
|
903
|
+
| name |
|
|
904
|
+
|
|
905
|
+
Name to be applied to all radios in the group.
|
|
906
|
+
|
|
907
|
+
string
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
| \- | Set string |
|
|
912
|
+
| onChange |
|
|
913
|
+
|
|
914
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
915
|
+
|
|
916
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
917
|
+
|
|
918
|
+
| \- | \- |
|
|
919
|
+
| readOnly |
|
|
920
|
+
|
|
921
|
+
Renders a readOnly radio group.
|
|
922
|
+
|
|
923
|
+
boolean
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
| \- | Set boolean |
|
|
928
|
+
| required |
|
|
929
|
+
|
|
930
|
+
When true, marks the field as required
|
|
931
|
+
|
|
932
|
+
boolean
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
| \- | FalseTrue |
|
|
937
|
+
| role |
|
|
938
|
+
|
|
939
|
+
|
|
|
940
|
+
|
|
941
|
+
'radiogroup'
|
|
942
|
+
|
|
943
|
+
| Set object |
|
|
944
|
+
| touch |
|
|
945
|
+
|
|
946
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
947
|
+
|
|
948
|
+
boolean
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
| \- | Set boolean |
|
|
953
|
+
| value |
|
|
954
|
+
|
|
955
|
+
Value of radio group when in controlled mode.
|
|
956
|
+
|
|
957
|
+
T
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
| \- | Set object |
|
|
962
|
+
|
|
963
|
+
### Laying out custom radio buttons
|
|
964
|
+
|
|
965
|
+
The radio group's `layout` prop gives you some default options to help control the layout of your controls. But sometimes you need more granular control, which you can achieve with a bit of custom CSS.
|
|
966
|
+
|
|
967
|
+
The example below uses CSS grid to give us evenly spaced / sized radio buttons, which will wrap on to new lines as the screen size reduces. The grid wrapper element is a div that wraps around the `<IressRadio />` elements, as shown by the dashed border. Use the grab handle in the bottom right-hand corner of the grid wrapper to see how the controls change size to respond to the container's width.
|
|
968
|
+
|
|
969
|
+
[](./iframe.html?id=components-radiogroup--custom-radio-group-layout)
|
|
970
|
+
|
|
971
|
+
**I'd like to discuss the following in my financial review:**
|
|
972
|
+
|
|
973
|
+
Select one option
|
|
974
|
+
|
|
975
|
+
Retirement
|
|
976
|
+
|
|
977
|
+
Buying my first home
|
|
978
|
+
|
|
979
|
+
Saving for a holiday
|
|
980
|
+
|
|
981
|
+
Saving for my child's education
|
|
982
|
+
|
|
983
|
+
Saving for emergency
|
|
984
|
+
|
|
985
|
+
Spending more time on my hobbies
|
|
986
|
+
|
|
987
|
+
Reducing my debt
|
|
988
|
+
|
|
989
|
+
Starting a business
|
|
990
|
+
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
<IressField
|
|
994
|
+
hint\="Select one option"
|
|
995
|
+
label\="I'd like to discuss the following in my financial review:"
|
|
996
|
+
\>
|
|
997
|
+
<IressRadioGroup
|
|
998
|
+
hiddenRadio
|
|
999
|
+
layout\="block"
|
|
1000
|
+
name\="financial-review"
|
|
1001
|
+
required
|
|
1002
|
+
\>
|
|
1003
|
+
<div
|
|
1004
|
+
style\={{
|
|
1005
|
+
border: '1px dashed hsl(43deg 100% 45%)',
|
|
1006
|
+
display: 'grid',
|
|
1007
|
+
gridAutoRows: '1fr',
|
|
1008
|
+
gridGap: '0.75rem',
|
|
1009
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))',
|
|
1010
|
+
overflow: 'auto',
|
|
1011
|
+
padding: '0.5rem',
|
|
1012
|
+
resize: 'horizontal',
|
|
1013
|
+
width: '100%'
|
|
1014
|
+
}}
|
|
1015
|
+
\>
|
|
1016
|
+
<IressRadio value\="retirement"\>
|
|
1017
|
+
<IressPanel
|
|
1018
|
+
bg\="transparent"
|
|
1019
|
+
p\="lg"
|
|
1020
|
+
textAlign\="center"
|
|
1021
|
+
\>
|
|
1022
|
+
<IressStack gap\="md"\>
|
|
1023
|
+
<IressIcon
|
|
1024
|
+
name\="tree-palm"
|
|
1025
|
+
textStyle\="typography.heading.1"
|
|
1026
|
+
/>
|
|
1027
|
+
<IressText
|
|
1028
|
+
noGutter
|
|
1029
|
+
textStyle\="typography.heading.4"
|
|
1030
|
+
\>
|
|
1031
|
+
Retirement </IressText\>
|
|
1032
|
+
</IressStack\>
|
|
1033
|
+
</IressPanel\>
|
|
1034
|
+
</IressRadio\>
|
|
1035
|
+
<IressRadio value\="home"\>
|
|
1036
|
+
<IressPanel
|
|
1037
|
+
bg\="transparent"
|
|
1038
|
+
p\="lg"
|
|
1039
|
+
textAlign\="center"
|
|
1040
|
+
\>
|
|
1041
|
+
<IressStack gap\="md"\>
|
|
1042
|
+
<IressIcon
|
|
1043
|
+
name\="house"
|
|
1044
|
+
textStyle\="typography.heading.1"
|
|
1045
|
+
/>
|
|
1046
|
+
<IressText
|
|
1047
|
+
noGutter
|
|
1048
|
+
textStyle\="typography.heading.4"
|
|
1049
|
+
\>
|
|
1050
|
+
Buying my first home </IressText\>
|
|
1051
|
+
</IressStack\>
|
|
1052
|
+
</IressPanel\>
|
|
1053
|
+
</IressRadio\>
|
|
1054
|
+
<IressRadio value\="holiday"\>
|
|
1055
|
+
<IressPanel
|
|
1056
|
+
bg\="transparent"
|
|
1057
|
+
p\="lg"
|
|
1058
|
+
textAlign\="center"
|
|
1059
|
+
\>
|
|
1060
|
+
<IressStack gap\="md"\>
|
|
1061
|
+
<IressIcon
|
|
1062
|
+
name\="mountain"
|
|
1063
|
+
textStyle\="typography.heading.1"
|
|
1064
|
+
/>
|
|
1065
|
+
<IressText
|
|
1066
|
+
noGutter
|
|
1067
|
+
textStyle\="typography.heading.4"
|
|
1068
|
+
\>
|
|
1069
|
+
Saving for a holiday </IressText\>
|
|
1070
|
+
</IressStack\>
|
|
1071
|
+
</IressPanel\>
|
|
1072
|
+
</IressRadio\>
|
|
1073
|
+
<IressRadio value\="education"\>
|
|
1074
|
+
<IressPanel
|
|
1075
|
+
bg\="transparent"
|
|
1076
|
+
p\="lg"
|
|
1077
|
+
textAlign\="center"
|
|
1078
|
+
\>
|
|
1079
|
+
<IressStack gap\="md"\>
|
|
1080
|
+
<IressIcon
|
|
1081
|
+
name\="graduation-cap"
|
|
1082
|
+
textStyle\="typography.heading.1"
|
|
1083
|
+
/>
|
|
1084
|
+
<IressText
|
|
1085
|
+
noGutter
|
|
1086
|
+
textStyle\="typography.heading.4"
|
|
1087
|
+
\>
|
|
1088
|
+
Saving for my child's education </IressText\>
|
|
1089
|
+
</IressStack\>
|
|
1090
|
+
</IressPanel\>
|
|
1091
|
+
</IressRadio\>
|
|
1092
|
+
<IressRadio value\="emergency"\>
|
|
1093
|
+
<IressPanel
|
|
1094
|
+
bg\="transparent"
|
|
1095
|
+
p\="lg"
|
|
1096
|
+
textAlign\="center"
|
|
1097
|
+
\>
|
|
1098
|
+
<IressStack gap\="md"\>
|
|
1099
|
+
<IressIcon
|
|
1100
|
+
name\="medkit"
|
|
1101
|
+
textStyle\="typography.heading.1"
|
|
1102
|
+
/>
|
|
1103
|
+
<IressText
|
|
1104
|
+
noGutter
|
|
1105
|
+
textStyle\="typography.heading.4"
|
|
1106
|
+
\>
|
|
1107
|
+
Saving for emergency </IressText\>
|
|
1108
|
+
</IressStack\>
|
|
1109
|
+
</IressPanel\>
|
|
1110
|
+
</IressRadio\>
|
|
1111
|
+
<IressRadio value\="hobby"\>
|
|
1112
|
+
<IressPanel
|
|
1113
|
+
bg\="transparent"
|
|
1114
|
+
p\="lg"
|
|
1115
|
+
textAlign\="center"
|
|
1116
|
+
\>
|
|
1117
|
+
<IressStack gap\="md"\>
|
|
1118
|
+
<IressIcon
|
|
1119
|
+
name\="bicycle"
|
|
1120
|
+
textStyle\="typography.heading.1"
|
|
1121
|
+
/>
|
|
1122
|
+
<IressText
|
|
1123
|
+
noGutter
|
|
1124
|
+
textStyle\="typography.heading.4"
|
|
1125
|
+
\>
|
|
1126
|
+
Spending more time on my hobbies </IressText\>
|
|
1127
|
+
</IressStack\>
|
|
1128
|
+
</IressPanel\>
|
|
1129
|
+
</IressRadio\>
|
|
1130
|
+
<IressRadio value\="debt"\>
|
|
1131
|
+
<IressPanel
|
|
1132
|
+
bg\="transparent"
|
|
1133
|
+
p\="lg"
|
|
1134
|
+
textAlign\="center"
|
|
1135
|
+
\>
|
|
1136
|
+
<IressStack gap\="md"\>
|
|
1137
|
+
<IressIcon
|
|
1138
|
+
name\="chart-line-down"
|
|
1139
|
+
textStyle\="typography.heading.1"
|
|
1140
|
+
/>
|
|
1141
|
+
<IressText
|
|
1142
|
+
noGutter
|
|
1143
|
+
textStyle\="typography.heading.4"
|
|
1144
|
+
\>
|
|
1145
|
+
Reducing my debt </IressText\>
|
|
1146
|
+
</IressStack\>
|
|
1147
|
+
</IressPanel\>
|
|
1148
|
+
</IressRadio\>
|
|
1149
|
+
<IressRadio value\="business"\>
|
|
1150
|
+
<IressPanel
|
|
1151
|
+
bg\="transparent"
|
|
1152
|
+
p\="lg"
|
|
1153
|
+
textAlign\="center"
|
|
1154
|
+
\>
|
|
1155
|
+
<IressStack gap\="md"\>
|
|
1156
|
+
<IressIcon
|
|
1157
|
+
name\="user-tie"
|
|
1158
|
+
textStyle\="typography.heading.1"
|
|
1159
|
+
/>
|
|
1160
|
+
<IressText
|
|
1161
|
+
noGutter
|
|
1162
|
+
textStyle\="typography.heading.4"
|
|
1163
|
+
\>
|
|
1164
|
+
Starting a business </IressText\>
|
|
1165
|
+
</IressStack\>
|
|
1166
|
+
</IressPanel\>
|
|
1167
|
+
</IressRadio\>
|
|
1168
|
+
</div\>
|
|
1169
|
+
</IressRadioGroup\>
|
|
1170
|
+
</IressField\>
|
|
1171
|
+
|
|
1172
|
+
```
|
|
1173
|
+
|
|
1174
|
+
#### Props
|
|
1175
|
+
|
|
1176
|
+
IressRadioGroupIressRadio
|
|
1177
|
+
|
|
1178
|
+
Tabs
|
|
1179
|
+
|
|
1180
|
+
| Name | Description | Default | Control |
|
|
1181
|
+
| --- | --- | --- | --- |
|
|
1182
|
+
| children |
|
|
1183
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
1184
|
+
|
|
1185
|
+
ReactNode
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
| \- | \- |
|
|
1190
|
+
| defaultValue |
|
|
1191
|
+
|
|
1192
|
+
Initial value of radio group when in uncontrolled mode.
|
|
1193
|
+
|
|
1194
|
+
T
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
| \- | Set object |
|
|
1199
|
+
| hiddenRadio |
|
|
1200
|
+
|
|
1201
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
1202
|
+
|
|
1203
|
+
boolean
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
| \- | FalseTrue |
|
|
1208
|
+
| layout |
|
|
1209
|
+
|
|
1210
|
+
Sets which of the block / inline layout options apply.
|
|
1211
|
+
|
|
1212
|
+
union
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
|
1217
|
+
|
|
1218
|
+
'stack'
|
|
1219
|
+
|
|
1220
|
+
|
|
|
1221
|
+
|
|
1222
|
+
stackblockinlineinlineFlexinlineEqualWidth
|
|
1223
|
+
|
|
1224
|
+
|
|
|
1225
|
+
| name |
|
|
1226
|
+
|
|
1227
|
+
Name to be applied to all radios in the group.
|
|
1228
|
+
|
|
1229
|
+
string
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
| \- | financial-review |
|
|
1234
|
+
| onChange |
|
|
1235
|
+
|
|
1236
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
1237
|
+
|
|
1238
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
1239
|
+
|
|
1240
|
+
| \- | \- |
|
|
1241
|
+
| readOnly |
|
|
1242
|
+
|
|
1243
|
+
Renders a readOnly radio group.
|
|
1244
|
+
|
|
1245
|
+
boolean
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
| \- | Set boolean |
|
|
1250
|
+
| required |
|
|
1251
|
+
|
|
1252
|
+
When true, marks the field as required
|
|
1253
|
+
|
|
1254
|
+
boolean
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
| \- | FalseTrue |
|
|
1259
|
+
| role |
|
|
1260
|
+
|
|
1261
|
+
|
|
|
1262
|
+
|
|
1263
|
+
'radiogroup'
|
|
1264
|
+
|
|
1265
|
+
| Set object |
|
|
1266
|
+
| touch |
|
|
1267
|
+
|
|
1268
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
1269
|
+
|
|
1270
|
+
boolean
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
| \- | Set boolean |
|
|
1275
|
+
| value |
|
|
1276
|
+
|
|
1277
|
+
Value of radio group when in controlled mode.
|
|
1278
|
+
|
|
1279
|
+
T
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
| \- | Set object |
|
|
1284
|
+
|
|
1285
|
+
### Read only
|
|
1286
|
+
|
|
1287
|
+
The `readOnly` prop changes how the radio group is rendered. It will only render if the children radio that is checked (alongside a hidden input that contains the `value` if it was set), otherwise it will not be rendered.
|
|
1288
|
+
|
|
1289
|
+
It is understandable that this may not be the desired behavior for all use cases. If you need a radio group that is not editable, but still visible, simply do not set the `readOnly` prop and set the `value` prop instead.
|
|
1290
|
+
|
|
1291
|
+
[](./iframe.html?id=components-radiogroup--read-only)
|
|
1292
|
+
|
|
1293
|
+
Newspaper
|
|
1294
|
+
|
|
1295
|
+
```
|
|
1296
|
+
|
|
1297
|
+
<IressRadioGroup
|
|
1298
|
+
defaultValue\="newspaper"
|
|
1299
|
+
readOnly
|
|
1300
|
+
\>
|
|
1301
|
+
<IressRadio value\="google"\>
|
|
1302
|
+
Google </IressRadio\>
|
|
1303
|
+
<IressRadio value\="newspaper"\>
|
|
1304
|
+
Newspaper </IressRadio\>
|
|
1305
|
+
<IressRadio value\="friend"\>
|
|
1306
|
+
Friend </IressRadio\>
|
|
1307
|
+
<IressRadio value\="other"\>
|
|
1308
|
+
Other </IressRadio\>
|
|
1309
|
+
</IressRadioGroup\>
|
|
1310
|
+
|
|
1311
|
+
```
|
|
1312
|
+
|
|
1313
|
+
#### Props
|
|
1314
|
+
|
|
1315
|
+
IressRadioGroupIressRadio
|
|
1316
|
+
|
|
1317
|
+
Tabs
|
|
1318
|
+
|
|
1319
|
+
| Name | Description | Default | Control |
|
|
1320
|
+
| --- | --- | --- | --- |
|
|
1321
|
+
| children |
|
|
1322
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
1323
|
+
|
|
1324
|
+
ReactNode
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
| \- | \- |
|
|
1329
|
+
| defaultValue |
|
|
1330
|
+
|
|
1331
|
+
Initial value of radio group when in uncontrolled mode.
|
|
1332
|
+
|
|
1333
|
+
T
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
| \- |
|
|
1338
|
+
|
|
1339
|
+
"newspaper"
|
|
1340
|
+
|
|
1341
|
+
|
|
|
1342
|
+
| hiddenRadio |
|
|
1343
|
+
|
|
1344
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
1345
|
+
|
|
1346
|
+
boolean
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
| \- | Set boolean |
|
|
1351
|
+
| layout |
|
|
1352
|
+
|
|
1353
|
+
Sets which of the block / inline layout options apply.
|
|
1354
|
+
|
|
1355
|
+
union
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
|
1360
|
+
|
|
1361
|
+
'stack'
|
|
1362
|
+
|
|
1363
|
+
|
|
|
1364
|
+
|
|
1365
|
+
stackblockinlineinlineFlexinlineEqualWidth
|
|
1366
|
+
|
|
1367
|
+
|
|
|
1368
|
+
| name |
|
|
1369
|
+
|
|
1370
|
+
Name to be applied to all radios in the group.
|
|
1371
|
+
|
|
1372
|
+
string
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
| \- | Set string |
|
|
1377
|
+
| onChange |
|
|
1378
|
+
|
|
1379
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
1380
|
+
|
|
1381
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
1382
|
+
|
|
1383
|
+
| \- | \- |
|
|
1384
|
+
| readOnly |
|
|
1385
|
+
|
|
1386
|
+
Renders a readOnly radio group.
|
|
1387
|
+
|
|
1388
|
+
boolean
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
| \- | FalseTrue |
|
|
1393
|
+
| required |
|
|
1394
|
+
|
|
1395
|
+
When true, marks the field as required
|
|
1396
|
+
|
|
1397
|
+
boolean
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
| \- | Set boolean |
|
|
1402
|
+
| role |
|
|
1403
|
+
|
|
1404
|
+
|
|
|
1405
|
+
|
|
1406
|
+
'radiogroup'
|
|
1407
|
+
|
|
1408
|
+
| Set object |
|
|
1409
|
+
| touch |
|
|
1410
|
+
|
|
1411
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
1412
|
+
|
|
1413
|
+
boolean
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
| \- | Set boolean |
|
|
1418
|
+
| value |
|
|
1419
|
+
|
|
1420
|
+
Value of radio group when in controlled mode.
|
|
1421
|
+
|
|
1422
|
+
T
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
| \- | Set object |
|
|
1427
|
+
|
|
1428
|
+
### Touch
|
|
1429
|
+
|
|
1430
|
+
The `touch` prop adds the button-like border and padding to radio.
|
|
1431
|
+
|
|
1432
|
+
[](./iframe.html?id=components-radiogroup--touch)
|
|
1433
|
+
|
|
1434
|
+
Google
|
|
1435
|
+
|
|
1436
|
+
Newspaper
|
|
1437
|
+
|
|
1438
|
+
Friend
|
|
1439
|
+
|
|
1440
|
+
Other
|
|
1441
|
+
|
|
1442
|
+
```
|
|
1443
|
+
|
|
1444
|
+
<IressRadioGroup
|
|
1445
|
+
defaultValue\="newspaper"
|
|
1446
|
+
touch
|
|
1447
|
+
\>
|
|
1448
|
+
<IressRadio value\="google"\>
|
|
1449
|
+
Google </IressRadio\>
|
|
1450
|
+
<IressRadio value\="newspaper"\>
|
|
1451
|
+
Newspaper </IressRadio\>
|
|
1452
|
+
<IressRadio value\="friend"\>
|
|
1453
|
+
Friend </IressRadio\>
|
|
1454
|
+
<IressRadio value\="other"\>
|
|
1455
|
+
Other </IressRadio\>
|
|
1456
|
+
</IressRadioGroup\>
|
|
1457
|
+
|
|
1458
|
+
```
|
|
1459
|
+
|
|
1460
|
+
#### Props
|
|
1461
|
+
|
|
1462
|
+
IressRadioGroupIressRadio
|
|
1463
|
+
|
|
1464
|
+
Tabs
|
|
1465
|
+
|
|
1466
|
+
| Name | Description | Default | Control |
|
|
1467
|
+
| --- | --- | --- | --- |
|
|
1468
|
+
| children |
|
|
1469
|
+
Content of the radio group, usually multiple `IressRadio` components.
|
|
1470
|
+
|
|
1471
|
+
ReactNode
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
| \- | \- |
|
|
1476
|
+
| defaultValue |
|
|
1477
|
+
|
|
1478
|
+
Initial value of radio group when in uncontrolled mode.
|
|
1479
|
+
|
|
1480
|
+
T
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
| \- |
|
|
1485
|
+
|
|
1486
|
+
"newspaper"
|
|
1487
|
+
|
|
1488
|
+
|
|
|
1489
|
+
| hiddenRadio |
|
|
1490
|
+
|
|
1491
|
+
Hides the radio control to allow the creation of custom radio buttons.
|
|
1492
|
+
|
|
1493
|
+
boolean
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
| \- | Set boolean |
|
|
1498
|
+
| layout |
|
|
1499
|
+
|
|
1500
|
+
Sets which of the block / inline layout options apply.
|
|
1501
|
+
|
|
1502
|
+
union
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
|
1507
|
+
|
|
1508
|
+
'stack'
|
|
1509
|
+
|
|
1510
|
+
|
|
|
1511
|
+
|
|
1512
|
+
stackblockinlineinlineFlexinlineEqualWidth
|
|
1513
|
+
|
|
1514
|
+
|
|
|
1515
|
+
| name |
|
|
1516
|
+
|
|
1517
|
+
Name to be applied to all radios in the group.
|
|
1518
|
+
|
|
1519
|
+
string
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
| \- | Set string |
|
|
1524
|
+
| onChange |
|
|
1525
|
+
|
|
1526
|
+
Called when a user selects one of its children radio buttons. If you pass in a non-string value, you can access it using the second parameter of the function.
|
|
1527
|
+
|
|
1528
|
+
(e: ChangeEvent<HTMLInputElement>, value?: T) => void
|
|
1529
|
+
|
|
1530
|
+
| \- | \- |
|
|
1531
|
+
| readOnly |
|
|
1532
|
+
|
|
1533
|
+
Renders a readOnly radio group.
|
|
1534
|
+
|
|
1535
|
+
boolean
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
| \- | Set boolean |
|
|
1540
|
+
| required |
|
|
1541
|
+
|
|
1542
|
+
When true, marks the field as required
|
|
1543
|
+
|
|
1544
|
+
boolean
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
| \- | Set boolean |
|
|
1549
|
+
| role |
|
|
1550
|
+
|
|
1551
|
+
|
|
|
1552
|
+
|
|
1553
|
+
'radiogroup'
|
|
1554
|
+
|
|
1555
|
+
| Set object |
|
|
1556
|
+
| touch |
|
|
1557
|
+
|
|
1558
|
+
Add the button-like border and padding to radio when `touch` is true.
|
|
1559
|
+
|
|
1560
|
+
boolean
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
| \- | FalseTrue |
|
|
1565
|
+
| value |
|
|
1566
|
+
|
|
1567
|
+
Value of radio group when in controlled mode.
|
|
1568
|
+
|
|
1569
|
+
T
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
| \- | Set object |
|