@jobber/components-native 0.108.2 → 0.109.0

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 (86) hide show
  1. package/dist/docs/Select/Select.md +987 -0
  2. package/dist/docs/index.md +1 -0
  3. package/dist/package.json +2 -2
  4. package/dist/src/Select/Select.composable.test.js +38 -0
  5. package/dist/src/Select/Select.js +26 -0
  6. package/dist/src/Select/SelectComposableTypes.js +1 -0
  7. package/dist/src/Select/SelectRoot.js +85 -0
  8. package/dist/src/Select/SelectRoot.style.js +9 -0
  9. package/dist/src/Select/SelectRoot.test.js +157 -0
  10. package/dist/src/Select/components/SelectContent.js +51 -0
  11. package/dist/src/Select/components/SelectContent.test.js +51 -0
  12. package/dist/src/Select/components/SelectFieldContext.js +10 -0
  13. package/dist/src/Select/components/SelectItem.js +29 -0
  14. package/dist/src/Select/components/SelectItem.style.js +6 -0
  15. package/dist/src/Select/components/SelectItem.test.js +98 -0
  16. package/dist/src/Select/components/SelectLabel.js +29 -0
  17. package/dist/src/Select/components/SelectTrigger.js +40 -0
  18. package/dist/src/Select/components/SelectTrigger.style.js +26 -0
  19. package/dist/src/Select/index.js +2 -0
  20. package/dist/src/primitives/Portal/index.js +3 -1
  21. package/dist/src/primitives/Select/SelectPrimitive.js +4 -12
  22. package/dist/src/primitives/Select/SelectPrimitive.style.js +14 -9
  23. package/dist/src/primitives/Select/SelectPrimitive.test.js +2 -2
  24. package/dist/src/primitives/Select/index.js +1 -1
  25. package/dist/src/utils/meta/meta.json +11 -0
  26. package/dist/tsconfig.build.tsbuildinfo +1 -1
  27. package/dist/types/src/Select/Select.composable.test.d.ts +1 -0
  28. package/dist/types/src/Select/Select.d.ts +18 -0
  29. package/dist/types/src/Select/SelectComposableTypes.d.ts +50 -0
  30. package/dist/types/src/Select/SelectRoot.d.ts +12 -0
  31. package/dist/types/src/Select/SelectRoot.style.d.ts +8 -0
  32. package/dist/types/src/Select/SelectRoot.test.d.ts +1 -0
  33. package/dist/types/src/Select/components/SelectContent.d.ts +8 -0
  34. package/dist/types/src/Select/components/SelectContent.test.d.ts +1 -0
  35. package/dist/types/src/Select/components/SelectFieldContext.d.ts +27 -0
  36. package/dist/types/src/Select/components/SelectItem.d.ts +32 -0
  37. package/dist/types/src/Select/components/SelectItem.style.d.ts +5 -0
  38. package/dist/types/src/Select/components/SelectItem.test.d.ts +1 -0
  39. package/dist/types/src/Select/components/SelectLabel.d.ts +22 -0
  40. package/dist/types/src/Select/components/SelectTrigger.d.ts +20 -0
  41. package/dist/types/src/Select/components/SelectTrigger.style.d.ts +21 -0
  42. package/dist/types/src/Select/index.d.ts +2 -1
  43. package/dist/types/src/primitives/Select/SelectPrimitive.d.ts +3 -1
  44. package/dist/types/src/primitives/Select/SelectPrimitive.style.d.ts +6 -3
  45. package/dist/types/src/primitives/Select/index.d.ts +1 -1
  46. package/dist/types/src/primitives/Select/types.d.ts +1 -1
  47. package/package.json +2 -2
  48. package/src/Select/Select.composable.stories.tsx +93 -0
  49. package/src/Select/Select.composable.test.tsx +56 -0
  50. package/src/Select/Select.guide.md +197 -0
  51. package/src/Select/Select.tsx +31 -0
  52. package/src/Select/SelectComposableTypes.ts +57 -0
  53. package/src/Select/SelectRoot.style.ts +10 -0
  54. package/src/Select/SelectRoot.test.tsx +245 -0
  55. package/src/Select/SelectRoot.tsx +120 -0
  56. package/src/Select/components/SelectContent.test.tsx +67 -0
  57. package/src/Select/components/SelectContent.tsx +75 -0
  58. package/src/Select/components/SelectFieldContext.tsx +46 -0
  59. package/src/Select/components/SelectItem.style.ts +7 -0
  60. package/src/Select/components/SelectItem.test.tsx +166 -0
  61. package/src/Select/components/SelectItem.tsx +78 -0
  62. package/src/Select/components/SelectLabel.tsx +57 -0
  63. package/src/Select/components/SelectTrigger.style.ts +29 -0
  64. package/src/Select/components/SelectTrigger.tsx +98 -0
  65. package/src/Select/docs/SelectComposableBasic.tsx +18 -0
  66. package/src/Select/docs/SelectComposableControlledWithRef.tsx +28 -0
  67. package/src/Select/docs/SelectComposableCustomMarker.tsx +25 -0
  68. package/src/Select/docs/SelectComposableDescription.tsx +18 -0
  69. package/src/Select/docs/SelectComposableDisabled.tsx +18 -0
  70. package/src/Select/docs/SelectComposableDisabledOptions.tsx +20 -0
  71. package/src/Select/docs/SelectComposableGroupedOptions.tsx +29 -0
  72. package/src/Select/docs/SelectComposableItemPrefixSuffix.tsx +34 -0
  73. package/src/Select/docs/SelectComposableLabelAbove.tsx +18 -0
  74. package/src/Select/docs/SelectComposableLabelInside.tsx +18 -0
  75. package/src/Select/docs/SelectComposableProvinces.tsx +36 -0
  76. package/src/Select/docs/SelectComposableReadOnly.tsx +18 -0
  77. package/src/Select/docs/SelectComposableValidationFlow.tsx +27 -0
  78. package/src/Select/docs/index.ts +14 -0
  79. package/src/Select/index.ts +10 -1
  80. package/src/primitives/Portal/index.ts +3 -1
  81. package/src/primitives/Select/SelectPrimitive.style.ts +18 -11
  82. package/src/primitives/Select/SelectPrimitive.test.tsx +2 -2
  83. package/src/primitives/Select/SelectPrimitive.tsx +6 -18
  84. package/src/primitives/Select/index.ts +4 -1
  85. package/src/primitives/Select/types.ts +1 -1
  86. package/src/utils/meta/meta.json +11 -0
