@coinbase/cds-mcp-server 8.53.0 → 8.54.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 (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mcp-docs/mobile/components/Alert.txt +1 -1
  3. package/mcp-docs/mobile/components/Calendar.txt +518 -0
  4. package/mcp-docs/mobile/components/DateInput.txt +1 -0
  5. package/mcp-docs/mobile/components/DatePicker.txt +156 -28
  6. package/mcp-docs/mobile/components/HeroSquare.txt +1 -1
  7. package/mcp-docs/mobile/components/IconButton.txt +2 -0
  8. package/mcp-docs/mobile/components/InputChip.txt +75 -9
  9. package/mcp-docs/mobile/components/MediaChip.txt +49 -26
  10. package/mcp-docs/mobile/components/NudgeCard.txt +1 -1
  11. package/mcp-docs/mobile/components/Pictogram.txt +1 -1
  12. package/mcp-docs/mobile/components/SelectChip.txt +1 -0
  13. package/mcp-docs/mobile/components/SpotIcon.txt +1 -1
  14. package/mcp-docs/mobile/components/SpotRectangle.txt +1 -1
  15. package/mcp-docs/mobile/components/SpotSquare.txt +1 -1
  16. package/mcp-docs/mobile/components/Tooltip.txt +51 -12
  17. package/mcp-docs/mobile/components/Tray.txt +1 -0
  18. package/mcp-docs/mobile/guides/v8-migration-guide.txt +1762 -0
  19. package/mcp-docs/mobile/routes.txt +7 -2
  20. package/mcp-docs/web/components/Alert.txt +1 -1
  21. package/mcp-docs/web/components/Calendar.txt +132 -4
  22. package/mcp-docs/web/components/DatePicker.txt +28 -26
  23. package/mcp-docs/web/components/FullscreenAlert.txt +1 -1
  24. package/mcp-docs/web/components/HeroSquare.txt +1 -1
  25. package/mcp-docs/web/components/InputChip.txt +75 -9
  26. package/mcp-docs/web/components/MediaChip.txt +49 -26
  27. package/mcp-docs/web/components/ModalFooter.txt +2 -2
  28. package/mcp-docs/web/components/NudgeCard.txt +1 -1
  29. package/mcp-docs/web/components/Pictogram.txt +1 -1
  30. package/mcp-docs/web/components/SpotIcon.txt +1 -1
  31. package/mcp-docs/web/components/SpotRectangle.txt +1 -1
  32. package/mcp-docs/web/components/SpotSquare.txt +1 -1
  33. package/mcp-docs/web/components/TileButton.txt +1 -1
  34. package/mcp-docs/web/components/Tray.txt +1 -0
  35. package/mcp-docs/web/guides/v8-migration-guide.txt +1762 -0
  36. package/mcp-docs/web/routes.txt +5 -1
  37. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  # DatePicker
2
2
 
3
- Date Picker allows our global users to input past, present, future and important dates into our interface in a simple and intuitive manner. Date Picker offers both manual and calendar entry options - accommodating both internationalization and accessibility needs while being adaptable across screen platforms.
3
+ Date Picker allows our global users to input past, present, future and important dates into our interface in a simple and intuitive manner. Date Picker offers both manual and calendar entry options - accommodating both internationalization and accessibility needs.
4
4
 
5
5
  ## Import
6
6
 
@@ -159,12 +159,16 @@ function Example() {
159
159
  error={error}
160
160
  onChangeDate={setDate}
161
161
  onErrorDate={setError}
162
- disabledDates={[new Date()]}
163
162
  label="Birthdate"
164
- calendarIconButtonAccessibilityLabel="Birthdate calendar"
165
- nextArrowAccessibilityLabel="Next month"
166
- previousArrowAccessibilityLabel="Previous month"
167
- helperTextErrorIconAccessibilityLabel="Error"
163
+ accessibilityLabel="Birthdate"
164
+ accessibilityHint="Enter date or select from calendar using the calendar button."
165
+ openCalendarAccessibilityLabel="Open calendar to select birthdate"
166
+ closeCalendarAccessibilityLabel="Close calendar without selecting a date"
167
+ confirmText="Confirm birthdate selection"
168
+ confirmButtonAccessibilityHint="Confirms the selected birthdate"
169
+ nextArrowAccessibilityLabel="Go to next month"
170
+ previousArrowAccessibilityLabel="Go to previous month"
171
+ highlightedDateAccessibilityHint="Highlighted"
168
172
  invalidDateError="Please enter a valid date"
169
173
  disabledDateError="Date unavailable"
170
174
  requiredError="This field is required"
@@ -199,7 +203,7 @@ function Example() {
199
203
 
200
204
  ### Styling
201
205
 
202
- DatePicker supports the same styling functionality as [DateInput](/components/other/DateInput/).
206
+ DatePicker supports the same styling functionality as [DateInput](/components/other/DateInput/) and [Calendar](/components/other/Calendar/).
203
207
 
204
208
  #### Compact
205
209
 
@@ -397,7 +401,7 @@ function Example() {
397
401
 
398
402
  Defaults to today when undefined.
399
403
 
400
- On mobile the `seedDate` prop is the default date that the react-native-date-picker keyboard control will open to when there is no selected date value.
404
+ The `seedDate` prop is used to generate the Calendar month when there is no selected date value.
401
405
 
402
406
  ```jsx
403
407
  function Example() {
@@ -422,6 +426,122 @@ function Example() {
422
426
 
423
427
  ### Composed Examples
424
428
 
429
+ Make sure to provide the `requiredError` prop when setting the `required` prop to true. The `requiredError` will be displayed if a user blurs the input, without a date selected, after having typed into it.
430
+
431
+ ```jsx
432
+ function Example() {
433
+ const [date, setDate] = useState(null);
434
+ const [error, setError] = useState(null);
435
+
436
+ return (
437
+ <DatePicker
438
+ required
439
+ date={date}
440
+ error={error}
441
+ onChangeDate={setDate}
442
+ onErrorDate={setError}
443
+ label="Birthdate"
444
+ invalidDateError="Please enter a valid date"
445
+ requiredError="This field is required"
446
+ />
447
+ );
448
+ }
449
+ ```
450
+
451
+ #### Highlighted dates
452
+
453
+ The `highlightedDates` prop is an array of Dates and Date tuples for date ranges. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges.
454
+
455
+ ```jsx
456
+ function Example() {
457
+ const [date, setDate] = useState(null);
458
+ const [error, setError] = useState(null);
459
+
460
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
461
+ const oneWeekAgo = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 7);
462
+ const twoDaysAgo = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 2);
463
+ const oneWeekLater = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 7);
464
+
465
+ const highlightedDates = [[oneWeekAgo, twoDaysAgo], oneWeekLater];
466
+
467
+ return (
468
+ <DatePicker
469
+ date={date}
470
+ error={error}
471
+ onChangeDate={setDate}
472
+ onErrorDate={setError}
473
+ highlightedDates={highlightedDates}
474
+ label="Select a date"
475
+ invalidDateError="Please enter a valid date"
476
+ />
477
+ );
478
+ }
479
+ ```
480
+
481
+ #### Minimum and maximum dates
482
+
483
+ Make sure to provide the `disabledDateError` prop when providing `minDate`, `maxDate`, or `disabledDates` props. Navigation to dates before the `minDate` and after the `maxDate` is disabled.
484
+
485
+ ```jsx
486
+ function Example() {
487
+ const [date, setDate] = useState(null);
488
+ const [error, setError] = useState(null);
489
+
490
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
491
+ const lastMonth15th = new Date(today.getFullYear(), today.getMonth() - 1, 15);
492
+ const nextMonth15th = new Date(today.getFullYear(), today.getMonth() + 1, 15);
493
+
494
+ return (
495
+ <DatePicker
496
+ date={date}
497
+ error={error}
498
+ onChangeDate={setDate}
499
+ onErrorDate={setError}
500
+ minDate={lastMonth15th}
501
+ maxDate={nextMonth15th}
502
+ label="Birthdate"
503
+ invalidDateError="Please enter a valid date"
504
+ disabledDateError="Date unavailable"
505
+ />
506
+ );
507
+ }
508
+ ```
509
+
510
+ #### Disabled dates
511
+
512
+ The `disabledDates` prop is an array of Dates and Date tuples for date ranges. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges.
513
+
514
+ Make sure to provide the `disabledDateError` prop when providing `minDate`, `maxDate`, or `disabledDates` props.
515
+
516
+ ```jsx
517
+ function Example() {
518
+ const [date, setDate] = useState(null);
519
+ const [error, setError] = useState(null);
520
+
521
+ const today = new Date(new Date().setHours(0, 0, 0, 0));
522
+ const tomorrow = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1);
523
+ const startOfNextWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 7);
524
+ const endOfNextWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 13);
525
+
526
+ return (
527
+ <DatePicker
528
+ date={date}
529
+ error={error}
530
+ onChangeDate={setDate}
531
+ onErrorDate={setError}
532
+ disabledDates={[
533
+ today,
534
+ tomorrow,
535
+ [startOfNextWeek, endOfNextWeek], // Disable entire range
536
+ ]}
537
+ label="Appointment date"
538
+ invalidDateError="Please enter a valid date"
539
+ disabledDateError="This date is not available"
540
+ />
541
+ );
542
+ }
543
+ ```
544
+
425
545
  #### Date range selector
426
546
 
427
547
  This is a complex example using many different props. We use multiple DatePickers together to allow a user to select a date range.
@@ -437,11 +557,8 @@ function Example() {
437
557
 
438
558
  const today = new Date(new Date().setHours(0, 0, 0, 0));
439
559
  const firstDayThisMonth = new Date(today.getFullYear(), today.getMonth(), 1);
440
- const seventhDayThisMonth = new Date(today.getFullYear(), today.getMonth(), 7);
441
560
  const lastDayThisMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0);
442
561
 
443
- const disabledDates = [[firstDayThisMonth, seventhDayThisMonth]];
444
-
445
562
  const updateEndDate = (endDate, startDate) => {
446
563
  setEndDate(endDate);
447
564
  setEndError(null);
@@ -480,12 +597,10 @@ function Example() {
480
597
  };
481
598
 
482
599
  return (
483
- <HStack gap={2}>
600
+ <VStack gap={2}>
484
601
  <DatePicker
485
602
  required
486
603
  date={startDate}
487
- disabledDateError="Date unavailable"
488
- disabledDates={disabledDates}
489
604
  error={startError}
490
605
  highlightedDates={startDate && endDate ? [[startDate, endDate]] : undefined}
491
606
  invalidDateError="Please enter a valid date"
@@ -500,8 +615,7 @@ function Example() {
500
615
  required
501
616
  date={endDate}
502
617
  disabled={!startDate}
503
- disabledDateError="Date unavailable"
504
- disabledDates={startDate ? [...disabledDates, startDate] : disabledDates}
618
+ disabledDates={startDate ? [startDate] : undefined}
505
619
  error={endError}
506
620
  highlightedDates={
507
621
  startDate && endDate && startDate < endDate
@@ -519,18 +633,18 @@ function Example() {
519
633
  requiredError="This field is required"
520
634
  variant={endError ? 'negative' : undefined}
521
635
  />
522
- </HStack>
636
+ </VStack>
523
637
  );
524
638
  }
525
639
  ```
