@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,1083 @@
|
|
|
1
|
+
Checkbox
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
Checkboxes are used to let a user select one or more options for a limited number of choices. Also, works as a child of `IressCheckboxGroup`
|
|
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-checkbox--default)
|
|
18
|
+
|
|
19
|
+
A checkbox
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<IressCheckbox\>
|
|
24
|
+
A checkbox
|
|
25
|
+
</IressCheckbox\>
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Props
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
IressCheckboxIressCheckboxMark
|
|
33
|
+
|
|
34
|
+
Tabs
|
|
35
|
+
|
|
36
|
+
| Name | Description | Default | Control |
|
|
37
|
+
| --- | --- | --- | --- |
|
|
38
|
+
| checked |
|
|
39
|
+
If true, the checkbox is selected. Please use this when are rendering the checkbox in controlled mode.
|
|
40
|
+
|
|
41
|
+
boolean
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
| \- | Set boolean |
|
|
46
|
+
| children |
|
|
47
|
+
|
|
48
|
+
The checkbox content
|
|
49
|
+
|
|
50
|
+
ReactNode
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
| \- |
|
|
55
|
+
|
|
56
|
+
"A checkbox"
|
|
57
|
+
|
|
58
|
+
|
|
|
59
|
+
| defaultChecked |
|
|
60
|
+
|
|
61
|
+
If true, the checkbox will be initially rendered as selected. Please use this when are rendering the checkbox in uncontrolled mode.
|
|
62
|
+
|
|
63
|
+
boolean
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
| \- | Set boolean |
|
|
68
|
+
| hiddenControl |
|
|
69
|
+
|
|
70
|
+
Sets whether the control is hidden. If it is within a checkbox group, it will be overridden with the checkbox group's hiddenCheckbox setting.
|
|
71
|
+
|
|
72
|
+
boolean
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
| \- | Set boolean |
|
|
77
|
+
| hiddenLabel |
|
|
78
|
+
|
|
79
|
+
Visually hides the label (if set), label will still be read out by screenreaders.
|
|
80
|
+
|
|
81
|
+
boolean
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
| \- | Set boolean |
|
|
86
|
+
| indeterminate |
|
|
87
|
+
|
|
88
|
+
If true, the checkbox will visually appear as indeterminate.
|
|
89
|
+
|
|
90
|
+
boolean
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
| \- | Set boolean |
|
|
95
|
+
| name |
|
|
96
|
+
|
|
97
|
+
The name of the control, which is submitted with the form data.
|
|
98
|
+
|
|
99
|
+
string
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
| \- | Set string |
|
|
104
|
+
| onBlur |
|
|
105
|
+
|
|
106
|
+
Emitted when the checkbox loses focus.
|
|
107
|
+
|
|
108
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
109
|
+
|
|
110
|
+
| \- | \- |
|
|
111
|
+
| onChange |
|
|
112
|
+
|
|
113
|
+
Emitted when the checkbox value changes.
|
|
114
|
+
|
|
115
|
+
( e: ChangeEvent<HTMLInputElement>, checked?: boolean, value?: T, ) => void
|
|
116
|
+
|
|
117
|
+
| \- | \- |
|
|
118
|
+
| onFocus |
|
|
119
|
+
|
|
120
|
+
Emitted when the checkbox gains focus.
|
|
121
|
+
|
|
122
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
123
|
+
|
|
124
|
+
| \- | \- |
|
|
125
|
+
| required |
|
|
126
|
+
|
|
127
|
+
If `true`, the checkbox is a required field and will be validated as such.
|
|
128
|
+
|
|
129
|
+
boolean
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
| \- | Set boolean |
|
|
134
|
+
| touch |
|
|
135
|
+
|
|
136
|
+
Add the button-like border and padding to checkbox when `touch` is true.
|
|
137
|
+
|
|
138
|
+
boolean
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
| \- | Set boolean |
|
|
143
|
+
| value |
|
|
144
|
+
|
|
145
|
+
Value of the checkbox when used in a checkbox group. The checked state of the checkbox will be overridden based on this value if used inside a checkbox group. **Note:**
|
|
146
|
+
|
|
147
|
+
* The value of the checkbox does not mean if its checked or not, use the checked property for that.
|
|
148
|
+
* If the value of the checkbox is true/false, and checked is undefined and not inside a CheckboxGroup, it will use this as the checked value. This ensures out-of-the-box compatibility with React Hook Form.
|
|
149
|
+
|
|
150
|
+
T
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
| \- | Set object |
|
|
155
|
+
|
|
156
|
+
Usage
|
|
157
|
+
-----
|
|
158
|
+
|
|
159
|
+
### Checked
|
|
160
|
+
|
|
161
|
+
For single checkboxes in controlled mode the `checked` prop sets the checked state.
|
|
162
|
+
|
|
163
|
+
When used as part of an `IressCheckboxGroup`, the `checked` prop will be ignored. Instead, the `value` prop on the `IressCheckboxGroup` will determine the checked state of each checkbox. See the [checkbox group documentation](?path=/docs/components-checkboxgroup--docs) for more details.
|
|
164
|
+
|
|
165
|
+
[](./iframe.html?id=components-checkbox--checked)
|
|
166
|
+
|
|
167
|
+
A checkbox which is checked and in controlled mode
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
<IressCheckbox checked\>
|
|
172
|
+
A checkbox which is checked and in controlled mode
|
|
173
|
+
</IressCheckbox\>
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### Props
|
|
178
|
+
|
|
179
|
+
IressCheckboxIressCheckboxMark
|
|
180
|
+
|
|
181
|
+
Tabs
|
|
182
|
+
|
|
183
|
+
| Name | Description | Default | Control |
|
|
184
|
+
| --- | --- | --- | --- |
|
|
185
|
+
| checked |
|
|
186
|
+
If true, the checkbox is selected. Please use this when are rendering the checkbox in controlled mode.
|
|
187
|
+
|
|
188
|
+
boolean
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
| \- | FalseTrue |
|
|
193
|
+
| children |
|
|
194
|
+
|
|
195
|
+
The checkbox content
|
|
196
|
+
|
|
197
|
+
ReactNode
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
| \- |
|
|
202
|
+
|
|
203
|
+
"A checkbox which is checked and in controlled mode"
|
|
204
|
+
|
|
205
|
+
|
|
|
206
|
+
| defaultChecked |
|
|
207
|
+
|
|
208
|
+
If true, the checkbox will be initially rendered as selected. Please use this when are rendering the checkbox in uncontrolled mode.
|
|
209
|
+
|
|
210
|
+
boolean
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
| \- | Set boolean |
|
|
215
|
+
| hiddenControl |
|
|
216
|
+
|
|
217
|
+
Sets whether the control is hidden. If it is within a checkbox group, it will be overridden with the checkbox group's hiddenCheckbox setting.
|
|
218
|
+
|
|
219
|
+
boolean
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
| \- | Set boolean |
|
|
224
|
+
| hiddenLabel |
|
|
225
|
+
|
|
226
|
+
Visually hides the label (if set), label will still be read out by screenreaders.
|
|
227
|
+
|
|
228
|
+
boolean
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
| \- | Set boolean |
|
|
233
|
+
| indeterminate |
|
|
234
|
+
|
|
235
|
+
If true, the checkbox will visually appear as indeterminate.
|
|
236
|
+
|
|
237
|
+
boolean
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
| \- | Set boolean |
|
|
242
|
+
| name |
|
|
243
|
+
|
|
244
|
+
The name of the control, which is submitted with the form data.
|
|
245
|
+
|
|
246
|
+
string
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
| \- | Set string |
|
|
251
|
+
| onBlur |
|
|
252
|
+
|
|
253
|
+
Emitted when the checkbox loses focus.
|
|
254
|
+
|
|
255
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
256
|
+
|
|
257
|
+
| \- | \- |
|
|
258
|
+
| onChange |
|
|
259
|
+
|
|
260
|
+
Emitted when the checkbox value changes.
|
|
261
|
+
|
|
262
|
+
( e: ChangeEvent<HTMLInputElement>, checked?: boolean, value?: T, ) => void
|
|
263
|
+
|
|
264
|
+
| \- | \- |
|
|
265
|
+
| onFocus |
|
|
266
|
+
|
|
267
|
+
Emitted when the checkbox gains focus.
|
|
268
|
+
|
|
269
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
270
|
+
|
|
271
|
+
| \- | \- |
|
|
272
|
+
| required |
|
|
273
|
+
|
|
274
|
+
If `true`, the checkbox is a required field and will be validated as such.
|
|
275
|
+
|
|
276
|
+
boolean
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
| \- | Set boolean |
|
|
281
|
+
| touch |
|
|
282
|
+
|
|
283
|
+
Add the button-like border and padding to checkbox when `touch` is true.
|
|
284
|
+
|
|
285
|
+
boolean
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
| \- | Set boolean |
|
|
290
|
+
| value |
|
|
291
|
+
|
|
292
|
+
Value of the checkbox when used in a checkbox group. The checked state of the checkbox will be overridden based on this value if used inside a checkbox group. **Note:**
|
|
293
|
+
|
|
294
|
+
* The value of the checkbox does not mean if its checked or not, use the checked property for that.
|
|
295
|
+
* If the value of the checkbox is true/false, and checked is undefined and not inside a CheckboxGroup, it will use this as the checked value. This ensures out-of-the-box compatibility with React Hook Form.
|
|
296
|
+
|
|
297
|
+
T
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
| \- | Set object |
|
|
302
|
+
|
|
303
|
+
### Default Checked
|
|
304
|
+
|
|
305
|
+
For single checkboxes in uncontrolled mode the `defaultChecked` prop sets the default checked state.
|
|
306
|
+
|
|
307
|
+
[](./iframe.html?id=components-checkbox--default-checked)
|
|
308
|
+
|
|
309
|
+
A checkbox which is initially checked
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
<IressCheckbox defaultChecked\>
|
|
314
|
+
A checkbox which is initially checked
|
|
315
|
+
</IressCheckbox\>
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
#### Props
|
|
320
|
+
|
|
321
|
+
IressCheckboxIressCheckboxMark
|
|
322
|
+
|
|
323
|
+
Tabs
|
|
324
|
+
|
|
325
|
+
| Name | Description | Default | Control |
|
|
326
|
+
| --- | --- | --- | --- |
|
|
327
|
+
| checked |
|
|
328
|
+
If true, the checkbox is selected. Please use this when are rendering the checkbox in controlled mode.
|
|
329
|
+
|
|
330
|
+
boolean
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
| \- | Set boolean |
|
|
335
|
+
| children |
|
|
336
|
+
|
|
337
|
+
The checkbox content
|
|
338
|
+
|
|
339
|
+
ReactNode
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
| \- |
|
|
344
|
+
|
|
345
|
+
"A checkbox which is initially checked"
|
|
346
|
+
|
|
347
|
+
|
|
|
348
|
+
| defaultChecked |
|
|
349
|
+
|
|
350
|
+
If true, the checkbox will be initially rendered as selected. Please use this when are rendering the checkbox in uncontrolled mode.
|
|
351
|
+
|
|
352
|
+
boolean
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
| \- | FalseTrue |
|
|
357
|
+
| hiddenControl |
|
|
358
|
+
|
|
359
|
+
Sets whether the control is hidden. If it is within a checkbox group, it will be overridden with the checkbox group's hiddenCheckbox setting.
|
|
360
|
+
|
|
361
|
+
boolean
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
| \- | Set boolean |
|
|
366
|
+
| hiddenLabel |
|
|
367
|
+
|
|
368
|
+
Visually hides the label (if set), label will still be read out by screenreaders.
|
|
369
|
+
|
|
370
|
+
boolean
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
| \- | Set boolean |
|
|
375
|
+
| indeterminate |
|
|
376
|
+
|
|
377
|
+
If true, the checkbox will visually appear as indeterminate.
|
|
378
|
+
|
|
379
|
+
boolean
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
| \- | Set boolean |
|
|
384
|
+
| name |
|
|
385
|
+
|
|
386
|
+
The name of the control, which is submitted with the form data.
|
|
387
|
+
|
|
388
|
+
string
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
| \- | Set string |
|
|
393
|
+
| onBlur |
|
|
394
|
+
|
|
395
|
+
Emitted when the checkbox loses focus.
|
|
396
|
+
|
|
397
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
398
|
+
|
|
399
|
+
| \- | \- |
|
|
400
|
+
| onChange |
|
|
401
|
+
|
|
402
|
+
Emitted when the checkbox value changes.
|
|
403
|
+
|
|
404
|
+
( e: ChangeEvent<HTMLInputElement>, checked?: boolean, value?: T, ) => void
|
|
405
|
+
|
|
406
|
+
| \- | \- |
|
|
407
|
+
| onFocus |
|
|
408
|
+
|
|
409
|
+
Emitted when the checkbox gains focus.
|
|
410
|
+
|
|
411
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
412
|
+
|
|
413
|
+
| \- | \- |
|
|
414
|
+
| required |
|
|
415
|
+
|
|
416
|
+
If `true`, the checkbox is a required field and will be validated as such.
|
|
417
|
+
|
|
418
|
+
boolean
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
| \- | Set boolean |
|
|
423
|
+
| touch |
|
|
424
|
+
|
|
425
|
+
Add the button-like border and padding to checkbox when `touch` is true.
|
|
426
|
+
|
|
427
|
+
boolean
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
| \- | Set boolean |
|
|
432
|
+
| value |
|
|
433
|
+
|
|
434
|
+
Value of the checkbox when used in a checkbox group. The checked state of the checkbox will be overridden based on this value if used inside a checkbox group. **Note:**
|
|
435
|
+
|
|
436
|
+
* The value of the checkbox does not mean if its checked or not, use the checked property for that.
|
|
437
|
+
* If the value of the checkbox is true/false, and checked is undefined and not inside a CheckboxGroup, it will use this as the checked value. This ensures out-of-the-box compatibility with React Hook Form.
|
|
438
|
+
|
|
439
|
+
T
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
| \- | Set object |
|
|
444
|
+
|
|
445
|
+
### Indeterminate
|
|
446
|
+
|
|
447
|
+
The `indeterminate` prop sets the checkbox appearance to an indeterminate dash until it is clicked. It has no impact on the checkbox behavior beyond this purely visual indicator.
|
|
448
|
+
|
|
449
|
+
[](./iframe.html?id=components-checkbox--indeterminate)
|
|
450
|
+
|
|
451
|
+
A checkbox which is initially in an indeterminate state
|
|
452
|
+
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
<IressCheckbox indeterminate\>
|
|
456
|
+
A checkbox which is initially in an indeterminate state
|
|
457
|
+
</IressCheckbox\>
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
#### Props
|
|
462
|
+
|
|
463
|
+
IressCheckboxIressCheckboxMark
|
|
464
|
+
|
|
465
|
+
Tabs
|
|
466
|
+
|
|
467
|
+
| Name | Description | Default | Control |
|
|
468
|
+
| --- | --- | --- | --- |
|
|
469
|
+
| checked |
|
|
470
|
+
If true, the checkbox is selected. Please use this when are rendering the checkbox in controlled mode.
|
|
471
|
+
|
|
472
|
+
boolean
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
| \- | Set boolean |
|
|
477
|
+
| children |
|
|
478
|
+
|
|
479
|
+
The checkbox content
|
|
480
|
+
|
|
481
|
+
ReactNode
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
| \- |
|
|
486
|
+
|
|
487
|
+
"A checkbox which is initially in an indeterminate state"
|
|
488
|
+
|
|
489
|
+
|
|
|
490
|
+
| defaultChecked |
|
|
491
|
+
|
|
492
|
+
If true, the checkbox will be initially rendered as selected. Please use this when are rendering the checkbox in uncontrolled mode.
|
|
493
|
+
|
|
494
|
+
boolean
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
| \- | Set boolean |
|
|
499
|
+
| hiddenControl |
|
|
500
|
+
|
|
501
|
+
Sets whether the control is hidden. If it is within a checkbox group, it will be overridden with the checkbox group's hiddenCheckbox setting.
|
|
502
|
+
|
|
503
|
+
boolean
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
| \- | Set boolean |
|
|
508
|
+
| hiddenLabel |
|
|
509
|
+
|
|
510
|
+
Visually hides the label (if set), label will still be read out by screenreaders.
|
|
511
|
+
|
|
512
|
+
boolean
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
| \- | Set boolean |
|
|
517
|
+
| indeterminate |
|
|
518
|
+
|
|
519
|
+
If true, the checkbox will visually appear as indeterminate.
|
|
520
|
+
|
|
521
|
+
boolean
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
| \- | FalseTrue |
|
|
526
|
+
| name |
|
|
527
|
+
|
|
528
|
+
The name of the control, which is submitted with the form data.
|
|
529
|
+
|
|
530
|
+
string
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
| \- | Set string |
|
|
535
|
+
| onBlur |
|
|
536
|
+
|
|
537
|
+
Emitted when the checkbox loses focus.
|
|
538
|
+
|
|
539
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
540
|
+
|
|
541
|
+
| \- | \- |
|
|
542
|
+
| onChange |
|
|
543
|
+
|
|
544
|
+
Emitted when the checkbox value changes.
|
|
545
|
+
|
|
546
|
+
( e: ChangeEvent<HTMLInputElement>, checked?: boolean, value?: T, ) => void
|
|
547
|
+
|
|
548
|
+
| \- | \- |
|
|
549
|
+
| onFocus |
|
|
550
|
+
|
|
551
|
+
Emitted when the checkbox gains focus.
|
|
552
|
+
|
|
553
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
554
|
+
|
|
555
|
+
| \- | \- |
|
|
556
|
+
| required |
|
|
557
|
+
|
|
558
|
+
If `true`, the checkbox is a required field and will be validated as such.
|
|
559
|
+
|
|
560
|
+
boolean
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
| \- | Set boolean |
|
|
565
|
+
| touch |
|
|
566
|
+
|
|
567
|
+
Add the button-like border and padding to checkbox when `touch` is true.
|
|
568
|
+
|
|
569
|
+
boolean
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
| \- | Set boolean |
|
|
574
|
+
| value |
|
|
575
|
+
|
|
576
|
+
Value of the checkbox when used in a checkbox group. The checked state of the checkbox will be overridden based on this value if used inside a checkbox group. **Note:**
|
|
577
|
+
|
|
578
|
+
* The value of the checkbox does not mean if its checked or not, use the checked property for that.
|
|
579
|
+
* If the value of the checkbox is true/false, and checked is undefined and not inside a CheckboxGroup, it will use this as the checked value. This ensures out-of-the-box compatibility with React Hook Form.
|
|
580
|
+
|
|
581
|
+
T
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
| \- | Set object |
|
|
586
|
+
|
|
587
|
+
### Hidden Label
|
|
588
|
+
|
|
589
|
+
It is very rare to want to render a checkbox without a visible label. However, one case where you might want to is within tables.
|
|
590
|
+
|
|
591
|
+
When using a checkbox without a visible label, you must supply a label and apply the `hiddenLabel` property to still be accessible by screen readers.
|
|
592
|
+
|
|
593
|
+
It is also important to not hide the table headers.
|
|
594
|
+
|
|
595
|
+
[](./iframe.html?id=components-checkbox--with-table-data)
|
|
596
|
+
|
|
597
|
+
List of investments
|
|
598
|
+
| Select | Name | Date | Cost |
|
|
599
|
+
| --- | --- | --- | --- |
|
|
600
|
+
|
|
|
601
|
+
Toggle row
|
|
602
|
+
|
|
603
|
+
| Artemis Fund Managers Limited | 2019-09-23 | 23898.12 |
|
|
604
|
+
|
|
|
605
|
+
|
|
606
|
+
Toggle row
|
|
607
|
+
|
|
608
|
+
| CASH.CASH | 2020-06-28 | 49751.43 |
|
|
609
|
+
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
<IressTable
|
|
613
|
+
caption\="List of investments"
|
|
614
|
+
columns\={\[
|
|
615
|
+
{
|
|
616
|
+
format: (value: boolean) \=> <IressCheckbox defaultChecked\={value} hiddenLabel\>Toggle row</IressCheckbox\>,
|
|
617
|
+
key: 'select',
|
|
618
|
+
label: 'Select',
|
|
619
|
+
sort: true
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
key: 'name',
|
|
623
|
+
label: 'Name'
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
key: 'date',
|
|
627
|
+
label: 'Date'
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
key: 'cost',
|
|
631
|
+
label: 'Cost'
|
|
632
|
+
}
|
|
633
|
+
\]}
|
|
634
|
+
rows\={\[
|
|
635
|
+
{
|
|
636
|
+
cost: 23898.12,
|
|
637
|
+
date: '2019-09-23',
|
|
638
|
+
name: 'Artemis Fund Managers Limited',
|
|
639
|
+
select: false
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
cost: 49751.43,
|
|
643
|
+
date: '2020-06-28',
|
|
644
|
+
name: 'CASH.CASH',
|
|
645
|
+
select: true
|
|
646
|
+
}
|
|
647
|
+
\]}
|
|
648
|
+
/>
|
|
649
|
+
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
#### Props
|
|
653
|
+
|
|
654
|
+
IressCheckboxIressCheckboxMark
|
|
655
|
+
|
|
656
|
+
Tabs
|
|
657
|
+
|
|
658
|
+
| Name | Description | Default | Control |
|
|
659
|
+
| --- | --- | --- | --- |
|
|
660
|
+
| checked |
|
|
661
|
+
If true, the checkbox is selected. Please use this when are rendering the checkbox in controlled mode.
|
|
662
|
+
|
|
663
|
+
boolean
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
| \- | Set boolean |
|
|
668
|
+
| children |
|
|
669
|
+
|
|
670
|
+
The checkbox content
|
|
671
|
+
|
|
672
|
+
ReactNode
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
| \- |
|
|
677
|
+
|
|
678
|
+
"Toggle row"
|
|
679
|
+
|
|
680
|
+
|
|
|
681
|
+
| defaultChecked |
|
|
682
|
+
|
|
683
|
+
If true, the checkbox will be initially rendered as selected. Please use this when are rendering the checkbox in uncontrolled mode.
|
|
684
|
+
|
|
685
|
+
boolean
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
| \- | Set boolean |
|
|
690
|
+
| hiddenControl |
|
|
691
|
+
|
|
692
|
+
Sets whether the control is hidden. If it is within a checkbox group, it will be overridden with the checkbox group's hiddenCheckbox setting.
|
|
693
|
+
|
|
694
|
+
boolean
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
| \- | Set boolean |
|
|
699
|
+
| hiddenLabel |
|
|
700
|
+
|
|
701
|
+
Visually hides the label (if set), label will still be read out by screenreaders.
|
|
702
|
+
|
|
703
|
+
boolean
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
| \- | FalseTrue |
|
|
708
|
+
| indeterminate |
|
|
709
|
+
|
|
710
|
+
If true, the checkbox will visually appear as indeterminate.
|
|
711
|
+
|
|
712
|
+
boolean
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
| \- | Set boolean |
|
|
717
|
+
| name |
|
|
718
|
+
|
|
719
|
+
The name of the control, which is submitted with the form data.
|
|
720
|
+
|
|
721
|
+
string
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
| \- | Set string |
|
|
726
|
+
| onBlur |
|
|
727
|
+
|
|
728
|
+
Emitted when the checkbox loses focus.
|
|
729
|
+
|
|
730
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
731
|
+
|
|
732
|
+
| \- | \- |
|
|
733
|
+
| onChange |
|
|
734
|
+
|
|
735
|
+
Emitted when the checkbox value changes.
|
|
736
|
+
|
|
737
|
+
( e: ChangeEvent<HTMLInputElement>, checked?: boolean, value?: T, ) => void
|
|
738
|
+
|
|
739
|
+
| \- | \- |
|
|
740
|
+
| onFocus |
|
|
741
|
+
|
|
742
|
+
Emitted when the checkbox gains focus.
|
|
743
|
+
|
|
744
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
745
|
+
|
|
746
|
+
| \- | \- |
|
|
747
|
+
| required |
|
|
748
|
+
|
|
749
|
+
If `true`, the checkbox is a required field and will be validated as such.
|
|
750
|
+
|
|
751
|
+
boolean
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
| \- | Set boolean |
|
|
756
|
+
| touch |
|
|
757
|
+
|
|
758
|
+
Add the button-like border and padding to checkbox when `touch` is true.
|
|
759
|
+
|
|
760
|
+
boolean
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
| \- | Set boolean |
|
|
765
|
+
| value |
|
|
766
|
+
|
|
767
|
+
Value of the checkbox when used in a checkbox group. The checked state of the checkbox will be overridden based on this value if used inside a checkbox group. **Note:**
|
|
768
|
+
|
|
769
|
+
* The value of the checkbox does not mean if its checked or not, use the checked property for that.
|
|
770
|
+
* If the value of the checkbox is true/false, and checked is undefined and not inside a CheckboxGroup, it will use this as the checked value. This ensures out-of-the-box compatibility with React Hook Form.
|
|
771
|
+
|
|
772
|
+
T
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
| \- | Set object |
|
|
777
|
+
|
|
778
|
+
### Read only
|
|
779
|
+
|
|
780
|
+
The `readOnly` prop changes how the checkbox is rendered. It will only render if the checkbox is checked (alongside a hidden input that contains the `value` if it was set), otherwise it will not be rendered.
|
|
781
|
+
|
|
782
|
+
It is understandable that this may not be the desired behavior for all use cases. If you need a checkbox that is not editable, but still visible, simply do not set the `readOnly` prop and set the `checked` prop instead.
|
|
783
|
+
|
|
784
|
+
[](./iframe.html?id=components-checkbox--read-only)
|
|
785
|
+
|
|
786
|
+
I agree to the terms and conditions
|
|
787
|
+
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
<IressStack\>
|
|
791
|
+
<IressCheckbox
|
|
792
|
+
defaultChecked
|
|
793
|
+
readOnly
|
|
794
|
+
value\="readOnly"
|
|
795
|
+
\>
|
|
796
|
+
I agree to the terms and conditions </IressCheckbox\>
|
|
797
|
+
<IressCheckbox
|
|
798
|
+
readOnly
|
|
799
|
+
value\="readOnly"
|
|
800
|
+
\>
|
|
801
|
+
I agree to the terms and conditions </IressCheckbox\>
|
|
802
|
+
</IressStack\>
|
|
803
|
+
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
#### Props
|
|
807
|
+
|
|
808
|
+
IressCheckboxIressCheckboxMark
|
|
809
|
+
|
|
810
|
+
Tabs
|
|
811
|
+
|
|
812
|
+
| Name | Description | Default | Control |
|
|
813
|
+
| --- | --- | --- | --- |
|
|
814
|
+
| checked |
|
|
815
|
+
If true, the checkbox is selected. Please use this when are rendering the checkbox in controlled mode.
|
|
816
|
+
|
|
817
|
+
boolean
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
| \- | \- |
|
|
822
|
+
| children |
|
|
823
|
+
|
|
824
|
+
The checkbox content
|
|
825
|
+
|
|
826
|
+
ReactNode
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
| \- |
|
|
831
|
+
|
|
832
|
+
"I agree to the terms and conditions"
|
|
833
|
+
|
|
834
|
+
|
|
|
835
|
+
| defaultChecked |
|
|
836
|
+
|
|
837
|
+
If true, the checkbox will be initially rendered as selected. Please use this when are rendering the checkbox in uncontrolled mode.
|
|
838
|
+
|
|
839
|
+
boolean
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
| \- | Set boolean |
|
|
844
|
+
| hiddenControl |
|
|
845
|
+
|
|
846
|
+
Sets whether the control is hidden. If it is within a checkbox group, it will be overridden with the checkbox group's hiddenCheckbox setting.
|
|
847
|
+
|
|
848
|
+
boolean
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
| \- | Set boolean |
|
|
853
|
+
| hiddenLabel |
|
|
854
|
+
|
|
855
|
+
Visually hides the label (if set), label will still be read out by screenreaders.
|
|
856
|
+
|
|
857
|
+
boolean
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
| \- | Set boolean |
|
|
862
|
+
| indeterminate |
|
|
863
|
+
|
|
864
|
+
If true, the checkbox will visually appear as indeterminate.
|
|
865
|
+
|
|
866
|
+
boolean
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
| \- | Set boolean |
|
|
871
|
+
| name |
|
|
872
|
+
|
|
873
|
+
The name of the control, which is submitted with the form data.
|
|
874
|
+
|
|
875
|
+
string
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
| \- | Set string |
|
|
880
|
+
| onBlur |
|
|
881
|
+
|
|
882
|
+
Emitted when the checkbox loses focus.
|
|
883
|
+
|
|
884
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
885
|
+
|
|
886
|
+
| \- | \- |
|
|
887
|
+
| onChange |
|
|
888
|
+
|
|
889
|
+
Emitted when the checkbox value changes.
|
|
890
|
+
|
|
891
|
+
( e: ChangeEvent<HTMLInputElement>, checked?: boolean, value?: T, ) => void
|
|
892
|
+
|
|
893
|
+
| \- | \- |
|
|
894
|
+
| onFocus |
|
|
895
|
+
|
|
896
|
+
Emitted when the checkbox gains focus.
|
|
897
|
+
|
|
898
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
899
|
+
|
|
900
|
+
| \- | \- |
|
|
901
|
+
| readOnly |
|
|
902
|
+
|
|
903
|
+
boolean
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
| \- | \- |
|
|
908
|
+
| required |
|
|
909
|
+
|
|
910
|
+
If `true`, the checkbox is a required field and will be validated as such.
|
|
911
|
+
|
|
912
|
+
boolean
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
| \- | Set boolean |
|
|
917
|
+
| touch |
|
|
918
|
+
|
|
919
|
+
Add the button-like border and padding to checkbox when `touch` is true.
|
|
920
|
+
|
|
921
|
+
boolean
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
| \- | Set boolean |
|
|
926
|
+
| value |
|
|
927
|
+
|
|
928
|
+
Value of the checkbox when used in a checkbox group. The checked state of the checkbox will be overridden based on this value if used inside a checkbox group. **Note:**
|
|
929
|
+
|
|
930
|
+
* The value of the checkbox does not mean if its checked or not, use the checked property for that.
|
|
931
|
+
* If the value of the checkbox is true/false, and checked is undefined and not inside a CheckboxGroup, it will use this as the checked value. This ensures out-of-the-box compatibility with React Hook Form.
|
|
932
|
+
|
|
933
|
+
T
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
| \- |
|
|
938
|
+
|
|
939
|
+
"readOnly"
|
|
940
|
+
|
|
941
|
+
|
|
|
942
|
+
|
|
943
|
+
### Touch
|
|
944
|
+
|
|
945
|
+
The `touch` prop adds the button-like border and padding to checkbox.
|
|
946
|
+
|
|
947
|
+
[](./iframe.html?id=components-checkbox--touch)
|
|
948
|
+
|
|
949
|
+
Checkbox with touch styles
|
|
950
|
+
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
<IressCheckbox touch\>
|
|
954
|
+
Checkbox with touch styles
|
|
955
|
+
</IressCheckbox\>
|
|
956
|
+
|
|
957
|
+
```
|
|
958
|
+
|
|
959
|
+
#### Props
|
|
960
|
+
|
|
961
|
+
IressCheckboxIressCheckboxMark
|
|
962
|
+
|
|
963
|
+
Tabs
|
|
964
|
+
|
|
965
|
+
| Name | Description | Default | Control |
|
|
966
|
+
| --- | --- | --- | --- |
|
|
967
|
+
| checked |
|
|
968
|
+
If true, the checkbox is selected. Please use this when are rendering the checkbox in controlled mode.
|
|
969
|
+
|
|
970
|
+
boolean
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
| \- | Set boolean |
|
|
975
|
+
| children |
|
|
976
|
+
|
|
977
|
+
The checkbox content
|
|
978
|
+
|
|
979
|
+
ReactNode
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
| \- |
|
|
984
|
+
|
|
985
|
+
"Checkbox with touch styles"
|
|
986
|
+
|
|
987
|
+
|
|
|
988
|
+
| defaultChecked |
|
|
989
|
+
|
|
990
|
+
If true, the checkbox will be initially rendered as selected. Please use this when are rendering the checkbox in uncontrolled mode.
|
|
991
|
+
|
|
992
|
+
boolean
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
| \- | Set boolean |
|
|
997
|
+
| hiddenControl |
|
|
998
|
+
|
|
999
|
+
Sets whether the control is hidden. If it is within a checkbox group, it will be overridden with the checkbox group's hiddenCheckbox setting.
|
|
1000
|
+
|
|
1001
|
+
boolean
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
| \- | Set boolean |
|
|
1006
|
+
| hiddenLabel |
|
|
1007
|
+
|
|
1008
|
+
Visually hides the label (if set), label will still be read out by screenreaders.
|
|
1009
|
+
|
|
1010
|
+
boolean
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
| \- | Set boolean |
|
|
1015
|
+
| indeterminate |
|
|
1016
|
+
|
|
1017
|
+
If true, the checkbox will visually appear as indeterminate.
|
|
1018
|
+
|
|
1019
|
+
boolean
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
| \- | Set boolean |
|
|
1024
|
+
| name |
|
|
1025
|
+
|
|
1026
|
+
The name of the control, which is submitted with the form data.
|
|
1027
|
+
|
|
1028
|
+
string
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
| \- | Set string |
|
|
1033
|
+
| onBlur |
|
|
1034
|
+
|
|
1035
|
+
Emitted when the checkbox loses focus.
|
|
1036
|
+
|
|
1037
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
1038
|
+
|
|
1039
|
+
| \- | \- |
|
|
1040
|
+
| onChange |
|
|
1041
|
+
|
|
1042
|
+
Emitted when the checkbox value changes.
|
|
1043
|
+
|
|
1044
|
+
( e: ChangeEvent<HTMLInputElement>, checked?: boolean, value?: T, ) => void
|
|
1045
|
+
|
|
1046
|
+
| \- | \- |
|
|
1047
|
+
| onFocus |
|
|
1048
|
+
|
|
1049
|
+
Emitted when the checkbox gains focus.
|
|
1050
|
+
|
|
1051
|
+
(e: FocusEvent<HTMLInputElement>) => void
|
|
1052
|
+
|
|
1053
|
+
| \- | \- |
|
|
1054
|
+
| required |
|
|
1055
|
+
|
|
1056
|
+
If `true`, the checkbox is a required field and will be validated as such.
|
|
1057
|
+
|
|
1058
|
+
boolean
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
| \- | Set boolean |
|
|
1063
|
+
| touch |
|
|
1064
|
+
|
|
1065
|
+
Add the button-like border and padding to checkbox when `touch` is true.
|
|
1066
|
+
|
|
1067
|
+
boolean
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
| \- | FalseTrue |
|
|
1072
|
+
| value |
|
|
1073
|
+
|
|
1074
|
+
Value of the checkbox when used in a checkbox group. The checked state of the checkbox will be overridden based on this value if used inside a checkbox group. **Note:**
|
|
1075
|
+
|
|
1076
|
+
* The value of the checkbox does not mean if its checked or not, use the checked property for that.
|
|
1077
|
+
* If the value of the checkbox is true/false, and checked is undefined and not inside a CheckboxGroup, it will use this as the checked value. This ensures out-of-the-box compatibility with React Hook Form.
|
|
1078
|
+
|
|
1079
|
+
T
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
| \- | Set object |
|