@@ -0,0 +1,987 @@
1
+ # Select
2
+
3
+ Select presents a defined list of options to choose from. It is a prop-driven,
4
+ labelled dropdown wrapped in a field structure that handles the label,
5
+ description, and error messaging for you.
6
+
7
+ ```tsx
8
+ import React, { useState } from "react";
9
+ import { Select } from "@jobber/components/Select";
10
+
11
+ export function SelectBasicExample() {
12
+ const [value, setValue] = useState<string | undefined>("active");
13
+
14
+ return (
15
+ <Select label="Status" value={value} onValueChange={setValue}>
16
+ <Select.Item value="active">Active</Select.Item>
17
+ <Select.Item value="archived">Archived</Select.Item>
18
+ <Select.Item value="draft">Draft</Select.Item>
19
+ </Select>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design & usage guidelines
25
+
26
+ Use Select when a user needs to pick a single value from a known, reasonably
27
+ short list of options. Each option is declared with `Select.Item`, where the
28
+ `value` is submitted and the children are shown as the label.
29
+
30
+ Select is controlled: pass the current `value` and an `onValueChange` handler to
31
+ keep your state in sync.
32
+
33
+ ## Empty state
34
+
35
+ The `label` doubles as the placeholder: while no value is selected it sits
36
+ centered inside the field, then rises to a floating mini-label once the user
37
+ picks an option. There is no separate `placeholder` prop — the label fills that
38
+ role.
39
+
40
+ ```tsx
41
+ import React, { useState } from "react";
42
+ import { Select } from "@jobber/components/Select";
43
+
44
+ export function SelectEmptyExample() {
45
+ const [value, setValue] = useState<string | undefined>();
46
+
47
+ return (
48
+ <Select label="Status" value={value} onValueChange={setValue}>
49
+ <Select.Item value="active">Active</Select.Item>
50
+ <Select.Item value="archived">Archived</Select.Item>
51
+ <Select.Item value="draft">Draft</Select.Item>
52
+ </Select>
53
+ );
54
+ }
55
+ ```
56
+
57
+ ## Description
58
+
59
+ Use `description` to add supporting help text beneath the field.
60
+
61
+ ```tsx
62
+ import React, { useState } from "react";
63
+ import { Select } from "@jobber/components/Select";
64
+
65
+ export function SelectDescriptionExample() {
66
+ const [value, setValue] = useState<string | undefined>();
67
+
68
+ return (
69
+ <Select
70
+ label="Status"
71
+ description="This controls who can see the record."
72
+ value={value}
73
+ onValueChange={setValue}
74
+ >
75
+ <Select.Item value="active">Active</Select.Item>
76
+ <Select.Item value="archived">Archived</Select.Item>
77
+ <Select.Item value="draft">Draft</Select.Item>
78
+ </Select>
79
+ );
80
+ }
81
+ ```
82
+
83
+ ## States
84
+
85
+ ### Error
86
+
87
+ Pass an `error` message to mark the field invalid and show the message beneath
88
+ the field. The error replaces the description while it is present. Use `invalid`
89
+ instead to apply the invalid styling without a message — for example when a form
90
+ library such as React Hook Form renders the error text itself.
91
+
92
+ ```tsx
93
+ import React, { useState } from "react";
94
+ import { Select } from "@jobber/components/Select";
95
+
96
+ export function SelectErrorExample() {
97
+ const [value, setValue] = useState<string | undefined>();
98
+
99
+ return (
100
+ <Select
101
+ label="Status"
102
+ description="This controls who can see the record."
103
+ error="Please choose a status."
104
+ value={value}
105
+ onValueChange={setValue}
106
+ >
107
+ <Select.Item value="active">Active</Select.Item>
108
+ <Select.Item value="archived">Archived</Select.Item>
109
+ <Select.Item value="draft">Draft</Select.Item>
110
+ </Select>
111
+ );
112
+ }
113
+ ```
114
+
115
+ ### Disabled
116
+
117
+ Set `disabled` to prevent interaction with the field.
118
+
119
+ ```tsx
120
+ import React from "react";
121
+ import { Select } from "@jobber/components/Select";
122
+
123
+ export function SelectDisabledExample() {
124
+ return (
125
+ <Select label="Status" disabled value="active">
126
+ <Select.Item value="active">Active</Select.Item>
127
+ <Select.Item value="archived">Archived</Select.Item>
128
+ <Select.Item value="draft">Draft</Select.Item>
129
+ </Select>
130
+ );
131
+ }
132
+ ```
133
+
134
+ ## Grouping
135
+
136
+ Organize related options under section headers with `Select.Group` and
137
+ `Select.GroupLabel`. Adjacent groups are divided automatically, so you don't
138
+ need to add a separator between them. `Select.Separator` is available for adding
139
+ a divider elsewhere in the list.
140
+
141
+ ```tsx
142
+ import React, { useState } from "react";
143
+ import { Select } from "@jobber/components/Select";
144
+
145
+ export function SelectGroupedExample() {
146
+ const [value, setValue] = useState<string | undefined>();
147
+
148
+ return (
149
+ <Select label="Produce" value={value} onValueChange={setValue}>
150
+ <Select.Group>
151
+ <Select.GroupLabel>Fruits</Select.GroupLabel>
152
+ <Select.Item value="apple">Apple</Select.Item>
153
+ <Select.Item value="banana">Banana</Select.Item>
154
+ </Select.Group>
155
+ <Select.Group>
156
+ <Select.GroupLabel>Vegetables</Select.GroupLabel>
157
+ <Select.Item value="carrot">Carrot</Select.Item>
158
+ <Select.Item value="spinach">Spinach</Select.Item>
159
+ </Select.Group>
160
+ </Select>
161
+ );
162
+ }
163
+ ```
164
+
165
+ ## Custom selected value
166
+
167
+ The closed trigger shows the selected value capitalized by default. Pass
168
+ `renderValue` to display something different from the option's label — here the
169
+ list shows short labels (`Low`, `Medium`, `High`) while the trigger shows the
170
+ full `"High priority"`. The open list always shows each `Select.Item`'s
171
+ children.
172
+
173
+ ```tsx
174
+ import React, { useState } from "react";
175
+ import { Select } from "@jobber/components/Select";
176
+
177
+ const PRIORITY_LABELS: Record<string, string> = {
178
+ low: "Low priority",
179
+ medium: "Medium priority",
180
+ high: "High priority",
181
+ };
182
+
183
+ export function SelectRenderValueExample() {
184
+ const [value, setValue] = useState<string | undefined>("high");
185
+
186
+ return (
187
+ <Select
188
+ label="Priority"
189
+ value={value}
190
+ onValueChange={setValue}
191
+ renderValue={selected => PRIORITY_LABELS[selected]}
192
+ >
193
+ <Select.Item value="low">Low</Select.Item>
194
+ <Select.Item value="medium">Medium</Select.Item>
195
+ <Select.Item value="high">High</Select.Item>
196
+ </Select>
197
+ );
198
+ }
199
+ ```
200
+
201
+ ## Sizes
202
+
203
+ Use the `size` prop to render a `small` control for tighter layouts. The
204
+ floating mini-label is hidden at the `small` size, so the compact control keeps
205
+ a single-line height.
206
+
207
+ ```tsx
208
+ import React, { useState } from "react";
209
+ import { Select } from "@jobber/components/Select";
210
+
211
+ export function SelectSizeExample() {
212
+ const [value, setValue] = useState<string | undefined>("active");
213
+
214
+ return (
215
+ <Select label="Status" size="small" value={value} onValueChange={setValue}>
216
+ <Select.Item value="active">Active</Select.Item>
217
+ <Select.Item value="archived">Archived</Select.Item>
218
+ <Select.Item value="draft">Draft</Select.Item>
219
+ </Select>
220
+ );
221
+ }
222
+ ```
223
+
224
+ ## Inline
225
+
226
+ Set `inline` to embed the Select within a line of text. The description and
227
+ error messaging are suppressed in inline mode.
228
+
229
+ ```tsx
230
+ import React, { useState } from "react";
231
+ import { Select } from "@jobber/components/Select";
232
+
233
+ export function SelectInlineExample() {
234
+ const [value, setValue] = useState<string | undefined>("active");
235
+
236
+ return (
237
+ <div>
238
+ Set the record to{" "}
239
+ <Select label="Status" inline value={value} onValueChange={setValue}>
240
+ <Select.Item value="active">Active</Select.Item>
241
+ <Select.Item value="archived">Archived</Select.Item>
242
+ <Select.Item value="draft">Draft</Select.Item>
243
+ </Select>{" "}
244
+ today.
245
+ </div>
246
+ );
247
+ }
248
+ ```
249
+
250
+ ## Mobile
251
+
252
+ On small (touch-sized) web screens — viewport widths of `490px` or less — the
253
+ options open as a bottom sheet instead of an anchored dropdown, matching the
254
+ mobile pattern used by `Menu` and `Dialog`. This is automatic and requires no
255
+ props; selection, keyboard, and focus behaviour are unchanged. Resize the
256
+ preview narrow (or open the examples above on a phone) to see the sheet.
257
+
258
+
259
+ ## Content
260
+
261
+ ### Options and labels
262
+
263
+ Declare each option with `Select.Item`. The `value` prop is what `onValueChange`
264
+ reports and what is submitted with a form; the children are the human-readable
265
+ label shown in the open list.
266
+
267
+ ### The selected value display
268
+
269
+ The closed trigger shows the selected **value**, capitalized by default (e.g.
270
+ `"active"` → `"Active"`). It does not read the option's children — so when the
271
+ label differs from the capitalized value, pass `renderValue` to control what the
272
+ trigger shows:
273
+
274
+ ```tsx
275
+ <Select
276
+ label="Status"
277
+ value={value}
278
+ onValueChange={setValue}
279
+ renderValue={value => STATUS_LABELS[value]}
280
+ >
281
+ {/* Select.Item options */}
282
+ </Select>
283
+ ```
284
+
285
+ ### Grouping
286
+
287
+ * `Select.Group`: wraps a set of related options.
288
+ * `Select.GroupLabel`: the section header text for a group.
289
+ * `Select.Separator`: an optional visual divider. Adjacent `Select.Group`s are
290
+ already divided automatically, so reach for this only to divide options
291
+ elsewhere in the list.
292
+
293
+ ## Component customization
294
+
295
+ Select is intentionally opinionated: it exposes a curated set of props rather
296
+ than the full underlying API. The subcomponents (`Select.Item`, `Select.Group`,
297
+ `Select.GroupLabel`, `Select.Separator`) accept `className` and `style` for
298
+ per-option styling; reach out to UXF if you need behaviour beyond what the props
299
+ provide.
300
+
301
+ ### Controlled usage
302
+
303
+ Select is controlled only. Always pass `value` and `onValueChange`; there is no
304
+ uncontrolled `defaultValue`. The `id` and `name` are generated for you and wired
305
+ to the label automatically.
306
+
307
+ The change handler is named `onValueChange` to stay isomorphic with Base UI, and
308
+ to encode the payload (the value, not an event) in its name.
309
+
310
+ ### Using with a form library
311
+
312
+ Select is form-library-agnostic — it exposes plain controlled props, so any
313
+ system (React Hook Form, Formik, TanStack Form, or plain `useState`) drives it
314
+ by wiring:
315
+
316
+ * `value` — the current value
317
+ * `onValueChange` — the library's value setter
318
+ * `onBlur` / `onFocus` — touched state and blur/focus-mode validation
319
+ * `error` (message) or `invalid` (styling only) — validation feedback
320
+ * `ref` — exposes `focus()`, so a form can focus this field on error
321
+
322
+ Because the change prop is `onValueChange` (not `onChange`), spreading a field
323
+ object whose handler is named `onChange` — for example React Hook Form's `field`
324
+ via `<Select {...field} />` — will **not** wire up the change handler.
325
+ `field.onChange` lands on a prop nothing reads, and JSX spread does not error,
326
+ so the field silently stops updating. Wire the props explicitly instead:
327
+
328
+ ```tsx
329
+ <Controller
330
+ control={control}
331
+ name="status"
332
+ render={({ field }) => (
333
+ <Select
334
+ label="Status"
335
+ name={field.name}
336
+ value={field.value}
337
+ onValueChange={field.onChange}
338
+ onBlur={field.onBlur}
339
+ ref={field.ref}
340
+ >
341
+ {/* Select.Item options */}
342
+ </Select>
343
+ )}
344
+ />
345
+ ```
346
+
347
+ If you want spread ergonomics, keep the remap in your own app — the design
348
+ system intentionally ships no form-library adapter:
349
+
350
+ ```tsx
351
+ // app-side helper, not part of @jobber/components
352
+ const toValueField = ({ onChange, ...field }) => ({
353
+ ...field,
354
+ onValueChange: onChange,
355
+ });
356
+
357
+ <Select label="Status" {...toValueField(field)}>
358
+ {/* Select.Item options */}
359
+ </Select>;
360
+ ```
361
+
362
+ > **Note:** Select is built on Base UI's `Field` primitive, but it is not yet
363
+ > wired to participate in a surrounding Base UI `<Form>` — the `Form` `errors`
364
+ > prop and `Form`-driven focus-on-error do not reach Select. Drive validation
365
+ > through the `error` / `invalid` props for now.
366
+
367
+ ## Related components
368
+
369
+ * [LegacySelect](/components/LegacySelect): the previous native `<select>`-based
370
+ implementation.
371
+
372
+
373
+ ## Props
374
+
375
+ ### Mobile
376
+
377
+ #### Option
378
+
379
+ | Prop | Type | Required | Default | Description |
380
+ |------|------|----------|---------|-------------|
381
+ | `children` | `string` | Yes | — | Text that shows up as the option |
382
+ | `value` | `string` | Yes | — | The value that gets returned when an option is selected |
383
+
384
+ #### Select
385
+
386
+ | Prop | Type | Required | Default | Description |
387
+ |------|------|----------|---------|-------------|
388
+ | `children` | `ReactElement<SelectOption, string | JSXElementConstructor<any>>[]` | Yes | — | The options to select from |
389
+ | `accessibilityHint` | `string` | No | — | Helps users understand what will happen when they perform an action |
390
+ | `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the element |
391
+ | `assistiveText` | `string` | No | — | Help text shown below the control. |
392
+ | `defaultValue` | `string` | No | — | Default value for when the component is uncontrolled |
393
+ | `disabled` | `boolean` | No | — | Disables input selection |
394
+ | `invalid` | `boolean` | No | — | Indicates the current selection is invalid |
395
+ | `label` | `string` | No | — | Label text shown above the selection. |
396
+ | `name` | `string` | No | — | Name of the input. |
397
+ | `onChange` | `(newValue?: string) => void` | No | — | Callback that provides the new value when the selection changes |
398
+ | `placeholder` | `string` | No | — | Adds a first option to let users select a "no value". Placeholder item selected by default until a selection is made. |
399
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
400
+ | `validations` | `RegisterOptions` | No | — | The validations that will mark this component as invalid |
401
+ | `value` | `string` | No | — | Current value of the component |
402
+
403
+ #### Select.Content
404
+
405
+ | Prop | Type | Required | Default | Description |
406
+ |------|------|----------|---------|-------------|
407
+ | `accessibilityActions` | `readonly Readonly<{ name: string; label?: string; }>[]` | No | — | Provides an array of custom actions available for accessibility. |
408
+ | `accessibilityElementsHidden` | `boolean` | No | — | A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden ... |
409
+ | `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
410
+ | `accessibilityIgnoresInvertColors` | `boolean` | No | — | https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios @platform ios |
411
+ | `accessibilityLabel` | `string` | No | — | Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label i... |
412
+ | `accessibilityLabelledBy` | `string | string[]` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
413
+ | `accessibilityLanguage` | `string` | No | — | By using the accessibilityLanguage property, the screen reader will understand which language to use while reading th... |
414
+ | `accessibilityLargeContentTitle` | `string` | No | — | When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. h... |
415
+ | `accessibilityLiveRegion` | `"assertive" | "none" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
416
+ | `accessibilityRespondsToUserInteraction` | `boolean` | No | — | Blocks the user from interacting with the component through keyboard while still allowing screen reader to interact w... |
417
+ | `accessibilityRole` | `AccessibilityRole` | No | — | Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is fo... |
418
+ | `accessibilityShowsLargeContentViewer` | `boolean` | No | — | A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ ht... |
419
+ | `accessibilityState` | `AccessibilityState` | No | — | Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element curr... |
420
+ | `accessibilityValue` | `AccessibilityValue` | No | — | Represents the current value of a component. It can be a textual description of a component's value, or for range-bas... |
421
+ | `accessibilityViewIsModal` | `boolean` | No | — | A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receive... |
422
+ | `accessible` | `boolean` | No | — | When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. |
423
+ | `align` | `"center" | "end" | "start"` | No | — | |
424
+ | `alignOffset` | `number` | No | — | |
425
+ | `aria-busy` | `boolean` | No | — | alias for accessibilityState see https://reactnative.dev/docs/accessibility#accessibilitystate |
426
+ | `aria-checked` | `"mixed" | boolean` | No | — | |
427
+ | `aria-disabled` | `boolean` | No | — | |
428
+ | `aria-expanded` | `boolean` | No | — | |
429
+ | `aria-hidden` | `boolean` | No | — | A value indicating whether the accessibility elements contained within this accessibility element are hidden. |
430
+ | `aria-label` | `string` | No | — | Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel https://github.com/facebook/react-... |
431
+ | `aria-labelledby` | `string` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
432
+ | `aria-live` | `"assertive" | "off" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
433
+ | `aria-modal` | `boolean` | No | — | |
434
+ | `aria-selected` | `boolean` | No | — | |
435
+ | `aria-valuemax` | `number` | No | — | |
436
+ | `aria-valuemin` | `number` | No | — | |
437
+ | `aria-valuenow` | `number` | No | — | |
438
+ | `aria-valuetext` | `string` | No | — | |
439
+ | `asChild` | `boolean` | No | — | |
440
+ | `avoidCollisions` | `boolean` | No | — | |
441
+ | `collapsable` | `boolean` | No | — | Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from ... |
442
+ | `collapsableChildren` | `boolean` | No | — | Setting to false prevents direct children of the view from being removed from the native view hierarchy, similar to t... |
443
+ | `collisionBoundary` | `Element | Element[]` | No | — | Platform: WEB ONLY |
444
+ | `disablePositioningStyle` | `boolean` | No | — | Platform: NATIVE ONLY |
445
+ | `focusable` | `boolean` | No | — | Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. |
446
+ | `forceMount` | `true` | No | — | |
447
+ | `hasTVPreferredFocus` | `boolean` | No | — | *(Apple TV only)* May be set to true to force the Apple TV focus engine to move focus to this view. @platform ios @de... |
448
+ | `hideWhenDetached` | `boolean` | No | — | Platform: WEB ONLY |
449
+ | `hitSlop` | `Insets | number` | No | — | This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets... |
450
+ | `id` | `string` | No | — | Used to reference react managed views from native code. |
451
+ | `importantForAccessibility` | `"auto" | "no" | "no-hide-descendants" | "yes"` | No | — | [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. |
452
+ | `insets` | `Insets` | No | — | |
453
+ | `isTVSelectable` | `boolean` | No | — | *(Apple TV only)* When set to true, this view will be focusable and navigable using the Apple TV remote. @platform ios |
454
+ | `loop` | `boolean` | No | — | Platform: WEB ONLY |
455
+ | `nativeID` | `string` | No | — | Used to reference react managed views from native code. |
456
+ | `needsOffscreenAlphaCompositing` | `boolean` | No | — | Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors a... |
457
+ | `onAccessibilityAction` | `(event: AccessibilityActionEvent) => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom... |
458
+ | `onAccessibilityEscape` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with t... |
459
+ | `onAccessibilityTap` | `() => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gestu... |
460
+ | `onBlur` | `(e: BlurEvent) => void` | No | — | Callback that is called when the view is blurred. Note: This will only be called if the view is focusable. |
461
+ | `onCloseAutoFocus` | `(event: Event) => void` | No | — | Platform: WEB ONLY |
462
+ | `onEscapeKeyDown` | `(event: KeyboardEvent) => void` | No | — | Platform: WEB ONLY |
463
+ | `onFocus` | `(e: FocusEvent) => void` | No | — | Callback that is called when the view is focused. Note: This will only be called if the view is focusable. |
464
+ | `onFocusOutside` | `(event: FocusOutsideEvent) => void` | No | — | Platform: WEB ONLY |
465
+ | `onInteractOutside` | `(event: PointerDownOutsideEvent | FocusOutsideEvent) => void` | No | — | Platform: WEB ONLY |
466
+ | `onLayout` | `(event: LayoutChangeEvent) => void` | No | — | Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}. |
467
+ | `onMagicTap` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the magic tap gesture. @platform... |
468
+ | `onMoveShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsive... |
469
+ | `onMoveShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
470
+ | `onPointerCancel` | `(event: PointerEvent) => void` | No | — | |
471
+ | `onPointerCancelCapture` | `(event: PointerEvent) => void` | No | — | |
472
+ | `onPointerDown` | `(event: PointerEvent) => void` | No | — | |
473
+ | `onPointerDownCapture` | `(event: PointerEvent) => void` | No | — | |
474
+ | `onPointerDownOutside` | `(event: PointerDownOutsideEvent) => void` | No | — | Platform: WEB ONLY |
475
+ | `onPointerEnter` | `(event: PointerEvent) => void` | No | — | |
476
+ | `onPointerEnterCapture` | `(event: PointerEvent) => void` | No | — | |
477
+ | `onPointerLeave` | `(event: PointerEvent) => void` | No | — | |
478
+ | `onPointerLeaveCapture` | `(event: PointerEvent) => void` | No | — | |
479
+ | `onPointerMove` | `(event: PointerEvent) => void` | No | — | |
480
+ | `onPointerMoveCapture` | `(event: PointerEvent) => void` | No | — | |
481
+ | `onPointerUp` | `(event: PointerEvent) => void` | No | — | |
482
+ | `onPointerUpCapture` | `(event: PointerEvent) => void` | No | — | |
483
+ | `onResponderEnd` | `(event: GestureResponderEvent) => void` | No | — | If the View returns true and attempts to become the responder, one of the following will happen: |
484
+ | `onResponderGrant` | `(event: GestureResponderEvent) => void` | No | — | The View is now responding for touch events. This is the time to highlight and show the user what is happening |
485
+ | `onResponderMove` | `(event: GestureResponderEvent) => void` | No | — | The user is moving their finger |
486
+ | `onResponderReject` | `(event: GestureResponderEvent) => void` | No | — | Something else is the responder right now and will not release it |
487
+ | `onResponderRelease` | `(event: GestureResponderEvent) => void` | No | — | Fired at the end of the touch, ie "touchUp" |
488
+ | `onResponderStart` | `(event: GestureResponderEvent) => void` | No | — | |
489
+ | `onResponderTerminate` | `(event: GestureResponderEvent) => void` | No | — | The responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationReque... |
490
+ | `onResponderTerminationRequest` | `(event: GestureResponderEvent) => boolean` | No | — | Something else wants to become responder. Should this view release the responder? Returning true allows release |
491
+ | `onStartShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Does this view want to become responder on the start of a touch? |
492
+ | `onStartShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
493
+ | `onTouchCancel` | `(event: GestureResponderEvent) => void` | No | — | |
494
+ | `onTouchEnd` | `(event: GestureResponderEvent) => void` | No | — | |
495
+ | `onTouchEndCapture` | `(event: GestureResponderEvent) => void` | No | — | |
496
+ | `onTouchMove` | `(event: GestureResponderEvent) => void` | No | — | |
497
+ | `onTouchStart` | `(event: GestureResponderEvent) => void` | No | — | |
498
+ | `pointerEvents` | `"auto" | "box-none" | "box-only" | "none"` | No | — | In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class:... |
499
+ | `position` | `"item-aligned" | "popper"` | No | — | Platform: WEB ONLY |
500
+ | `ref` | `Ref<View>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
501
+ | `removeClippedSubviews` | `boolean` | No | — | This is a special performance property exposed by RCTView and is useful for scrolling content when there are many sub... |
502
+ | `renderToHardwareTextureAndroid` | `boolean` | No | — | Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Andro... |
503
+ | `role` | `Role` | No | — | Indicates to accessibility services to treat UI component like a specific role. |
504
+ | `screenReaderFocusable` | `boolean` | No | — | Enables the view to be screen reader focusable, not keyboard focusable. @platform android |
505
+ | `shouldRasterizeIOS` | `boolean` | No | — | Whether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and inter... |
506
+ | `side` | `"bottom" | "top"` | No | — | |
507
+ | `sideOffset` | `number` | No | — | |
508
+ | `sticky` | `"always" | "partial"` | No | — | Platform: WEB ONLY |
509
+ | `style` | `StyleProp<ViewStyle>` | No | — | |
510
+ | `tabIndex` | `-1 | 0` | No | — | Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware ke... |
511
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
512
+ | `tvParallaxMagnification` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
513
+ | `tvParallaxShiftDistanceX` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
514
+ | `tvParallaxShiftDistanceY` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
515
+ | `tvParallaxTiltAngle` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
516
+
517
+ #### Select.Group
518
+
519
+ | Prop | Type | Required | Default | Description |
520
+ |------|------|----------|---------|-------------|
521
+ | `accessibilityActions` | `readonly Readonly<{ name: string; label?: string; }>[]` | No | — | Provides an array of custom actions available for accessibility. |
522
+ | `accessibilityElementsHidden` | `boolean` | No | — | A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden ... |
523
+ | `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
524
+ | `accessibilityIgnoresInvertColors` | `boolean` | No | — | https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios @platform ios |
525
+ | `accessibilityLabel` | `string` | No | — | Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label i... |
526
+ | `accessibilityLabelledBy` | `string | string[]` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
527
+ | `accessibilityLanguage` | `string` | No | — | By using the accessibilityLanguage property, the screen reader will understand which language to use while reading th... |
528
+ | `accessibilityLargeContentTitle` | `string` | No | — | When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. h... |
529
+ | `accessibilityLiveRegion` | `"assertive" | "none" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
530
+ | `accessibilityRespondsToUserInteraction` | `boolean` | No | — | Blocks the user from interacting with the component through keyboard while still allowing screen reader to interact w... |
531
+ | `accessibilityRole` | `AccessibilityRole` | No | — | Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is fo... |
532
+ | `accessibilityShowsLargeContentViewer` | `boolean` | No | — | A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ ht... |
533
+ | `accessibilityState` | `AccessibilityState` | No | — | Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element curr... |
534
+ | `accessibilityValue` | `AccessibilityValue` | No | — | Represents the current value of a component. It can be a textual description of a component's value, or for range-bas... |
535
+ | `accessibilityViewIsModal` | `boolean` | No | — | A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receive... |
536
+ | `accessible` | `boolean` | No | — | When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. |
537
+ | `aria-busy` | `boolean` | No | — | alias for accessibilityState see https://reactnative.dev/docs/accessibility#accessibilitystate |
538
+ | `aria-checked` | `"mixed" | boolean` | No | — | |
539
+ | `aria-disabled` | `boolean` | No | — | |
540
+ | `aria-expanded` | `boolean` | No | — | |
541
+ | `aria-hidden` | `boolean` | No | — | A value indicating whether the accessibility elements contained within this accessibility element are hidden. |
542
+ | `aria-label` | `string` | No | — | Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel https://github.com/facebook/react-... |
543
+ | `aria-labelledby` | `string` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
544
+ | `aria-live` | `"assertive" | "off" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
545
+ | `aria-modal` | `boolean` | No | — | |
546
+ | `aria-selected` | `boolean` | No | — | |
547
+ | `aria-valuemax` | `number` | No | — | |
548
+ | `aria-valuemin` | `number` | No | — | |
549
+ | `aria-valuenow` | `number` | No | — | |
550
+ | `aria-valuetext` | `string` | No | — | |
551
+ | `asChild` | `boolean` | No | — | |
552
+ | `collapsable` | `boolean` | No | — | Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from ... |
553
+ | `collapsableChildren` | `boolean` | No | — | Setting to false prevents direct children of the view from being removed from the native view hierarchy, similar to t... |
554
+ | `focusable` | `boolean` | No | — | Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. |
555
+ | `hasTVPreferredFocus` | `boolean` | No | — | *(Apple TV only)* May be set to true to force the Apple TV focus engine to move focus to this view. @platform ios @de... |
556
+ | `hitSlop` | `Insets | number` | No | — | This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets... |
557
+ | `id` | `string` | No | — | Used to reference react managed views from native code. |
558
+ | `importantForAccessibility` | `"auto" | "no" | "no-hide-descendants" | "yes"` | No | — | [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. |
559
+ | `isTVSelectable` | `boolean` | No | — | *(Apple TV only)* When set to true, this view will be focusable and navigable using the Apple TV remote. @platform ios |
560
+ | `nativeID` | `string` | No | — | Used to reference react managed views from native code. |
561
+ | `needsOffscreenAlphaCompositing` | `boolean` | No | — | Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors a... |
562
+ | `onAccessibilityAction` | `(event: AccessibilityActionEvent) => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom... |
563
+ | `onAccessibilityEscape` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with t... |
564
+ | `onAccessibilityTap` | `() => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gestu... |
565
+ | `onBlur` | `(e: BlurEvent) => void` | No | — | Callback that is called when the view is blurred. Note: This will only be called if the view is focusable. |
566
+ | `onFocus` | `(e: FocusEvent) => void` | No | — | Callback that is called when the view is focused. Note: This will only be called if the view is focusable. |
567
+ | `onLayout` | `(event: LayoutChangeEvent) => void` | No | — | Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}. |
568
+ | `onMagicTap` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the magic tap gesture. @platform... |
569
+ | `onMoveShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsive... |
570
+ | `onMoveShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
571
+ | `onPointerCancel` | `(event: PointerEvent) => void` | No | — | |
572
+ | `onPointerCancelCapture` | `(event: PointerEvent) => void` | No | — | |
573
+ | `onPointerDown` | `(event: PointerEvent) => void` | No | — | |
574
+ | `onPointerDownCapture` | `(event: PointerEvent) => void` | No | — | |
575
+ | `onPointerEnter` | `(event: PointerEvent) => void` | No | — | |
576
+ | `onPointerEnterCapture` | `(event: PointerEvent) => void` | No | — | |
577
+ | `onPointerLeave` | `(event: PointerEvent) => void` | No | — | |
578
+ | `onPointerLeaveCapture` | `(event: PointerEvent) => void` | No | — | |
579
+ | `onPointerMove` | `(event: PointerEvent) => void` | No | — | |
580
+ | `onPointerMoveCapture` | `(event: PointerEvent) => void` | No | — | |
581
+ | `onPointerUp` | `(event: PointerEvent) => void` | No | — | |
582
+ | `onPointerUpCapture` | `(event: PointerEvent) => void` | No | — | |
583
+ | `onResponderEnd` | `(event: GestureResponderEvent) => void` | No | — | If the View returns true and attempts to become the responder, one of the following will happen: |
584
+ | `onResponderGrant` | `(event: GestureResponderEvent) => void` | No | — | The View is now responding for touch events. This is the time to highlight and show the user what is happening |
585
+ | `onResponderMove` | `(event: GestureResponderEvent) => void` | No | — | The user is moving their finger |
586
+ | `onResponderReject` | `(event: GestureResponderEvent) => void` | No | — | Something else is the responder right now and will not release it |
587
+ | `onResponderRelease` | `(event: GestureResponderEvent) => void` | No | — | Fired at the end of the touch, ie "touchUp" |
588
+ | `onResponderStart` | `(event: GestureResponderEvent) => void` | No | — | |
589
+ | `onResponderTerminate` | `(event: GestureResponderEvent) => void` | No | — | The responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationReque... |
590
+ | `onResponderTerminationRequest` | `(event: GestureResponderEvent) => boolean` | No | — | Something else wants to become responder. Should this view release the responder? Returning true allows release |
591
+ | `onStartShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Does this view want to become responder on the start of a touch? |
592
+ | `onStartShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
593
+ | `onTouchCancel` | `(event: GestureResponderEvent) => void` | No | — | |
594
+ | `onTouchEnd` | `(event: GestureResponderEvent) => void` | No | — | |
595
+ | `onTouchEndCapture` | `(event: GestureResponderEvent) => void` | No | — | |
596
+ | `onTouchMove` | `(event: GestureResponderEvent) => void` | No | — | |
597
+ | `onTouchStart` | `(event: GestureResponderEvent) => void` | No | — | |
598
+ | `pointerEvents` | `"auto" | "box-none" | "box-only" | "none"` | No | — | In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class:... |
599
+ | `ref` | `Ref<View>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
600
+ | `removeClippedSubviews` | `boolean` | No | — | This is a special performance property exposed by RCTView and is useful for scrolling content when there are many sub... |
601
+ | `renderToHardwareTextureAndroid` | `boolean` | No | — | Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Andro... |
602
+ | `role` | `Role` | No | — | Indicates to accessibility services to treat UI component like a specific role. |
603
+ | `screenReaderFocusable` | `boolean` | No | — | Enables the view to be screen reader focusable, not keyboard focusable. @platform android |
604
+ | `shouldRasterizeIOS` | `boolean` | No | — | Whether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and inter... |
605
+ | `style` | `StyleProp<ViewStyle>` | No | — | |
606
+ | `tabIndex` | `-1 | 0` | No | — | Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware ke... |
607
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
608
+ | `tvParallaxMagnification` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
609
+ | `tvParallaxShiftDistanceX` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
610
+ | `tvParallaxShiftDistanceY` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
611
+ | `tvParallaxTiltAngle` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
612
+
613
+ #### Select.GroupLabel
614
+
615
+ | Prop | Type | Required | Default | Description |
616
+ |------|------|----------|---------|-------------|
617
+ | `accessibilityActions` | `readonly Readonly<{ name: string; label?: string; }>[]` | No | — | Provides an array of custom actions available for accessibility. |
618
+ | `accessibilityElementsHidden` | `boolean` | No | — | A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden ... |
619
+ | `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
620
+ | `accessibilityIgnoresInvertColors` | `boolean` | No | — | https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios @platform ios |
621
+ | `accessibilityLabel` | `string` | No | — | Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label i... |
622
+ | `accessibilityLabelledBy` | `string | string[]` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
623
+ | `accessibilityLanguage` | `string` | No | — | By using the accessibilityLanguage property, the screen reader will understand which language to use while reading th... |
624
+ | `accessibilityLargeContentTitle` | `string` | No | — | When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. h... |
625
+ | `accessibilityLiveRegion` | `"assertive" | "none" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
626
+ | `accessibilityRespondsToUserInteraction` | `boolean` | No | — | Blocks the user from interacting with the component through keyboard while still allowing screen reader to interact w... |
627
+ | `accessibilityRole` | `AccessibilityRole` | No | — | Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is fo... |
628
+ | `accessibilityShowsLargeContentViewer` | `boolean` | No | — | A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ ht... |
629
+ | `accessibilityState` | `AccessibilityState` | No | — | Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element curr... |
630
+ | `accessibilityValue` | `AccessibilityValue` | No | — | Represents the current value of a component. It can be a textual description of a component's value, or for range-bas... |
631
+ | `accessibilityViewIsModal` | `boolean` | No | — | A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receive... |
632
+ | `accessible` | `boolean` | No | — | When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. |
633
+ | `adjustsFontSizeToFit` | `boolean` | No | — | Specifies whether font should be scaled down automatically to fit given style constraints. |
634
+ | `allowFontScaling` | `boolean` | No | — | Specifies whether fonts should scale to respect Text Size accessibility settings. The default is `true`. |
635
+ | `android_hyphenationFrequency` | `"full" | "none" | "normal"` | No | — | Hyphenation strategy |
636
+ | `aria-busy` | `boolean` | No | — | alias for accessibilityState see https://reactnative.dev/docs/accessibility#accessibilitystate |
637
+ | `aria-checked` | `"mixed" | boolean` | No | — | |
638
+ | `aria-disabled` | `boolean` | No | — | |
639
+ | `aria-expanded` | `boolean` | No | — | |
640
+ | `aria-hidden` | `boolean` | No | — | A value indicating whether the accessibility elements contained within this accessibility element are hidden. |
641
+ | `aria-label` | `string` | No | — | Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel https://github.com/facebook/react-... |
642
+ | `aria-labelledby` | `string` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
643
+ | `aria-live` | `"assertive" | "off" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
644
+ | `aria-modal` | `boolean` | No | — | |
645
+ | `aria-selected` | `boolean` | No | — | |
646
+ | `aria-valuemax` | `number` | No | — | |
647
+ | `aria-valuemin` | `number` | No | — | |
648
+ | `aria-valuenow` | `number` | No | — | |
649
+ | `aria-valuetext` | `string` | No | — | |
650
+ | `asChild` | `boolean` | No | — | |
651
+ | `dataDetectorType` | `"all" | "email" | "link" | "none" | "phoneNumber"` | No | — | Determines the types of data converted to clickable URLs in the text element. By default no data types are detected. |
652
+ | `disabled` | `boolean` | No | — | Specifies the disabled state of the text view for testing purposes. |
653
+ | `dynamicTypeRamp` | `"body" | "callout" | "caption1" | "caption2" | "footnote" | "headline" | "largeTitle" | "subheadline" | "title1" | "title2" | "title3"` | No | — | The Dynamic Type scale ramp to apply to this element on iOS. |
654
+ | `ellipsizeMode` | `"clip" | "head" | "middle" | "tail"` | No | — | This can be one of the following values: - `head` - The line is displayed so that the end fits in the container and ... |
655
+ | `id` | `string` | No | — | Used to reference react managed views from native code. |
656
+ | `importantForAccessibility` | `"auto" | "no" | "no-hide-descendants" | "yes"` | No | — | [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. |
657
+ | `lineBreakMode` | `"clip" | "head" | "middle" | "tail"` | No | — | Line Break mode. Works only with numberOfLines. clip is working only for iOS |
658
+ | `lineBreakStrategyIOS` | `"hangul-word" | "none" | "push-out" | "standard"` | No | — | Set line break strategy on iOS. |
659
+ | `maxFontSizeMultiplier` | `number` | No | — | Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values: - null/undefined... |
660
+ | `minimumFontScale` | `number` | No | — | Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). |
661
+ | `nativeID` | `string` | No | — | Used to reference react managed views from native code. |
662
+ | `numberOfLines` | `number` | No | — | Used to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the to... |
663
+ | `onAccessibilityAction` | `(event: AccessibilityActionEvent) => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom... |
664
+ | `onAccessibilityEscape` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with t... |
665
+ | `onAccessibilityTap` | `() => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gestu... |
666
+ | `onLayout` | `(event: LayoutChangeEvent) => void` | No | — | Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}. |
667
+ | `onLongPress` | `(event: GestureResponderEvent) => void` | No | — | This function is called on long press. e.g., `onLongPress={this.increaseSize}>` |
668
+ | `onMagicTap` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the magic tap gesture. @platform... |
669
+ | `onPress` | `(event: GestureResponderEvent) => void` | No | — | This function is called on press. Text intrinsically supports press handling with a default highlight state (which ca... |
670
+ | `onPressIn` | `(event: GestureResponderEvent) => void` | No | — | |
671
+ | `onPressOut` | `(event: GestureResponderEvent) => void` | No | — | |
672
+ | `onTextLayout` | `(event: TextLayoutEvent) => void` | No | — | Invoked on Text layout |
673
+ | `pointerEvents` | `"auto" | "box-none" | "box-only" | "none"` | No | — | Controls how touch events are handled. Similar to `View`'s `pointerEvents`. |
674
+ | `pressRetentionOffset` | `{ top: number; left: number; bottom: number; right: number; }` | No | — | Defines how far your touch may move off of the button, before deactivating the button. |
675
+ | `ref` | `Ref<View>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
676
+ | `role` | `Role` | No | — | Indicates to accessibility services to treat UI component like a specific role. |
677
+ | `screenReaderFocusable` | `boolean` | No | — | Enables the view to be screen reader focusable, not keyboard focusable. @platform android |
678
+ | `selectable` | `boolean` | No | — | Lets the user select text, to use the native copy and paste functionality. |
679
+ | `selectionColor` | `ColorValue` | No | — | The highlight color of the text. |
680
+ | `style` | `StyleProp<TextStyle>` | No | — | @see https://reactnative.dev/docs/text#style |
681
+ | `suppressHighlighting` | `boolean` | No | — | When `true`, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press... |
682
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
683
+ | `textBreakStrategy` | `"balanced" | "highQuality" | "simple"` | No | — | Set text break strategy on Android API Level 23+ default is `highQuality`. |
684
+
685
+ #### Select.Item
686
+
687
+ | Prop | Type | Required | Default | Description |
688
+ |------|------|----------|---------|-------------|
689
+ | `label` | `string` | Yes | — | The option's label — rendered as the row text and used as the value label. |
690
+ | `value` | `string` | Yes | — | The option's value. |
691
+ | `closeOnPress` | `boolean` | No | — | Close the dropdown when this option is pressed (default behaviour). |
692
+ | `disabled` | `boolean` | No | — | Disables selection and greys the label. |
693
+ | `indicator` | `ReactNode` | No | — | Overrides the default checkmark marker shown on the selected row. |
694
+ | `prefix` | `ReactNode` | No | — | Leading content, before the label — typically a `Select.ItemPrefix`. |
695
+ | `suffix` | `ReactNode` | No | — | Trailing content, after the label — typically a `Select.ItemSuffix`. |
696
+
697
+ #### Select.Label
698
+
699
+ | Prop | Type | Required | Default | Description |
700
+ |------|------|----------|---------|-------------|
701
+ | `children` | `ReactNode` | No | — | The label content. Its placement (above the trigger vs. inside it) is set by the `labelPlacement` prop on `Select.Roo... |
702
+
703
+ #### Select.Root
704
+
705
+ | Prop | Type | Required | Default | Description |
706
+ |------|------|----------|---------|-------------|
707
+ | `accessibilityActions` | `readonly Readonly<{ name: string; label?: string; }>[]` | No | — | Provides an array of custom actions available for accessibility. |
708
+ | `accessibilityElementsHidden` | `boolean` | No | — | A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden ... |
709
+ | `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
710
+ | `accessibilityIgnoresInvertColors` | `boolean` | No | — | https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios @platform ios |
711
+ | `accessibilityLabel` | `string` | No | — | Explicit accessible name for the trigger. Auto-derived from a string `Select.Label`; supply this when the label conte... |
712
+ | `accessibilityLabelledBy` | `string | string[]` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
713
+ | `accessibilityLanguage` | `string` | No | — | By using the accessibilityLanguage property, the screen reader will understand which language to use while reading th... |
714
+ | `accessibilityLargeContentTitle` | `string` | No | — | When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. h... |
715
+ | `accessibilityLiveRegion` | `"assertive" | "none" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
716
+ | `accessibilityRespondsToUserInteraction` | `boolean` | No | — | Blocks the user from interacting with the component through keyboard while still allowing screen reader to interact w... |
717
+ | `accessibilityRole` | `AccessibilityRole` | No | — | Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is fo... |
718
+ | `accessibilityShowsLargeContentViewer` | `boolean` | No | — | A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ ht... |
719
+ | `accessibilityState` | `AccessibilityState` | No | — | Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element curr... |
720
+ | `accessibilityValue` | `AccessibilityValue` | No | — | Represents the current value of a component. It can be a textual description of a component's value, or for range-bas... |
721
+ | `accessibilityViewIsModal` | `boolean` | No | — | A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receive... |
722
+ | `accessible` | `boolean` | No | — | When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. |
723
+ | `aria-busy` | `boolean` | No | — | alias for accessibilityState see https://reactnative.dev/docs/accessibility#accessibilitystate |
724
+ | `aria-checked` | `"mixed" | boolean` | No | — | |
725
+ | `aria-disabled` | `boolean` | No | — | |
726
+ | `aria-expanded` | `boolean` | No | — | |
727
+ | `aria-hidden` | `boolean` | No | — | A value indicating whether the accessibility elements contained within this accessibility element are hidden. |
728
+ | `aria-label` | `string` | No | — | Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel https://github.com/facebook/react-... |
729
+ | `aria-labelledby` | `string` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
730
+ | `aria-live` | `"assertive" | "off" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
731
+ | `aria-modal` | `boolean` | No | — | |
732
+ | `aria-selected` | `boolean` | No | — | |
733
+ | `aria-valuemax` | `number` | No | — | |
734
+ | `aria-valuemin` | `number` | No | — | |
735
+ | `aria-valuenow` | `number` | No | — | |
736
+ | `aria-valuetext` | `string` | No | — | |
737
+ | `asChild` | `boolean` | No | — | |
738
+ | `collapsable` | `boolean` | No | — | Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from ... |
739
+ | `collapsableChildren` | `boolean` | No | — | Setting to false prevents direct children of the view from being removed from the native view hierarchy, similar to t... |
740
+ | `defaultValue` | `{ value: string; label: string; }` | No | — | |
741
+ | `description` | `ReactNode` | No | — | Supporting text rendered below the trigger. A string renders as neutral `HelperText`; a `ReactNode` renders verbatim.... |
742
+ | `dir` | `"ltr" | "rtl"` | No | — | Platform: WEB ONLY |
743
+ | `disabled` | `boolean` | No | — | |
744
+ | `error` | `ReactNode` | No | — | Error message rendered below the trigger as critical `HelperText` (string) or verbatim (`ReactNode`). Takes priority ... |
745
+ | `focusable` | `boolean` | No | — | Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. |
746
+ | `hasTVPreferredFocus` | `boolean` | No | — | *(Apple TV only)* May be set to true to force the Apple TV focus engine to move focus to this view. @platform ios @de... |
747
+ | `hitSlop` | `Insets | number` | No | — | This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets... |
748
+ | `id` | `string` | No | — | Used to reference react managed views from native code. |
749
+ | `importantForAccessibility` | `"auto" | "no" | "no-hide-descendants" | "yes"` | No | — | [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. |
750
+ | `invalid` | `boolean` | No | — | Applies the critical trigger styling without rendering an error message. |
751
+ | `isTVSelectable` | `boolean` | No | — | *(Apple TV only)* When set to true, this view will be focusable and navigable using the Apple TV remote. @platform ios |
752
+ | `labelPlacement` | `"above" | "inside"` | No | `inside` | Where the field label renders: `"inside"` the trigger (small, above the value) or `"above"` it. DS-owned default (`"i... |
753
+ | `name` | `string` | No | — | Platform: WEB ONLY |
754
+ | `nativeID` | `string` | No | — | Used to reference react managed views from native code. |
755
+ | `needsOffscreenAlphaCompositing` | `boolean` | No | — | Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors a... |
756
+ | `onAccessibilityAction` | `(event: AccessibilityActionEvent) => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom... |
757
+ | `onAccessibilityEscape` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with t... |
758
+ | `onAccessibilityTap` | `() => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gestu... |
759
+ | `onBlur` | `(e: BlurEvent) => void` | No | — | Callback that is called when the view is blurred. Note: This will only be called if the view is focusable. |
760
+ | `onFocus` | `(e: FocusEvent) => void` | No | — | Callback that is called when the view is focused. Note: This will only be called if the view is focusable. |
761
+ | `onLayout` | `(event: LayoutChangeEvent) => void` | No | — | Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}. |
762
+ | `onMagicTap` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the magic tap gesture. @platform... |
763
+ | `onMoveShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsive... |
764
+ | `onMoveShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
765
+ | `onOpenChange` | `(open: boolean) => void` | No | — | |
766
+ | `onPointerCancel` | `(event: PointerEvent) => void` | No | — | |
767
+ | `onPointerCancelCapture` | `(event: PointerEvent) => void` | No | — | |
768
+ | `onPointerDown` | `(event: PointerEvent) => void` | No | — | |
769
+ | `onPointerDownCapture` | `(event: PointerEvent) => void` | No | — | |
770
+ | `onPointerEnter` | `(event: PointerEvent) => void` | No | — | |
771
+ | `onPointerEnterCapture` | `(event: PointerEvent) => void` | No | — | |
772
+ | `onPointerLeave` | `(event: PointerEvent) => void` | No | — | |
773
+ | `onPointerLeaveCapture` | `(event: PointerEvent) => void` | No | — | |
774
+ | `onPointerMove` | `(event: PointerEvent) => void` | No | — | |
775
+ | `onPointerMoveCapture` | `(event: PointerEvent) => void` | No | — | |
776
+ | `onPointerUp` | `(event: PointerEvent) => void` | No | — | |
777
+ | `onPointerUpCapture` | `(event: PointerEvent) => void` | No | — | |
778
+ | `onResponderEnd` | `(event: GestureResponderEvent) => void` | No | — | If the View returns true and attempts to become the responder, one of the following will happen: |
779
+ | `onResponderGrant` | `(event: GestureResponderEvent) => void` | No | — | The View is now responding for touch events. This is the time to highlight and show the user what is happening |
780
+ | `onResponderMove` | `(event: GestureResponderEvent) => void` | No | — | The user is moving their finger |
781
+ | `onResponderReject` | `(event: GestureResponderEvent) => void` | No | — | Something else is the responder right now and will not release it |
782
+ | `onResponderRelease` | `(event: GestureResponderEvent) => void` | No | — | Fired at the end of the touch, ie "touchUp" |
783
+ | `onResponderStart` | `(event: GestureResponderEvent) => void` | No | — | |
784
+ | `onResponderTerminate` | `(event: GestureResponderEvent) => void` | No | — | The responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationReque... |
785
+ | `onResponderTerminationRequest` | `(event: GestureResponderEvent) => boolean` | No | — | Something else wants to become responder. Should this view release the responder? Returning true allows release |
786
+ | `onStartShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Does this view want to become responder on the start of a touch? |
787
+ | `onStartShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
788
+ | `onTouchCancel` | `(event: GestureResponderEvent) => void` | No | — | |
789
+ | `onTouchEnd` | `(event: GestureResponderEvent) => void` | No | — | |
790
+ | `onTouchEndCapture` | `(event: GestureResponderEvent) => void` | No | — | |
791
+ | `onTouchMove` | `(event: GestureResponderEvent) => void` | No | — | |
792
+ | `onTouchStart` | `(event: GestureResponderEvent) => void` | No | — | |
793
+ | `onValueChange` | `(option: { value: string; label: string; }) => void` | No | — | |
794
+ | `pointerEvents` | `"auto" | "box-none" | "box-only" | "none"` | No | — | In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class:... |
795
+ | `readOnly` | `boolean` | No | — | Renders the trigger as non-interactive read-only presentation (subtle surface, no chevron, value as text). `disabled`... |
796
+ | `removeClippedSubviews` | `boolean` | No | — | This is a special performance property exposed by RCTView and is useful for scrolling content when there are many sub... |
797
+ | `renderToHardwareTextureAndroid` | `boolean` | No | — | Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Andro... |
798
+ | `required` | `boolean` | No | — | Platform: WEB ONLY |
799
+ | `role` | `Role` | No | — | Indicates to accessibility services to treat UI component like a specific role. |
800
+ | `screenReaderFocusable` | `boolean` | No | — | Enables the view to be screen reader focusable, not keyboard focusable. @platform android |
801
+ | `shouldRasterizeIOS` | `boolean` | No | — | Whether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and inter... |
802
+ | `status` | `"critical" | "neutral"` | No | — | `critical` applies the critical trigger styling. Defaults to `neutral`. |
803
+ | `style` | `StyleProp<ViewStyle>` | No | — | |
804
+ | `tabIndex` | `-1 | 0` | No | — | Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware ke... |
805
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
806
+ | `tvParallaxMagnification` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
807
+ | `tvParallaxShiftDistanceX` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
808
+ | `tvParallaxShiftDistanceY` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
809
+ | `tvParallaxTiltAngle` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
810
+ | `value` | `{ value: string; label: string; }` | No | — | |
811
+
812
+ #### Select.Separator
813
+
814
+ | Prop | Type | Required | Default | Description |
815
+ |------|------|----------|---------|-------------|
816
+ | `accessibilityActions` | `readonly Readonly<{ name: string; label?: string; }>[]` | No | — | Provides an array of custom actions available for accessibility. |
817
+ | `accessibilityElementsHidden` | `boolean` | No | — | A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden ... |
818
+ | `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
819
+ | `accessibilityIgnoresInvertColors` | `boolean` | No | — | https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios @platform ios |
820
+ | `accessibilityLabel` | `string` | No | — | Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label i... |
821
+ | `accessibilityLabelledBy` | `string | string[]` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
822
+ | `accessibilityLanguage` | `string` | No | — | By using the accessibilityLanguage property, the screen reader will understand which language to use while reading th... |
823
+ | `accessibilityLargeContentTitle` | `string` | No | — | When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. h... |
824
+ | `accessibilityLiveRegion` | `"assertive" | "none" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
825
+ | `accessibilityRespondsToUserInteraction` | `boolean` | No | — | Blocks the user from interacting with the component through keyboard while still allowing screen reader to interact w... |
826
+ | `accessibilityRole` | `AccessibilityRole` | No | — | Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is fo... |
827
+ | `accessibilityShowsLargeContentViewer` | `boolean` | No | — | A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ ht... |
828
+ | `accessibilityState` | `AccessibilityState` | No | — | Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element curr... |
829
+ | `accessibilityValue` | `AccessibilityValue` | No | — | Represents the current value of a component. It can be a textual description of a component's value, or for range-bas... |
830
+ | `accessibilityViewIsModal` | `boolean` | No | — | A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receive... |
831
+ | `accessible` | `boolean` | No | — | When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. |
832
+ | `aria-busy` | `boolean` | No | — | alias for accessibilityState see https://reactnative.dev/docs/accessibility#accessibilitystate |
833
+ | `aria-checked` | `"mixed" | boolean` | No | — | |
834
+ | `aria-disabled` | `boolean` | No | — | |
835
+ | `aria-expanded` | `boolean` | No | — | |
836
+ | `aria-hidden` | `boolean` | No | — | A value indicating whether the accessibility elements contained within this accessibility element are hidden. |
837
+ | `aria-label` | `string` | No | — | Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel https://github.com/facebook/react-... |
838
+ | `aria-labelledby` | `string` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
839
+ | `aria-live` | `"assertive" | "off" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
840
+ | `aria-modal` | `boolean` | No | — | |
841
+ | `aria-selected` | `boolean` | No | — | |
842
+ | `aria-valuemax` | `number` | No | — | |
843
+ | `aria-valuemin` | `number` | No | — | |
844
+ | `aria-valuenow` | `number` | No | — | |
845
+ | `aria-valuetext` | `string` | No | — | |
846
+ | `asChild` | `boolean` | No | — | |
847
+ | `collapsable` | `boolean` | No | — | Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from ... |
848
+ | `collapsableChildren` | `boolean` | No | — | Setting to false prevents direct children of the view from being removed from the native view hierarchy, similar to t... |
849
+ | `decorative` | `boolean` | No | — | |
850
+ | `focusable` | `boolean` | No | — | Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. |
851
+ | `hasTVPreferredFocus` | `boolean` | No | — | *(Apple TV only)* May be set to true to force the Apple TV focus engine to move focus to this view. @platform ios @de... |
852
+ | `hitSlop` | `Insets | number` | No | — | This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets... |
853
+ | `id` | `string` | No | — | Used to reference react managed views from native code. |
854
+ | `importantForAccessibility` | `"auto" | "no" | "no-hide-descendants" | "yes"` | No | — | [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. |
855
+ | `isTVSelectable` | `boolean` | No | — | *(Apple TV only)* When set to true, this view will be focusable and navigable using the Apple TV remote. @platform ios |
856
+ | `nativeID` | `string` | No | — | Used to reference react managed views from native code. |
857
+ | `needsOffscreenAlphaCompositing` | `boolean` | No | — | Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors a... |
858
+ | `onAccessibilityAction` | `(event: AccessibilityActionEvent) => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom... |
859
+ | `onAccessibilityEscape` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with t... |
860
+ | `onAccessibilityTap` | `() => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gestu... |
861
+ | `onBlur` | `(e: BlurEvent) => void` | No | — | Callback that is called when the view is blurred. Note: This will only be called if the view is focusable. |
862
+ | `onFocus` | `(e: FocusEvent) => void` | No | — | Callback that is called when the view is focused. Note: This will only be called if the view is focusable. |
863
+ | `onLayout` | `(event: LayoutChangeEvent) => void` | No | — | Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}. |
864
+ | `onMagicTap` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the magic tap gesture. @platform... |
865
+ | `onMoveShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsive... |
866
+ | `onMoveShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
867
+ | `onPointerCancel` | `(event: PointerEvent) => void` | No | — | |
868
+ | `onPointerCancelCapture` | `(event: PointerEvent) => void` | No | — | |
869
+ | `onPointerDown` | `(event: PointerEvent) => void` | No | — | |
870
+ | `onPointerDownCapture` | `(event: PointerEvent) => void` | No | — | |
871
+ | `onPointerEnter` | `(event: PointerEvent) => void` | No | — | |
872
+ | `onPointerEnterCapture` | `(event: PointerEvent) => void` | No | — | |
873
+ | `onPointerLeave` | `(event: PointerEvent) => void` | No | — | |
874
+ | `onPointerLeaveCapture` | `(event: PointerEvent) => void` | No | — | |
875
+ | `onPointerMove` | `(event: PointerEvent) => void` | No | — | |
876
+ | `onPointerMoveCapture` | `(event: PointerEvent) => void` | No | — | |
877
+ | `onPointerUp` | `(event: PointerEvent) => void` | No | — | |
878
+ | `onPointerUpCapture` | `(event: PointerEvent) => void` | No | — | |
879
+ | `onResponderEnd` | `(event: GestureResponderEvent) => void` | No | — | If the View returns true and attempts to become the responder, one of the following will happen: |
880
+ | `onResponderGrant` | `(event: GestureResponderEvent) => void` | No | — | The View is now responding for touch events. This is the time to highlight and show the user what is happening |
881
+ | `onResponderMove` | `(event: GestureResponderEvent) => void` | No | — | The user is moving their finger |
882
+ | `onResponderReject` | `(event: GestureResponderEvent) => void` | No | — | Something else is the responder right now and will not release it |
883
+ | `onResponderRelease` | `(event: GestureResponderEvent) => void` | No | — | Fired at the end of the touch, ie "touchUp" |
884
+ | `onResponderStart` | `(event: GestureResponderEvent) => void` | No | — | |
885
+ | `onResponderTerminate` | `(event: GestureResponderEvent) => void` | No | — | The responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationReque... |
886
+ | `onResponderTerminationRequest` | `(event: GestureResponderEvent) => boolean` | No | — | Something else wants to become responder. Should this view release the responder? Returning true allows release |
887
+ | `onStartShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Does this view want to become responder on the start of a touch? |
888
+ | `onStartShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
889
+ | `onTouchCancel` | `(event: GestureResponderEvent) => void` | No | — | |
890
+ | `onTouchEnd` | `(event: GestureResponderEvent) => void` | No | — | |
891
+ | `onTouchEndCapture` | `(event: GestureResponderEvent) => void` | No | — | |
892
+ | `onTouchMove` | `(event: GestureResponderEvent) => void` | No | — | |
893
+ | `onTouchStart` | `(event: GestureResponderEvent) => void` | No | — | |
894
+ | `pointerEvents` | `"auto" | "box-none" | "box-only" | "none"` | No | — | In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class:... |
895
+ | `ref` | `Ref<View>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
896
+ | `removeClippedSubviews` | `boolean` | No | — | This is a special performance property exposed by RCTView and is useful for scrolling content when there are many sub... |
897
+ | `renderToHardwareTextureAndroid` | `boolean` | No | — | Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Andro... |
898
+ | `role` | `Role` | No | — | Indicates to accessibility services to treat UI component like a specific role. |
899
+ | `screenReaderFocusable` | `boolean` | No | — | Enables the view to be screen reader focusable, not keyboard focusable. @platform android |
900
+ | `shouldRasterizeIOS` | `boolean` | No | — | Whether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and inter... |
901
+ | `style` | `StyleProp<ViewStyle>` | No | — | |
902
+ | `tabIndex` | `-1 | 0` | No | — | Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware ke... |
903
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
904
+ | `tvParallaxMagnification` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
905
+ | `tvParallaxShiftDistanceX` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
906
+ | `tvParallaxShiftDistanceY` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
907
+ | `tvParallaxTiltAngle` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
908
+
909
+ #### Select.Trigger
910
+
911
+ | Prop | Type | Required | Default | Description |
912
+ |------|------|----------|---------|-------------|
913
+ | `children` | `ReactNode` | No | — | Trigger content — typically `Select.Value` (and optionally a label part). |
914
+ | `ref` | `Ref<TriggerRef>` | No | — | Imperative handle exposing `open()` / `close()`. Stays `null` when the field is `readOnly` (no interactive trigger is... |
915
+ | `testID` | `string` | No | — | Used verbatim to locate the trigger in end-to-end tests. Defaults to `ATL-Select-Trigger`. |
916
+
917
+ #### Select.Value
918
+
919
+ | Prop | Type | Required | Default | Description |
920
+ |------|------|----------|---------|-------------|
921
+ | `placeholder` | `string` | Yes | — | |
922
+ | `accessibilityActions` | `readonly Readonly<{ name: string; label?: string; }>[]` | No | — | Provides an array of custom actions available for accessibility. |
923
+ | `accessibilityElementsHidden` | `boolean` | No | — | A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden ... |
924
+ | `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
925
+ | `accessibilityIgnoresInvertColors` | `boolean` | No | — | https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios @platform ios |
926
+ | `accessibilityLabel` | `string` | No | — | Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label i... |
927
+ | `accessibilityLabelledBy` | `string | string[]` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
928
+ | `accessibilityLanguage` | `string` | No | — | By using the accessibilityLanguage property, the screen reader will understand which language to use while reading th... |
929
+ | `accessibilityLargeContentTitle` | `string` | No | — | When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. h... |
930
+ | `accessibilityLiveRegion` | `"assertive" | "none" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
931
+ | `accessibilityRespondsToUserInteraction` | `boolean` | No | — | Blocks the user from interacting with the component through keyboard while still allowing screen reader to interact w... |
932
+ | `accessibilityRole` | `AccessibilityRole` | No | — | Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is fo... |
933
+ | `accessibilityShowsLargeContentViewer` | `boolean` | No | — | A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ ht... |
934
+ | `accessibilityState` | `AccessibilityState` | No | — | Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element curr... |
935
+ | `accessibilityValue` | `AccessibilityValue` | No | — | Represents the current value of a component. It can be a textual description of a component's value, or for range-bas... |
936
+ | `accessibilityViewIsModal` | `boolean` | No | — | A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receive... |
937
+ | `accessible` | `boolean` | No | — | When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. |
938
+ | `adjustsFontSizeToFit` | `boolean` | No | — | Specifies whether font should be scaled down automatically to fit given style constraints. |
939
+ | `allowFontScaling` | `boolean` | No | — | Specifies whether fonts should scale to respect Text Size accessibility settings. The default is `true`. |
940
+ | `android_hyphenationFrequency` | `"full" | "none" | "normal"` | No | — | Hyphenation strategy |
941
+ | `aria-busy` | `boolean` | No | — | alias for accessibilityState see https://reactnative.dev/docs/accessibility#accessibilitystate |
942
+ | `aria-checked` | `"mixed" | boolean` | No | — | |
943
+ | `aria-disabled` | `boolean` | No | — | |
944
+ | `aria-expanded` | `boolean` | No | — | |
945
+ | `aria-hidden` | `boolean` | No | — | A value indicating whether the accessibility elements contained within this accessibility element are hidden. |
946
+ | `aria-label` | `string` | No | — | Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel https://github.com/facebook/react-... |
947
+ | `aria-labelledby` | `string` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
948
+ | `aria-live` | `"assertive" | "off" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
949
+ | `aria-modal` | `boolean` | No | — | |
950
+ | `aria-selected` | `boolean` | No | — | |
951
+ | `aria-valuemax` | `number` | No | — | |
952
+ | `aria-valuemin` | `number` | No | — | |
953
+ | `aria-valuenow` | `number` | No | — | |
954
+ | `aria-valuetext` | `string` | No | — | |
955
+ | `asChild` | `boolean` | No | — | |
956
+ | `dataDetectorType` | `"all" | "email" | "link" | "none" | "phoneNumber"` | No | — | Determines the types of data converted to clickable URLs in the text element. By default no data types are detected. |
957
+ | `disabled` | `boolean` | No | — | Specifies the disabled state of the text view for testing purposes. |
958
+ | `dynamicTypeRamp` | `"body" | "callout" | "caption1" | "caption2" | "footnote" | "headline" | "largeTitle" | "subheadline" | "title1" | "title2" | "title3"` | No | — | The Dynamic Type scale ramp to apply to this element on iOS. |
959
+ | `ellipsizeMode` | `"clip" | "head" | "middle" | "tail"` | No | — | This can be one of the following values: - `head` - The line is displayed so that the end fits in the container and ... |
960
+ | `id` | `string` | No | — | Used to reference react managed views from native code. |
961
+ | `importantForAccessibility` | `"auto" | "no" | "no-hide-descendants" | "yes"` | No | — | [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. |
962
+ | `lineBreakMode` | `"clip" | "head" | "middle" | "tail"` | No | — | Line Break mode. Works only with numberOfLines. clip is working only for iOS |
963
+ | `lineBreakStrategyIOS` | `"hangul-word" | "none" | "push-out" | "standard"` | No | — | Set line break strategy on iOS. |
964
+ | `maxFontSizeMultiplier` | `number` | No | — | Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values: - null/undefined... |
965
+ | `minimumFontScale` | `number` | No | — | Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). |
966
+ | `nativeID` | `string` | No | — | Used to reference react managed views from native code. |
967
+ | `numberOfLines` | `number` | No | — | Used to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the to... |
968
+ | `onAccessibilityAction` | `(event: AccessibilityActionEvent) => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom... |
969
+ | `onAccessibilityEscape` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with t... |
970
+ | `onAccessibilityTap` | `() => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gestu... |
971
+ | `onLayout` | `(event: LayoutChangeEvent) => void` | No | — | Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}. |
972
+ | `onLongPress` | `(event: GestureResponderEvent) => void` | No | — | This function is called on long press. e.g., `onLongPress={this.increaseSize}>` |
973
+ | `onMagicTap` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the magic tap gesture. @platform... |
974
+ | `onPress` | `(event: GestureResponderEvent) => void` | No | — | This function is called on press. Text intrinsically supports press handling with a default highlight state (which ca... |
975
+ | `onPressIn` | `(event: GestureResponderEvent) => void` | No | — | |
976
+ | `onPressOut` | `(event: GestureResponderEvent) => void` | No | — | |
977
+ | `onTextLayout` | `(event: TextLayoutEvent) => void` | No | — | Invoked on Text layout |
978
+ | `pointerEvents` | `"auto" | "box-none" | "box-only" | "none"` | No | — | Controls how touch events are handled. Similar to `View`'s `pointerEvents`. |
979
+ | `pressRetentionOffset` | `{ top: number; left: number; bottom: number; right: number; }` | No | — | Defines how far your touch may move off of the button, before deactivating the button. |
980
+ | `role` | `Role` | No | — | Indicates to accessibility services to treat UI component like a specific role. |
981
+ | `screenReaderFocusable` | `boolean` | No | — | Enables the view to be screen reader focusable, not keyboard focusable. @platform android |
982
+ | `selectable` | `boolean` | No | — | Lets the user select text, to use the native copy and paste functionality. |
983
+ | `selectionColor` | `ColorValue` | No | — | The highlight color of the text. |
984
+ | `style` | `StyleProp<TextStyle>` | No | — | @see https://reactnative.dev/docs/text#style |
985
+ | `suppressHighlighting` | `boolean` | No | — | When `true`, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press... |
986
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
987
+ | `textBreakStrategy` | `"balanced" | "highQuality" | "simple"` | No | — | Set text break strategy on Android API Level 23+ default is `highQuality`. |