526
640
 
527
641
  ### Event Lifecycle
528
642
 
529
- - Selecting a date with the native picker (mobile) or Calendar (web):
643
+ - Selecting a date with the Calendar:
530
644
 
531
645
  `onOpen -> onConfirm -> onChangeDate -> onErrorDate -> onClose`
532
646
 
533
- - Closing the native picker (mobile) or Calendar (web) without selecting a date:
647
+ - Closing the Calendar without selecting a date:
534
648
 
535
649
  `onOpen -> onCancel -> onClose`
536
650
 
@@ -542,6 +656,10 @@ function Example() {
542
656
 
543
657
  `onChange -> onChangeDate -> onChange -> onChange -> ... -> onChangeDate -> onErrorDate`
544
658
 
659
+ :::note
660
+ The Calendar picker requires pressing the confirm button to select a date.
661
+ :::
662
+
545
663
  ```jsx
546
664
  function Example() {
547
665
  const [date, setDate] = useState(null);
@@ -592,18 +710,22 @@ function Example() {
592
710
  | `blurOnSubmit` | `boolean` | No | `-` | If true, the text field will blur when submitted. The default value is true. |
593
711
  | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `200` | Leverage one of the borderRadius styles we offer to round the corners of the input. |
594
712
  | `bordered` | `boolean` | No | `true` | Determines if the input should have a border |
595
- | `calendarIconButtonAccessibilityLabel` | `string` | No | `'Open calendar' / 'Close calendar'` | Accessibility label describing the calendar IconButton, which opens the calendar when pressed. |
713
+ | `calendarIconButtonAccessibilityLabel` | `string` | No | `-` | Accessibility label describing the calendar IconButton, which opens the calendar when pressed. |
596
714
  | `caretHidden` | `boolean` | No | `-` | If true, caret is hidden. The default value is false. |
597
715
  | `clearButtonMode` | `never \| while-editing \| unless-editing \| always` | No | `-` | enum(never, while-editing, unless-editing, always) When the clear button should appear on the right side of the text view |
598
716
  | `clearTextOnFocus` | `boolean` | No | `-` | If true, clears the text field automatically when editing begins |
717
+ | `closeCalendarAccessibilityLabel` | `string` | No | `'Close calendar without selecting a date'` | Accessibility label for the handle bar that closes the picker. |
599
718
  | `compact` | `boolean` | No | `false` | Enables compact variation |
719
+ | `confirmButtonAccessibilityHint` | `string` | No | `-` | Accessibility hint for the confirm button. |
720
+ | `confirmText` | `string` | No | `'Confirm'` | Text to display on the confirm button. |
600
721
  | `contextMenuHidden` | `boolean` | No | `-` | If true, context menu is hidden. The default value is false. |
601
722
  | `cursorColor` | `ColorValue \| null` | No | `-` | When provided it will set the color of the cursor (or caret) in the component. Unlike the behavior of selectionColor the cursor color will be set independently from the color of the text selection box. |
602
723
  | `dataDetectorTypes` | `DataDetectorTypes \| DataDetectorTypes[]` | No | `-` | Determines the types of data converted to clickable URLs in the text input. Only valid if multiline={true} and editable={false}. By default no data types are detected. You can provide one type or an array of many types. Possible values for dataDetectorTypes are: - phoneNumber - link - address - calendarEvent - none - all |
603
- | `dateInputStyle` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<ViewStyle \| Falsy \| RegisteredStyle<ViewStyle>>` | No | `-` | - |
724
+ | `dateInputStyle` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<ViewStyle \| Falsy \| RegisteredStyle<ViewStyle>>` | No | `-` | Custom style to apply to the DateInput. |
604
725
  | `disableFullscreenUI` | `boolean` | No | `-` | When false, if there is a small amount of space available around a text input (e.g. landscape orientation on a phone), the OS may choose to have the user edit the text inside of a full screen text input mode. When true, this feature is disabled and users will always edit the text directly inside of the text input. Defaults to false. |
605
726
  | `disabled` | `boolean` | No | `false` | Disables user interaction. Toggles input interactability and opacity |
606
- | `disabledDateError` | `string` | No | `'Date unavailable'` | Error text to display when a disabled date is selected with the DateInput, including dates before the minDate or after the maxDate. |
727
+ | `disabledDateError` | `string` | No | `'Date unavailable'` | Tooltip content shown when hovering or focusing a disabled date, including dates before the minDate or after the maxDate. |
728
+ | `disabledDates` | `(Date \| [Date, Date])[]` | No | `-` | Array of disabled dates, and date tuples for date ranges. Make sure to set disabledDateError as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. |
607
729
  | `editable` | `boolean` | No | `-` | If false, text is not editable. The default value is true. |
608
730
  | `enableColorSurge` | `boolean` | No | `-` | Enable Color Surge motion |
609
731
  | `enablesReturnKeyAutomatically` | `boolean` | No | `-` | If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false. |
@@ -612,6 +734,8 @@ function Example() {
612
734
  | `height` | `string \| number` | No | `-` | Height of input |
613
735
  | `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For cases where label is not enough information to describe what the text input is for. Can also be used for showing positive/negative messages |
614
736
  | `helperTextErrorIconAccessibilityLabel` | `string` | No | `'error'` | Accessibility label for helper text error icon when variant=negative |
737
+ | `highlightedDateAccessibilityHint` | `string` | No | `'Highlighted'` | Accessibility hint announced for highlighted dates. Applied to all highlighted dates. |
738
+ | `highlightedDates` | `(Date \| [Date, Date])[]` | No | `-` | Array of highlighted dates, and date tuples for date ranges. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. |
615
739
  | `importantForAutofill` | `auto \| yes \| no \| noExcludeDescendants \| yesExcludeDescendants` | No | `-` | Determines whether the individual fields in your app should be included in a view structure for autofill purposes on Android API Level 26+. Defaults to auto. To disable auto complete, use off. *Android Only* The following values work on Android only: - auto - let Android decide - no - not important for autofill - noExcludeDescendants - this view and its children arent important for autofill - yes - is important for autofill - yesExcludeDescendants - this view is important for autofill but its children arent |
616
740
  | `inlineImageLeft` | `string` | No | `-` | If defined, the provided image resource will be rendered on the left. |
617
741
  | `inlineImagePadding` | `number` | No | `-` | Padding between the inline image, if any, and the text input itself. |
@@ -632,18 +756,19 @@ function Example() {
632
756
  | `minDate` | `Date` | No | `-` | Minimum date allowed to be selected, inclusive. Dates before the minDate are disabled. All navigation to months before the minDate is disabled. |
633
757
  | `minHeight` | `string \| number` | No | `auto` | minimum height of input |
634
758
  | `multiline` | `boolean` | No | `-` | If true, the text input can be multiple lines. The default value is false. |
759
+ | `nextArrowAccessibilityLabel` | `string` | No | `'Go to next month'` | Accessibility label describing the Calendar next month arrow. |
635
760
  | `numberOfLines` | `number` | No | `-` | Sets the number of lines for a TextInput. Use it with multiline set to true to be able to fill the lines. |
636
761
  | `onBlur` | `((e: NativeSyntheticEvent<TextInputFocusEventData>) => void)` | No | `-` | Callback that is called when the text input is blurred |
637
- | `onCancel` | `(() => void)` | No | `-` | Callback function fired when the user closes the react-native-date-picker keyboard control without selecting a date. Interacting with the DateInput does not fire this callback. Will always be called before onClose. |
638
- | `onChange` | `(((event: NativeSyntheticEvent<TextInputChangeEventData>) => void) & ((e: NativeSyntheticEvent<TextInputChangeEventData>) => void))` | No | `-` | Callback function fired when the DateInput text value changes. Prefer to use onChangeDate instead. Will always be called before onChangeDate. This prop should only be used for edge cases, such as custom error handling. |
762
+ | `onCancel` | `(() => void)` | No | `-` | Callback function fired when the user closes the picker without selecting a date. Interacting with the DateInput does not fire this callback. Will always be called before onClose. |
763
+ | `onChange` | `(((e: NativeSyntheticEvent<TextInputChangeEventData>) => void) & ((event: NativeSyntheticEvent<TextInputChangeEventData>) => void))` | No | `-` | Callback function fired when the DateInput text value changes. Prefer to use onChangeDate instead. Will always be called before onChangeDate. This prop should only be used for edge cases, such as custom error handling. |
639
764
  | `onChangeText` | `((text: string) => void)` | No | `-` | - |
640
- | `onClose` | `(() => void)` | No | `-` | Callback function fired when the react-native-date-picker keyboard control is closed. Will always be called after onCancel, onConfirm, and onChangeDate. |
641
- | `onConfirm` | `(() => void)` | No | `-` | Callback function fired when the user selects a date using the react-native-date-picker keyboard control. Interacting with the DateInput does not fire this callback. Will always be called before onClose. |
765
+ | `onClose` | `(() => void)` | No | `-` | Callback function fired when the picker is closed. Will always be called after onCancel, onConfirm, and onChangeDate. |
766
+ | `onConfirm` | `(() => void)` | No | `-` | Callback function fired when the user selects a date using the picker. Interacting with the DateInput does not fire this callback. Will always be called before onClose. |
642
767
  | `onContentSizeChange` | `((e: NativeSyntheticEvent<TextInputContentSizeChangeEventData>) => void)` | No | `-` | Callback that is called when the text inputs content size changes. This will be called with { nativeEvent: { contentSize: { width, height } } }. Only called for multiline text inputs. |
643
768
  | `onEndEditing` | `((e: NativeSyntheticEvent<TextInputEndEditingEventData>) => void)` | No | `-` | Callback that is called when text input ends. |
644
769
  | `onFocus` | `((e: NativeSyntheticEvent<TextInputFocusEventData>) => void)` | No | `-` | Callback that is called when the text input is focused |
645
770
  | `onKeyPress` | `((e: NativeSyntheticEvent<TextInputKeyPressEventData>) => void)` | No | `-` | Callback that is called when a key is pressed. This will be called with { nativeEvent: { key: keyValue } } where keyValue is Enter or Backspace for respective keys and the typed-in character otherwise including for space. Fires before onChange callbacks. Note: on Android only the inputs from soft keyboard are handled, not the hardware keyboard inputs. |
646
- | `onOpen` | `(() => void)` | No | `-` | Callback function fired when the react-native-date-picker keyboard control is opened. |
771
+ | `onOpen` | `(() => void)` | No | `-` | Callback function fired when the picker is opened. |
647
772
  | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
648
773
  | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
649
774
  | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
@@ -663,9 +788,11 @@ function Example() {
663
788
  | `onSelectionChange` | `((e: NativeSyntheticEvent<TextInputSelectionChangeEventData>) => void)` | No | `-` | Callback that is called when the text input selection is changed. |
664
789
  | `onSubmitEditing` | `((e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => void)` | No | `-` | Callback that is called when the text inputs submit button is pressed. |
665
790
  | `onTextInput` | `((e: NativeSyntheticEvent<TextInputTextInputEventData>) => void)` | No | `-` | Callback that is called on new text input with the argument { nativeEvent: { text, previousText, range: { start, end } } }. This prop requires multiline={true} to be set. |
791
+ | `openCalendarAccessibilityLabel` | `string` | No | `'Open calendar'` | Accessibility label for the calendar IconButton, which opens the calendar when pressed. |
666
792
  | `passwordRules` | `string \| null` | No | `-` | Provide rules for your password. For example, say you want to require a password with at least eight characters consisting of a mix of uppercase and lowercase letters, at least one number, and at most two consecutive characters. required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 8; |
667
793
  | `placeholder` | `string` | No | `-` | Placeholder text displayed inside of the input. Will be replaced if there is a value. The string that will be rendered before text input has been entered |
668
794
  | `placeholderTextColor` | `string \| OpaqueColorValue` | No | `-` | The text color of the placeholder string |
795
+ | `previousArrowAccessibilityLabel` | `string` | No | `'Go to previous month'` | Accessibility label describing the Calendar previous month arrow. |
669
796
  | `readOnly` | `boolean` | No | `-` | If true, text is not editable. The default value is false. |
670
797
  | `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
671
798
  | `rejectResponderTermination` | `boolean \| null` | No | `-` | If true, allows TextInput to pass touch events to the parent component. This allows components to be swipeable from the TextInput on iOS, as is the case on Android by default. If false, TextInput always asks to handle the input (except when disabled). |
@@ -675,7 +802,7 @@ function Example() {
675
802
  | `returnKeyType` | `search \| join \| done \| none \| default \| go \| next \| send \| previous \| google \| route \| yahoo \| emergency-call` | No | `-` | enum(default, go, google, join, next, route, search, send, yahoo, done, emergency-call) Determines how the return key should look. |
676
803
  | `scrollEnabled` | `boolean` | No | `-` | If false, scrolling of the text view will be disabled. The default value is true. Only works with multiline={true} |
677
804
  | `secureTextEntry` | `boolean` | No | `-` | If true, the text input obscures the text entered so that sensitive text like passwords stay secure. The default value is false. |
678
- | `seedDate` | `Date` | No | `-` | Date that the react-native-date-picker keyboard control will open to when there is no value for the date prop, defaults to today. |
805
+ | `seedDate` | `Date` | No | `-` | Date used to generate the Calendar month when there is no value for the selectedDate prop, defaults to today. |
679
806
  | `selectTextOnFocus` | `boolean` | No | `-` | If true, all text will automatically be selected on focus |
680
807
  | `selection` | `{ start: number; end?: number; } \| undefined` | No | `-` | The start and end of the text inputs selection. Set start and end to the same value to position the cursor. |
681
808
  | `selectionColor` | `string \| OpaqueColorValue` | No | `-` | The highlight (and cursor on ios) color of the text input |
@@ -685,6 +812,7 @@ function Example() {
685
812
  | `smartInsertDelete` | `boolean` | No | `-` | If false, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation. The default value is true. |
686
813
  | `spellCheck` | `boolean` | No | `-` | If false, disables spell-check style (i.e. red underlines). The default value is inherited from autoCorrect |
687
814
  | `start` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the start of the inner input. Refer to diagram for location of startNode in InputStack component |
815
+ | `styles` | `{ dateInput?: StyleProp<ViewStyle>; calendar?: StyleProp<ViewStyle>; calendarHeader?: StyleProp<ViewStyle>; calendarTitle?: StyleProp<TextStyle>; calendarNavigation?: StyleProp<ViewStyle>; calendarContent?: StyleProp<ViewStyle>; calendarDay?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for the DateInput and Calendar subcomponents. |
688
816
  | `suffix` | `string` | No | `-` | Adds suffix text to the end of input |
689
817
  | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID Used to locate this view in end-to-end tests |
690
818
  | `testIDMap` | `{ start?: string; end?: string \| undefined; label?: string \| undefined; helperText?: string \| undefined; } \| undefined` | No | `-` | Add ability to test individual parts of the input |
@@ -38,7 +38,7 @@ If `dimension` and `scaleMultiplier` are both provided the component will scale
38
38
 
39
39
  | Prop | Type | Required | Default | Description |
40
40
  | --- | --- | --- | --- | --- |
41
- | `name` | `margin \| success \| pending \| airdrop \| blockchain \| camera \| cloud \| coinbaseOneLogo \| earn \| instantUnstakingClock \| options \| refresh \| rocket \| securityShield \| smartContract \| staking \| test \| baseCreatorCoin \| borrowCoins \| coinbaseOneEarn \| ethStakingRewards \| fiat \| futures \| globalTransactions \| governance \| lightningNetworkSend \| outage \| startToday \| walletWarning \| phoneNumber \| exchange \| accessToAdvancedCharts \| accountUnderReview \| add2Fa \| addBankAccount \| addCreditCard \| addMoreCrypto \| addPhoneNumber \| advancedTrading \| advancedTradingChartsIndicatorsCandles \| advancedTradingUi \| alienDonutSystemError \| anonymous \| appTrackingTransparency \| artFrameEmptyState \| automaticPayments \| backedByUsDollar \| baseChartLarge \| baseCheck \| baseCoinCryptoLarge \| baseCoinNetworkLarge \| baseConnectLarge \| baseCreatorCoinEmpty \| baseDecentralizationLarge \| basedInUsa \| baseEmptyLarge \| baseErrorButterfly \| baseErrorLarge \| baseLoadingLarge \| baseLocationLarge \| baseMintNftLarge \| baseNetworkLarge \| baseNftLarge \| basePaycoinLarge \| basePeopleLarge \| basePiechartLarge \| baseRewardsCalmLarge \| baseSecurityLarge \| baseSendLarge \| baseSocial \| baseTargetLarge \| bigBtc \| bigError \| bigWarning \| bitcoinAndOtherCrypto \| bitcoinGlobe \| borrow \| borrowCoinsBtc \| borrowWallet \| brdGift \| bridge \| browseDecentralizedApps \| browserExtension \| buy \| buyFirstCrypto \| cardAndPhone \| cardBoosted \| cardError \| cardErrorCB1 \| cardReloadFunds \| cashExcitement \| catHoldingWalletEmptyState \| catLostSystemError \| cbada \| cbbtc \| cbdoge \| cbltc \| cbxrp \| chickenFishSystemError \| claimCryptoUsername \| cloudBacking \| coinbaseCard \| coinbaseCardIssue \| coinbaseCardLock \| coinbaseCardPocket \| coinbaseCardSpend \| coinbaseCardSpendCrypto \| coinbaseFees \| coinbaseIsDown \| coinbaseIsDownMobile \| coinbaseOneAirdrop \| coinbaseOneCardWarning \| coinbaseOneDiscountedAmount \| coinbaseOneDocWarning \| coinbaseOneInsufficientWallet \| coinbaseOnePercentOff \| coinbaseOnePhoneLightning \| coinbaseOneProtectedCrypto \| coinbaseOneRewards \| coinbaseOneSavingFunds \| coinbaseOneTokenRewards \| coinbaseOneUSDCBig \| coinbaseOneUSDCIncentives \| coinbaseOneWaitlist \| coinbaseOneWalletWarning \| coinbaseOneWelcome \| coinbaseOneZeroPortal \| coinbaseOneZeroPromotion \| coinbaseRedesigned \| coinbaseWalletToTrade \| coinCheckmark \| coinFifty \| coinsInWallet \| collectableNfts \| collectingNfts \| commerceAccounting \| commerceInvoices \| communication \| completeAQuiz \| congratulationsOnEarningCrypto \| connectPeople \| contactsListWarning \| crossBorderPayments \| cryptoAndMore \| cryptoApps \| cryptoAppsWallet \| cryptoAssets \| cryptoEconomy \| cryptoForBeginners \| cryptoPortfolio \| cryptoWallet \| currencyPairs \| dappsArts \| dappsFinance \| dappsGaming \| dappsGeneral \| dappsL2Support \| dappsMusic \| decentralization \| decentralizedWebWeb3 \| defiDecentralizedBorrowingLending \| defiDecentralizedTradingExchange \| defiEarn \| defiEnrollBoost \| defiHow \| defiRisk \| desktopAuthorized \| desktopUnknown \| developer \| diamondHands \| didDecentralizedIdentity \| digitalCollectibles \| digitalGold \| directDepositPhone \| discardAssets \| docError \| documentCertified \| documentSuccess \| downloadCoinbaseWallet \| earnCryptoCard \| earnCryptoInterest \| earnGlobe \| earnGrowth \| earnIdVerification \| earnInterest \| earnMore \| earnNuxHome \| earnSuccess \| earnToLearn \| emailNotification \| emptyCollection \| emptyStateCheckBackLater \| emptyStateNft404Page \| emptyStateNftSoldOut \| enableBiometrics \| encryptedEverything \| engagement \| ensProfilePic \| error400 \| errorApp500 \| errorMoblie \| errorRefresh \| errorRefreshWeb \| errorWeb \| errorWeb400 \| errorWeb404 \| errorWeb404Mobile \| errorWeb500 \| estimatedAmount \| ethereumToWallet \| ethStakingUpsell \| exchangeEmptyState \| exploreDecentralizedApps \| faceMatchReal \| feeScale \| fileYourCryptoTaxes \| fileYourCryptoTaxesCheck \| focusLimitOrders \| freeBtc \| futuresAndPerps \| futuresExpire \| futuresVsPerps \| gainsAndLosses \| gamer \| gasFeesNetworkFees \| generative \| getStartedInMinutes \| governanceMallet \| graphChartTrading \| hardwareWallets \| hiddenCollection \| holdCrypto \| holdingCrypto \| iceCreamMeltingSystemError \| idAngles \| idBack \| idCard \| idFront \| idIssue \| idVerificationSecure \| indexer \| innovation \| insufficientBalance \| insuranceProtection \| invest \| invite \| japanVerifyId \| keyGeneration \| layeredNetworks \| layerOne \| layerThree \| layerTwo \| ledgerAccess \| ledgerPlugin \| lend \| leverage \| lightningNetwork \| lightningNetworkInvoice \| lightningNetworkTransfer \| limitOrders \| linkingYourWalletToYourCoinbaseAccount \| liquidationBufferGreen \| liquidationBufferRed \| liquidationBufferRedClose \| liquidationBufferYellow \| lowCost \| marginWarning \| mic \| mining \| minting \| moneyDecentralized \| moreGains \| multicoinSupport \| multiPlatformMobileAppBrowserExtension \| multipleAccountsWalletsForOneUser \| multiplePortfolios \| myNameIsSatoshi \| namePortfolio \| networkWarning \| noFees \| noFeesMotion \| noLongAddresses \| notificationsAlt \| notificationsAndUpdates \| offChain \| oilAndGold \| onChain \| onTheList \| openEmail \| optInPushNotificationsEmail \| oracle \| orderBooks \| p2pGifting \| p2pPayments \| paperHands \| payUpFront \| performance \| phoneUnknown \| platform \| polling \| portfolioPerformance \| poweredByEthereum \| powerOfCrypto \| predictionsMarkets \| primeDeFi \| primeEarn \| primeStaking \| private \| privateKey \| processing \| protocol \| public \| quest \| quickAndSimple \| quickBuy \| ratingsAndReviews \| readyToTrade \| realToUSDC \| receivedCard \| receiveGift \| recommendInvest \| recurringReward \| referralsAvatars \| referralsBitcoin \| referralsCoinbaseOne \| referralsGenericCoin \| referralsWalletPhones \| remittances \| requestSent \| restrictedCountry \| retailUSDCRewards \| reviewInfo \| rotatingRewards \| routingAccount \| scalable \| secureAndTrusted \| secureGlobalTransactions \| secureStorage \| selectCorrectCrypto \| selectReward \| selfCustody \| selfCustodyCrypto \| semiCustodial \| sendCryptoFaster \| sendToUsername \| serverCatSystemError \| settlement \| shareOnSocialMedia \| sidechain \| slippageTolerance \| spacedOutSystemError \| squidEmptyState \| stablecoin \| stableValue \| stakingMissedReturns \| stakingMissedReturnsUsdc \| stayInControlSelfHostedWalletsStorage \| stopLimitOrder \| stopLimitOrderDown \| storage \| stressTestedColdStorage \| supportAndMore \| sustainable \| switchAdvancedToSimpleTrading \| taxesDetails \| tools \| tradeGeneral \| tradeHistory \| tradeImmediately \| tradingWithLeverage \| transactionLimit \| trendingHotAssets \| twoIdVerify \| unlockKey \| usdAndUsdc \| usdtToUSDC \| verifyBankTransactions \| verifyCardTransactions \| verifyEmail \| verifyIdDetails \| verifyInfo \| videoRequest \| videoReview \| videoUpload \| vipBadge \| vote \| walletAsset \| walletConfirmation \| walletFlyEmptyState \| walletLoading \| walletNotifications \| walletSecurity \| walletUi \| watchVideos \| web3ActivityError \| web3ActivitySigned \| web3MobileSetupStart \| web3MobileSetupSuccess \| webRAT \| whyNotBoth \| yourContacts` | Yes | `-` | Name of illustration as defined in Figma |
41
+ | `name` | `margin \| success \| pending \| airdrop \| blockchain \| camera \| cloud \| coinbaseOneLogo \| earn \| instantUnstakingClock \| options \| refresh \| rocket \| securityShield \| smartContract \| staking \| test \| baseCreatorCoin \| borrowCoins \| coinbaseOneEarn \| ethStakingRewards \| fiat \| futures \| globalTransactions \| governance \| lightningNetworkSend \| outage \| startToday \| walletWarning \| phoneNumber \| exchange \| accessToAdvancedCharts \| accountUnderReview \| add2Fa \| addBankAccount \| addCreditCard \| addMoreCrypto \| addPhoneNumber \| advancedTrading \| advancedTradingChartsIndicatorsCandles \| advancedTradingUi \| alienDonutSystemError \| anonymous \| appTrackingTransparency \| artFrameEmptyState \| automaticPayments \| backedByUsDollar \| baseChartLarge \| baseCheck \| baseCoinCryptoLarge \| baseCoinNetworkLarge \| baseConnectLarge \| baseCreatorCoinEmpty \| baseDecentralizationLarge \| basedInUsa \| baseEmptyLarge \| baseErrorButterfly \| baseErrorLarge \| baseLoadingLarge \| baseLocationLarge \| baseMintNftLarge \| baseNetworkLarge \| baseNftLarge \| basePaycoinLarge \| basePeopleLarge \| basePiechartLarge \| baseRewardsCalmLarge \| baseSecurityLarge \| baseSendLarge \| baseSocial \| baseTargetLarge \| bigBtc \| bigError \| bigWarning \| bitcoinAndOtherCrypto \| bitcoinGlobe \| borrow \| borrowCoinsBtc \| borrowWallet \| brdGift \| bridge \| browseDecentralizedApps \| browserExtension \| buy \| buyFirstCrypto \| cardAndPhone \| cardBoosted \| cardError \| cardErrorCB1 \| cardReloadFunds \| cashExcitement \| catHoldingWalletEmptyState \| catLostSystemError \| cbada \| cbbtc \| cbdoge \| cbltc \| cbxrp \| chickenFishSystemError \| claimCryptoUsername \| cloudBacking \| coinbaseCard \| coinbaseCardIssue \| coinbaseCardLock \| coinbaseCardPocket \| coinbaseCardSpend \| coinbaseCardSpendCrypto \| coinbaseFees \| coinbaseIsDown \| coinbaseIsDownMobile \| coinbaseOneAirdrop \| coinbaseOneCardWarning \| coinbaseOneDiscountedAmount \| coinbaseOneDocWarning \| coinbaseOneInsufficientWallet \| coinbaseOnePercentOff \| coinbaseOnePhoneLightning \| coinbaseOneProtectedCrypto \| coinbaseOneRewards \| coinbaseOneSavingFunds \| coinbaseOneTokenRewards \| coinbaseOneUSDCBig \| coinbaseOneUSDCIncentives \| coinbaseOneWaitlist \| coinbaseOneWalletWarning \| coinbaseOneWelcome \| coinbaseOneZeroPortal \| coinbaseOneZeroPromotion \| coinbaseRedesigned \| coinbaseWalletToTrade \| coinCheckmark \| coinFifty \| coinsInWallet \| collectableNfts \| collectingNfts \| commerceAccounting \| commerceInvoices \| communication \| completeAQuiz \| congratulationsOnEarningCrypto \| connectPeople \| contactsListWarning \| crossBorderPayments \| cryptoAndMore \| cryptoApps \| cryptoAppsWallet \| cryptoAssets \| cryptoEconomy \| cryptoForBeginners \| cryptoPortfolio \| cryptoPortfolioUsdc \| cryptoWallet \| currencyPairs \| dappsArts \| dappsFinance \| dappsGaming \| dappsGeneral \| dappsL2Support \| dappsMusic \| decentralization \| decentralizedWebWeb3 \| defiDecentralizedBorrowingLending \| defiDecentralizedTradingExchange \| defiEarn \| defiEnrollBoost \| defiHow \| defiRisk \| desktopAuthorized \| desktopUnknown \| developer \| diamondHands \| didDecentralizedIdentity \| digitalCollectibles \| digitalGold \| directDepositPhone \| discardAssets \| docError \| documentCertified \| documentSuccess \| downloadCoinbaseWallet \| earnCryptoCard \| earnCryptoInterest \| earnGlobe \| earnGrowth \| earnIdVerification \| earnInterest \| earnMore \| earnNuxHome \| earnSuccess \| earnToLearn \| emailNotification \| emptyCollection \| emptyStateCheckBackLater \| emptyStateNft404Page \| emptyStateNftSoldOut \| enableBiometrics \| encryptedEverything \| engagement \| ensProfilePic \| error400 \| errorApp500 \| errorMoblie \| errorRefresh \| errorRefreshWeb \| errorWeb \| errorWeb400 \| errorWeb404 \| errorWeb404Mobile \| errorWeb500 \| estimatedAmount \| ethereumToWallet \| ethStakingUpsell \| exchangeEmptyState \| exploreDecentralizedApps \| faceMatchReal \| feeScale \| fileYourCryptoTaxes \| fileYourCryptoTaxesCheck \| focusLimitOrders \| freeBtc \| futuresAndPerps \| futuresExpire \| futuresVsPerps \| gainsAndLosses \| gamer \| gasFeesNetworkFees \| generative \| getStartedInMinutes \| governanceMallet \| graphChartTrading \| hardwareWallets \| hiddenCollection \| holdCrypto \| holdingCrypto \| iceCreamMeltingSystemError \| idAngles \| idBack \| idCard \| idFront \| idIssue \| idVerificationSecure \| indexer \| innovation \| instoAdd2Fa \| instoAddBankAccount \| instoCoinbaseOneProtectedCrypto \| instoDocumentSuccess \| instoEarnGlobe \| instoEnableBiometrics \| instoEthStakingRewards \| instoEthStakingUpsell \| instoGovernance \| instoKeyGenerationComplete \| instoKeyGenerationPending \| instoOnChain \| instoOpenEmail \| instoPhoneUnknown \| instoPrimeStaking \| instoPrivateKey \| instoRequestSent \| instoSecurityKeyAuth \| instoStaking \| instoStakingMissedReturns \| instoWallet \| instoWalletSecurity \| instoWeb3MobileSetupStart \| insufficientBalance \| insuranceProtection \| invest \| invite \| japanVerifyId \| keyGeneration \| layeredNetworks \| layerOne \| layerThree \| layerTwo \| ledgerAccess \| ledgerPlugin \| lend \| leverage \| lightningNetwork \| lightningNetworkInvoice \| lightningNetworkTransfer \| limitOrders \| linkingYourWalletToYourCoinbaseAccount \| liquidationBufferGreen \| liquidationBufferRed \| liquidationBufferRedClose \| liquidationBufferYellow \| lowCost \| marginWarning \| mic \| mining \| minting \| moneyDecentralized \| moreGains \| multicoinSupport \| multiPlatformMobileAppBrowserExtension \| multipleAccountsWalletsForOneUser \| multiplePortfolios \| myNameIsSatoshi \| namePortfolio \| networkWarning \| noFees \| noFeesMotion \| noLongAddresses \| notificationsAlt \| notificationsAndUpdates \| offChain \| oilAndGold \| onChain \| onTheList \| openEmail \| optInPushNotificationsEmail \| oracle \| orderBooks \| p2pGifting \| p2pPayments \| paperHands \| payUpFront \| performance \| phoneUnknown \| platform \| polling \| portfolioPerformance \| poweredByEthereum \| powerOfCrypto \| predictionsMarkets \| primeDeFi \| primeEarn \| primeStaking \| private \| privateKey \| processing \| protocol \| public \| quest \| quickAndSimple \| quickBuy \| ratingsAndReviews \| readyToTrade \| realToUSDC \| receivedCard \| receiveGift \| recommendInvest \| recurringReward \| referralsAvatars \| referralsBitcoin \| referralsCoinbaseOne \| referralsGenericCoin \| referralsWalletPhones \| remittances \| requestSent \| restrictedCountry \| retailUSDCRewards \| reviewInfo \| rotatingRewards \| routingAccount \| scalable \| secureAndTrusted \| secureGlobalTransactions \| secureStorage \| selectCorrectCrypto \| selectReward \| selfCustody \| selfCustodyCrypto \| semiCustodial \| sendCryptoFaster \| sendToUsername \| serverCatSystemError \| settlement \| shareOnSocialMedia \| sidechain \| slippageTolerance \| spacedOutSystemError \| squidEmptyState \| stablecoin \| stableValue \| stakingMissedReturns \| stakingMissedReturnsUsdc \| stayInControlSelfHostedWalletsStorage \| stopLimitOrder \| stopLimitOrderDown \| storage \| stressTestedColdStorage \| supportAndMore \| sustainable \| switchAdvancedToSimpleTrading \| taxesDetails \| tools \| tradeGeneral \| tradeHistory \| tradeImmediately \| tradingPerpetualsUsdc \| tradingWithLeverage \| transactionLimit \| trendingHotAssets \| twoIdVerify \| unlockKey \| usdAndUsdc \| usdtToUSDC \| verifyBankTransactions \| verifyCardTransactions \| verifyEmail \| verifyIdDetails \| verifyInfo \| videoRequest \| videoReview \| videoUpload \| vipBadge \| vote \| walletAsset \| walletConfirmation \| walletFlyEmptyState \| walletLoading \| walletNotifications \| walletSecurity \| walletUi \| watchVideos \| web3ActivityError \| web3ActivitySigned \| web3MobileSetupStart \| web3MobileSetupSuccess \| webRAT \| whyNotBoth \| yourContacts` | Yes | `-` | Name of illustration as defined in Figma |
42
42
  | `dimension` | `240x240 \| 200x200` | No | `-` | HeroSquare Default: 240x240 SpotSquare Default: 96x96 Pictogram Default: 48x48 SpotRectangle Default: 240x120 |
43
43
  | `fallback` | `ReactElement<any, string \| JSXElementConstructor<any>> \| null` | No | `null` | Fallback element to render if unable to find an illustration with the matching name |
44
44
  | `scaleMultiplier` | `number` | No | `-` | Multiply the width & height while maintaining aspect ratio |
@@ -296,6 +296,7 @@ An icon button with a badge showing the notification count. Uses `DotCount` to d
296
296
  | `height` | `string \| number` | No | `-` | - |
297
297
  | `iconSize` | `xs \| s \| m \| l` | No | `compact ? 's' : 'm'` | Size for the icon rendered inside the button. |
298
298
  | `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
299
+ | `key` | `Key \| null` | No | `-` | - |
299
300
  | `left` | `string \| number` | No | `-` | - |
300
301
  | `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
301
302
  | `loading` | `boolean` | No | `-` | Is the element currenty loading. When set to true, will disable element from press and keyboard events Is the element currenty loading. Mark the button as loading and display a spinner. |
@@ -325,6 +326,7 @@ An icon button with a badge showing the notification count. Uses `DotCount` to d
325
326
  | `paddingY` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
326
327
  | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
327
328
  | `position` | `static \| relative \| fixed \| absolute \| sticky` | No | `-` | - |
329
+ | `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
328
330
  | `right` | `string \| number` | No | `-` | - |
329
331
  | `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
330
332
  | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID Used to locate this element in unit and end-to-end tests. |
@@ -1,6 +1,6 @@
1
1
  # InputChip
2
2
 
3
- A Chip used for removable selections.
3
+ A Chip used for removing selected values.
4
4
 
5
5
  ## Import
6
6
 
@@ -10,12 +10,38 @@ import { InputChip } from '@coinbase/cds-mobile/chips/InputChip'
10
10
 
11
11
  ## Examples
12
12
 
13
- ### Basic usage
13
+ InputChip is built for remove actions. For other uses, see [Chip](/components/inputs/Chip/) which supports interaction.
14
+
15
+ ### Basics
16
+
17
+ Use `onPress` for remove behavior.
18
+
19
+ ```tsx
20
+ function Example() {
21
+ const [selectedValues, setSelectedValues] = React.useState(['BTC', 'ETH', 'SOL']);
22
+
23
+ return (
24
+ <HStack gap={2} flexWrap="wrap">
25
+ {selectedValues.map((value) => (
26
+ <InputChip
27
+ key={value}
28
+ onPress={() => setSelectedValues((current) => current.filter((item) => item !== value))}
29
+ value={value}
30
+ />
31
+ ))}
32
+ </HStack>
33
+ );
34
+ }
35
+ ```
36
+
37
+ #### Disabled
38
+
39
+ Use `disabled` when the value should stay visible but not removable.
14
40
 
15
41
  ```tsx
16
42
  function Example() {
17
43
  return (
18
- <HStack gap={2}>
44
+ <HStack gap={2} flexWrap="wrap">
19
45
  <InputChip onPress={() => console.log('Remove Basic')} value="Basic Chip" />
20
46
  <InputChip disabled onPress={() => {}} value="Disabled Chip" />
21
47
  </HStack>
@@ -23,20 +49,22 @@ function Example() {
23
49
  }
24
50
  ```
25
51
 
26
- ### With Custom Start Element
52
+ ### Styling
53
+
54
+ #### With start content
27
55
 
28
56
  ```tsx
29
57
  function Example() {
30
58
  return (
31
59
  <VStack gap={2}>
32
- <HStack gap={2}>
60
+ <HStack gap={2} flexWrap="wrap">
33
61
  <InputChip
34
62
  onPress={() => console.log('Remove Star')}
35
63
  value="With Icon"
36
64
  start={<Icon name="star" />}
37
65
  />
38
66
  </HStack>
39
- <HStack gap={2}>
67
+ <HStack gap={2} flexWrap="wrap">
40
68
  <InputChip
41
69
  onPress={() => console.log('Remove BTC')}
42
70
  value="BTC"
@@ -53,16 +81,54 @@ function Example() {
53
81
  }
54
82
  ```
55
83
 
56
- ### With Custom Accessibility Label
84
+ #### Compact
85
+
86
+ Use `compact` to reduce chip height and spacing in dense layouts.
87
+
88
+ ```tsx
89
+ function Example() {
90
+ return (
91
+ <HStack gap={2} flexWrap="wrap">
92
+ <InputChip onPress={() => console.log('Remove Default')} value="Default" />
93
+ <InputChip compact onPress={() => console.log('Remove Compact')} value="Compact" />
94
+ </HStack>
95
+ );
96
+ }
97
+ ```
98
+
99
+ #### Invert color scheme
100
+
101
+ Use `invertColorScheme` to emphasize removable values.
102
+
103
+ ```tsx
104
+ function Example() {
105
+ return (
106
+ <HStack gap={2} flexWrap="wrap">
107
+ <InputChip onPress={() => console.log('Remove Default')} value="Default" />
108
+ <InputChip
109
+ invertColorScheme
110
+ onPress={() => console.log('Remove Inverted')}
111
+ value="Inverted"
112
+ />
113
+ </HStack>
114
+ );
115
+ }
116
+ ```
117
+
118
+ ### Accessibility
119
+
120
+ InputChip defaults to a remove label (`Remove ${children}` for string content, otherwise `Remove option`).
121
+ Override `accessibilityLabel` when you need more specific wording.
57
122
 
58
123
  ```tsx
59
124
  function Example() {
60
125
  return (
61
- <HStack gap={2}>
126
+ <HStack gap={2} flexWrap="wrap">
127
+ <InputChip onPress={() => console.log('Remove BTC')} value="BTC" />
62
128
  <InputChip
63
129
  onPress={() => console.log('Remove Custom')}
64
130
  value="Custom Label"
65
- accessibilityLabel="Custom remove action"
131
+ accessibilityLabel="Remove custom selection"
66
132
  />
67
133
  </HStack>
68
134
  );