@coinbase/cds-mcp-server 8.59.0 → 8.61.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.
- package/CHANGELOG.md +8 -0
- package/mcp-docs/mobile/components/Button.txt +29 -1
- package/mcp-docs/mobile/components/IconButton.txt +1 -0
- package/mcp-docs/mobile/components/ModalFooter.txt +2 -2
- package/mcp-docs/mobile/components/ProgressBar.txt +1 -1
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +1 -1
- package/mcp-docs/mobile/components/ProgressCircle.txt +62 -2
- package/mcp-docs/mobile/components/Tag.txt +2 -2
- package/mcp-docs/mobile/routes.txt +1 -1
- package/mcp-docs/web/components/Button.txt +31 -1
- package/mcp-docs/web/components/IconButton.txt +58 -1
- package/mcp-docs/web/components/ModalFooter.txt +2 -2
- package/mcp-docs/web/components/ProgressBar.txt +1 -1
- package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +1 -1
- package/mcp-docs/web/components/ProgressCircle.txt +62 -2
- package/mcp-docs/web/routes.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,14 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.61.0 ((3/30/2026, 02:40 PM PST))
|
|
12
|
+
|
|
13
|
+
This is an artificial version bump with no new change.
|
|
14
|
+
|
|
15
|
+
## 8.60.0 ((3/29/2026, 10:49 AM PST))
|
|
16
|
+
|
|
17
|
+
This is an artificial version bump with no new change.
|
|
18
|
+
|
|
11
19
|
## 8.59.0 ((3/27/2026, 05:43 AM PST))
|
|
12
20
|
|
|
13
21
|
This is an artificial version bump with no new change.
|
|
@@ -68,7 +68,34 @@ Use transparent buttons for supplementary actions with lower prominence. The con
|
|
|
68
68
|
|
|
69
69
|
#### Loading
|
|
70
70
|
|
|
71
|
-
Use the `loading` prop to indicate an action is in progress. The button becomes non-interactive and displays a
|
|
71
|
+
Use the `loading` prop to indicate an action is in progress. The button becomes non-interactive and displays a loading indicator (indeterminate [ProgressCircle](/components/feedback/ProgressCircle)) while preserving its width.
|
|
72
|
+
|
|
73
|
+
##### Loading by variant
|
|
74
|
+
|
|
75
|
+
Loading works with all variants and transparent. The label is hidden and the progress circle is shown in the button’s accent color.
|
|
76
|
+
|
|
77
|
+
```jsx
|
|
78
|
+
<HStack gap={2} flexWrap="wrap" alignItems="center">
|
|
79
|
+
<Button loading>Primary</Button>
|
|
80
|
+
<Button loading variant="secondary">
|
|
81
|
+
Secondary
|
|
82
|
+
</Button>
|
|
83
|
+
<Button loading variant="tertiary">
|
|
84
|
+
Tertiary
|
|
85
|
+
</Button>
|
|
86
|
+
<Button loading variant="negative">
|
|
87
|
+
Negative
|
|
88
|
+
</Button>
|
|
89
|
+
<Button loading transparent variant="secondary">
|
|
90
|
+
Transparent
|
|
91
|
+
</Button>
|
|
92
|
+
<Button loading compact>
|
|
93
|
+
Compact
|
|
94
|
+
</Button>
|
|
95
|
+
</HStack>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
##### Basic loading
|
|
72
99
|
|
|
73
100
|
```jsx
|
|
74
101
|
<HStack gap={2}>
|
|
@@ -335,6 +362,7 @@ A full-width primary action with a compact secondary option.
|
|
|
335
362
|
| `paddingY` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
336
363
|
| `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
|
|
337
364
|
| `position` | `static \| relative \| fixed \| absolute \| sticky` | No | `-` | - |
|
|
365
|
+
| `progressCircleSize` | `number` | No | `24` | Size of the loading progress circle in px. |
|
|
338
366
|
| `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
|
|
339
367
|
| `right` | `string \| number` | No | `-` | - |
|
|
340
368
|
| `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
@@ -326,6 +326,7 @@ An icon button with a badge showing the notification count. Uses `DotCount` to d
|
|
|
326
326
|
| `paddingY` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
327
327
|
| `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
|
|
328
328
|
| `position` | `static \| relative \| fixed \| absolute \| sticky` | No | `-` | - |
|
|
329
|
+
| `progressCircleSize` | `number` | No | `24` | Size of the loading progress circle in px. |
|
|
329
330
|
| `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
|
|
330
331
|
| `right` | `string \| number` | No | `-` | - |
|
|
331
332
|
| `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
@@ -173,7 +173,7 @@ function LoadingExample() {
|
|
|
173
173
|
|
|
174
174
|
| Prop | Type | Required | Default | Description |
|
|
175
175
|
| --- | --- | --- | --- | --- |
|
|
176
|
-
| `primaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & AccessibilityProps & ComponentEventHandlerProps & Pick<PressableProps, style \| onPress \| hitSlop> & Omit<InteractableBaseProps, style \| pressed> & { noScaleOnPress?: boolean \| undefined; onPressIn?: ((event: GestureResponderEvent) => void) \| undefined; onPressOut?: ((event: GestureResponderEvent) => void) \| undefined; feedback?: HapticFeedbackType \| undefined; loading?: boolean \| undefined; debounceTime?: number \| undefined; disableDebounce?: boolean \| undefined; } & { variant?: ButtonVariant \| undefined; disabled?: boolean \| undefined; loading?: boolean \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: end \| start \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & { onPress?: ((event: GestureResponderEvent) => void) \| null \| undefined; }, string \| JSXElementConstructor<any>>` | Yes | `-` | Primary action button |
|
|
176
|
+
| `primaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & AccessibilityProps & ComponentEventHandlerProps & Pick<PressableProps, style \| onPress \| hitSlop> & Omit<InteractableBaseProps, style \| pressed> & { noScaleOnPress?: boolean \| undefined; onPressIn?: ((event: GestureResponderEvent) => void) \| undefined; onPressOut?: ((event: GestureResponderEvent) => void) \| undefined; feedback?: HapticFeedbackType \| undefined; loading?: boolean \| undefined; debounceTime?: number \| undefined; disableDebounce?: boolean \| undefined; } & { variant?: ButtonVariant \| undefined; disabled?: boolean \| undefined; loading?: boolean \| undefined; progressCircleSize?: number \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: end \| start \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & { onPress?: ((event: GestureResponderEvent) => void) \| null \| undefined; }, string \| JSXElementConstructor<any>>` | Yes | `-` | Primary action button |
|
|
177
177
|
| `alignContent` | `flex-start \| flex-end \| center \| stretch \| space-between \| space-around \| space-evenly` | No | `-` | - |
|
|
178
178
|
| `alignItems` | `flex-start \| flex-end \| center \| stretch \| baseline` | No | `-` | - |
|
|
179
179
|
| `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
|
|
@@ -255,7 +255,7 @@ function LoadingExample() {
|
|
|
255
255
|
| `position` | `static \| relative \| fixed \| absolute \| sticky` | No | `-` | - |
|
|
256
256
|
| `right` | `string \| number` | No | `-` | - |
|
|
257
257
|
| `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
258
|
-
| `secondaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & AccessibilityProps & ComponentEventHandlerProps & Pick<PressableProps, style \| onPress \| hitSlop> & Omit<InteractableBaseProps, style \| pressed> & { noScaleOnPress?: boolean; onPressIn?: ((event: GestureResponderEvent) => void) \| undefined; onPressOut?: ((event: GestureResponderEvent) => void) \| undefined; feedback?: HapticFeedbackType \| undefined; loading?: boolean \| undefined; debounceTime?: number \| undefined; disableDebounce?: boolean \| undefined; } & { variant?: ButtonVariant \| undefined; disabled?: boolean \| undefined; loading?: boolean \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: end \| start \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & { onPress?: ((event: GestureResponderEvent) => void) \| null \| undefined; }, string \| JSXElementConstructor<any>> \| undefined` | No | `-` | Secondary action button |
|
|
258
|
+
| `secondaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & AccessibilityProps & ComponentEventHandlerProps & Pick<PressableProps, style \| onPress \| hitSlop> & Omit<InteractableBaseProps, style \| pressed> & { noScaleOnPress?: boolean; onPressIn?: ((event: GestureResponderEvent) => void) \| undefined; onPressOut?: ((event: GestureResponderEvent) => void) \| undefined; feedback?: HapticFeedbackType \| undefined; loading?: boolean \| undefined; debounceTime?: number \| undefined; disableDebounce?: boolean \| undefined; } & { variant?: ButtonVariant \| undefined; disabled?: boolean \| undefined; loading?: boolean \| undefined; progressCircleSize?: number \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: end \| start \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & { onPress?: ((event: GestureResponderEvent) => void) \| null \| undefined; }, string \| JSXElementConstructor<any>> \| undefined` | No | `-` | Secondary action button |
|
|
259
259
|
| `style` | `false \| RegisteredStyle<ViewStyle> \| Value \| AnimatedInterpolation<string \| number> \| WithAnimatedObject<ViewStyle> \| WithAnimatedArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>> \| readonly (Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>)[]> \| null` | No | `-` | - |
|
|
260
260
|
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Used to locate this view in end-to-end tests. |
|
|
261
261
|
| `textAlign` | `left \| right \| auto \| center \| justify` | No | `-` | - |
|
|
@@ -127,13 +127,13 @@ function Example() {
|
|
|
127
127
|
|
|
128
128
|
| Prop | Type | Required | Default | Description |
|
|
129
129
|
| --- | --- | --- | --- | --- |
|
|
130
|
-
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
131
130
|
| `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `primary` | Custom progress color. |
|
|
132
131
|
| `disableAnimateOnMount` | `boolean` | No | `false` | Disable animation on component mount |
|
|
133
132
|
| `disabled` | `boolean` | No | `-` | Toggle used to show a disabled progress visualization |
|
|
134
133
|
| `key` | `Key \| null` | No | `-` | - |
|
|
135
134
|
| `onAnimationEnd` | `(() => void)` | No | `-` | Callback fired when the progress animation ends. |
|
|
136
135
|
| `onAnimationStart` | `(() => void)` | No | `-` | Callback fired when the progress animation starts. |
|
|
136
|
+
| `progress` | `number` | No | `-` | Number between 0-1 representing the progress percentage |
|
|
137
137
|
| `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
|
|
138
138
|
| `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<ViewStyle \| Falsy \| RegisteredStyle<ViewStyle>>` | No | `-` | - |
|
|
139
139
|
| `styles` | `{ root?: StyleProp<ViewStyle>; progress?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for individual elements of the ProgressBar component |
|
|
@@ -176,10 +176,10 @@ function Example() {
|
|
|
176
176
|
| Prop | Type | Required | Default | Description |
|
|
177
177
|
| --- | --- | --- | --- | --- |
|
|
178
178
|
| `label` | `number \| { value: number; render: (num: number, disabled?: boolean \| undefined) => ReactNode; }` | Yes | `-` | Label that is floated at the end of the filled in bar. If a number is used then it will format it as a percentage. |
|
|
179
|
-
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
180
179
|
| `disableAnimateOnMount` | `boolean` | No | `false` | Disable animation on component mount |
|
|
181
180
|
| `disabled` | `boolean` | No | `-` | Toggle used to show a disabled progress visualization |
|
|
182
181
|
| `labelPlacement` | `above \| below` | No | `above` | Position of label relative to the bar |
|
|
182
|
+
| `progress` | `number` | No | `-` | Number between 0-1 representing the progress percentage |
|
|
183
183
|
| `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<ViewStyle \| Falsy \| RegisteredStyle<ViewStyle>>` | No | `-` | - |
|
|
184
184
|
| `styles` | `{ root?: StyleProp<ViewStyle>; labelContainer?: StyleProp<ViewStyle>; label?: StyleProp<TextStyle>; }` | No | `-` | Custom styles for individual elements of the ProgressBarWithFloatLabel component |
|
|
185
185
|
| `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 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ProgressCircle
|
|
2
2
|
|
|
3
|
-
A circular visual indicator of completion progress.
|
|
3
|
+
A circular visual indicator of completion progress. Supports both determinate progress (0–100%) and an indeterminate variant for loading states.
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
@@ -20,6 +20,65 @@ import { ProgressCircle } from '@coinbase/cds-mobile/visualizations/ProgressCirc
|
|
|
20
20
|
</HStack>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
### Indeterminate
|
|
24
|
+
|
|
25
|
+
Use the `indeterminate` prop when progress is unknown (e.g. loading). The circle shows a spinning partial arc with no percentage text. This is the recommended replacement for the deprecated [Spinner](/components/feedback/Spinner) in loading contexts such as [IconButton](/components/buttons/IconButton) or button loading states.
|
|
26
|
+
|
|
27
|
+
When `indeterminate` is true, the default color is `fgMuted`; you can override `color` as needed. Always provide `accessibilityLabel` so screen readers announce the loading state.
|
|
28
|
+
|
|
29
|
+
#### Thickness (weight)
|
|
30
|
+
|
|
31
|
+
Indeterminate uses the same `weight` prop as determinate progress. The default is **`"normal"`** (4px stroke). Use `"thin"` (2px), `"semiheavy"` (8px), or `"heavy"` (12px) to change thickness.
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
<HStack gap={2} alignItems="center">
|
|
35
|
+
<VStack gap={1} alignItems="center">
|
|
36
|
+
<Text variant="label2">Default (normal)</Text>
|
|
37
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={64} />
|
|
38
|
+
</VStack>
|
|
39
|
+
<VStack gap={1} alignItems="center">
|
|
40
|
+
<Text variant="label2">weight="thin"</Text>
|
|
41
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={64} weight="thin" />
|
|
42
|
+
</VStack>
|
|
43
|
+
<VStack gap={1} alignItems="center">
|
|
44
|
+
<Text variant="label2">weight="semiheavy"</Text>
|
|
45
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={64} weight="semiheavy" />
|
|
46
|
+
</VStack>
|
|
47
|
+
</HStack>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Progress (arc length)
|
|
51
|
+
|
|
52
|
+
When `indeterminate` is true, the **`progress` prop controls the length of the visible arc** (how much of the circle is drawn), not a completion percentage. It defaults to `0.75` (a 270° arc). Override it to change the arc length—e.g. `0.5` for a half circle or `0.25` for a shorter arc.
|
|
53
|
+
|
|
54
|
+
```jsx
|
|
55
|
+
<HStack gap={2} alignItems="center">
|
|
56
|
+
<VStack gap={1} alignItems="center">
|
|
57
|
+
<Text variant="label2">progress=0.25</Text>
|
|
58
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate progress={0.25} size={56} />
|
|
59
|
+
</VStack>
|
|
60
|
+
<VStack gap={1} alignItems="center">
|
|
61
|
+
<Text variant="label2">progress=0.5</Text>
|
|
62
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate progress={0.5} size={56} />
|
|
63
|
+
</VStack>
|
|
64
|
+
<VStack gap={1} alignItems="center">
|
|
65
|
+
<Text variant="label2">progress=0.75 (default)</Text>
|
|
66
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate progress={0.75} size={56} />
|
|
67
|
+
</VStack>
|
|
68
|
+
</HStack>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Sizes and color
|
|
72
|
+
|
|
73
|
+
```jsx
|
|
74
|
+
<HStack gap={2} alignItems="center">
|
|
75
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={32} />
|
|
76
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={56} />
|
|
77
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={100} />
|
|
78
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate color="bgPrimary" size={56} />
|
|
79
|
+
</HStack>
|
|
80
|
+
```
|
|
81
|
+
|
|
23
82
|
### Thin
|
|
24
83
|
|
|
25
84
|
```jsx
|
|
@@ -238,16 +297,17 @@ function Example() {
|
|
|
238
297
|
|
|
239
298
|
| Prop | Type | Required | Default | Description |
|
|
240
299
|
| --- | --- | --- | --- | --- |
|
|
241
|
-
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
242
300
|
| `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `primary` | Custom progress color. |
|
|
243
301
|
| `contentNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Optional component to override the default content rendered inside the circle. |
|
|
244
302
|
| `disableAnimateOnMount` | `boolean` | No | `false` | Disable animation on component mount |
|
|
245
303
|
| `disabled` | `boolean` | No | `-` | Toggle used to show a disabled progress visualization |
|
|
246
304
|
| `hideContent` | `boolean` | No | `-` | Toggle used to hide the content node rendered inside the circle. |
|
|
247
305
|
| `hideText` | `boolean` | No | `-` | - |
|
|
306
|
+
| `indeterminate` | `boolean` | No | `-` | Toggle used to show an indeterminate progress circle. |
|
|
248
307
|
| `key` | `Key \| null` | No | `-` | - |
|
|
249
308
|
| `onAnimationEnd` | `(() => void)` | No | `-` | Callback fired when the progress animation ends. |
|
|
250
309
|
| `onAnimationStart` | `(() => void)` | No | `-` | Callback fired when the progress animation starts. |
|
|
310
|
+
| `progress` | `number` | No | `-` | Number between 0-1 representing the progress percentage |
|
|
251
311
|
| `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
|
|
252
312
|
| `size` | `number` | No | `-` | Optional size in px for the visualization. This is useful if the visualization is used in an HStack. If this is omitted the visualization will fill the parent width or height. Since its a circular visualization it will fill the smaller of the parent width or height |
|
|
253
313
|
| `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<ViewStyle \| Falsy \| RegisteredStyle<ViewStyle>>` | No | `-` | - |
|
|
@@ -242,7 +242,7 @@ function MarginExample() {
|
|
|
242
242
|
| `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
|
|
243
243
|
| `animated` | `boolean` | No | `-` | - |
|
|
244
244
|
| `aspectRatio` | `string \| number` | No | `-` | - |
|
|
245
|
-
| `background` | `blue0 \| blue5 \| blue10 \| blue15 \| blue20 \| blue100 \|
|
|
245
|
+
| `background` | `blue0 \| blue5 \| blue10 \| blue15 \| blue20 \| blue100 \| blue40 \| blue30 \| blue50 \| blue60 \| blue70 \| blue80 \| blue90 \| green0 \| green5 \| green10 \| green15 \| green20 \| green100 \| green40 \| green30 \| green50 \| green60 \| green70 \| green80 \| green90 \| orange0 \| orange5 \| orange10 \| orange15 \| orange20 \| orange100 \| orange40 \| orange30 \| orange50 \| orange60 \| orange70 \| orange80 \| orange90 \| yellow0 \| yellow5 \| yellow10 \| yellow15 \| yellow20 \| yellow100 \| yellow40 \| yellow30 \| yellow50 \| yellow60 \| yellow70 \| yellow80 \| yellow90 \| gray0 \| gray5 \| gray10 \| gray15 \| gray20 \| gray100 \| gray40 \| gray30 \| gray50 \| gray60 \| gray70 \| gray80 \| gray90 \| indigo0 \| indigo5 \| indigo10 \| indigo15 \| indigo20 \| indigo100 \| indigo40 \| indigo30 \| indigo50 \| indigo60 \| indigo70 \| indigo80 \| indigo90 \| pink0 \| pink5 \| pink10 \| pink15 \| pink20 \| pink100 \| pink40 \| pink30 \| pink50 \| pink60 \| pink70 \| pink80 \| pink90 \| purple0 \| purple5 \| purple10 \| purple15 \| purple20 \| purple100 \| purple40 \| purple30 \| purple50 \| purple60 \| purple70 \| purple80 \| purple90 \| red0 \| red5 \| red10 \| red15 \| red20 \| red100 \| red40 \| red30 \| red50 \| red60 \| red70 \| red80 \| red90 \| teal0 \| teal5 \| teal10 \| teal15 \| teal20 \| teal100 \| teal40 \| teal30 \| teal50 \| teal60 \| teal70 \| teal80 \| teal90 \| chartreuse0 \| chartreuse5 \| chartreuse10 \| chartreuse15 \| chartreuse20 \| chartreuse100 \| chartreuse40 \| chartreuse30 \| chartreuse50 \| chartreuse60 \| chartreuse70 \| chartreuse80 \| chartreuse90` | No | `-` | - |
|
|
246
246
|
| `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
247
247
|
| `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
248
248
|
| `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
@@ -262,7 +262,7 @@ function MarginExample() {
|
|
|
262
262
|
| `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
|
|
263
263
|
| `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
|
|
264
264
|
| `bottom` | `string \| number` | No | `-` | - |
|
|
265
|
-
| `color` | `blue0 \| blue5 \| blue10 \| blue15 \| blue20 \| blue100 \|
|
|
265
|
+
| `color` | `blue0 \| blue5 \| blue10 \| blue15 \| blue20 \| blue100 \| blue40 \| blue30 \| blue50 \| blue60 \| blue70 \| blue80 \| blue90 \| green0 \| green5 \| green10 \| green15 \| green20 \| green100 \| green40 \| green30 \| green50 \| green60 \| green70 \| green80 \| green90 \| orange0 \| orange5 \| orange10 \| orange15 \| orange20 \| orange100 \| orange40 \| orange30 \| orange50 \| orange60 \| orange70 \| orange80 \| orange90 \| yellow0 \| yellow5 \| yellow10 \| yellow15 \| yellow20 \| yellow100 \| yellow40 \| yellow30 \| yellow50 \| yellow60 \| yellow70 \| yellow80 \| yellow90 \| gray0 \| gray5 \| gray10 \| gray15 \| gray20 \| gray100 \| gray40 \| gray30 \| gray50 \| gray60 \| gray70 \| gray80 \| gray90 \| indigo0 \| indigo5 \| indigo10 \| indigo15 \| indigo20 \| indigo100 \| indigo40 \| indigo30 \| indigo50 \| indigo60 \| indigo70 \| indigo80 \| indigo90 \| pink0 \| pink5 \| pink10 \| pink15 \| pink20 \| pink100 \| pink40 \| pink30 \| pink50 \| pink60 \| pink70 \| pink80 \| pink90 \| purple0 \| purple5 \| purple10 \| purple15 \| purple20 \| purple100 \| purple40 \| purple30 \| purple50 \| purple60 \| purple70 \| purple80 \| purple90 \| red0 \| red5 \| red10 \| red15 \| red20 \| red100 \| red40 \| red30 \| red50 \| red60 \| red70 \| red80 \| red90 \| teal0 \| teal5 \| teal10 \| teal15 \| teal20 \| teal100 \| teal40 \| teal30 \| teal50 \| teal60 \| teal70 \| teal80 \| teal90 \| chartreuse0 \| chartreuse5 \| chartreuse10 \| chartreuse15 \| chartreuse20 \| chartreuse100 \| chartreuse40 \| chartreuse30 \| chartreuse50 \| chartreuse60 \| chartreuse70 \| chartreuse80 \| chartreuse90` | No | `-` | - |
|
|
266
266
|
| `colorScheme` | `blue \| green \| yellow \| gray \| purple \| red` | No | `blue` | Specify the colorScheme of the Tag |
|
|
267
267
|
| `columnGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
268
268
|
| `dangerouslySetBackground` | `string` | No | `-` | - |
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
- [Button](mobile/components/Button.txt): A pressable button element.
|
|
104
104
|
- [AvatarButton](mobile/components/AvatarButton.txt): A pressable Avatar.
|
|
105
105
|
- [Spinner](mobile/components/Spinner.txt): A loading indicator that displays a rotating animation to communicate that content is loading or a background process is in progress.
|
|
106
|
-
- [ProgressCircle](mobile/components/ProgressCircle.txt): A circular visual indicator of completion progress.
|
|
106
|
+
- [ProgressCircle](mobile/components/ProgressCircle.txt): A circular visual indicator of completion progress. Supports both determinate progress (0–100%) and an indeterminate variant for loading states.
|
|
107
107
|
- [ProgressBarWithFloatLabel](mobile/components/ProgressBarWithFloatLabel.txt): A ProgressBar with a floating label that moves with progress.
|
|
108
108
|
- [ProgressBarWithFixedLabels](mobile/components/ProgressBarWithFixedLabels.txt): A ProgressBar with fixed labels at defined positions.
|
|
109
109
|
- [ProgressBar](mobile/components/ProgressBar.txt): A visual indicator of completion progress.
|
|
@@ -71,7 +71,36 @@ Use transparent buttons for supplementary actions with lower prominence. The con
|
|
|
71
71
|
|
|
72
72
|
#### Loading
|
|
73
73
|
|
|
74
|
-
Use the `loading` prop to indicate an action is in progress. The button becomes non-interactive and displays a
|
|
74
|
+
Use the `loading` prop to indicate an action is in progress. The button becomes non-interactive and displays a loading indicator (indeterminate [ProgressCircle](/components/feedback/ProgressCircle)) while preserving its width.
|
|
75
|
+
|
|
76
|
+
##### Loading by variant
|
|
77
|
+
|
|
78
|
+
Loading works with all variants and transparent. The label is hidden and the progress circle is shown in the button’s accent color.
|
|
79
|
+
|
|
80
|
+
```jsx live
|
|
81
|
+
<HStack gap={2} flexWrap="wrap" alignItems="center">
|
|
82
|
+
<Button loading>Primary</Button>
|
|
83
|
+
<Button loading variant="secondary">
|
|
84
|
+
Secondary
|
|
85
|
+
</Button>
|
|
86
|
+
<Button loading variant="tertiary">
|
|
87
|
+
Tertiary
|
|
88
|
+
</Button>
|
|
89
|
+
<Button loading variant="negative">
|
|
90
|
+
Negative
|
|
91
|
+
</Button>
|
|
92
|
+
<Button loading transparent variant="secondary">
|
|
93
|
+
Transparent
|
|
94
|
+
</Button>
|
|
95
|
+
<Button loading compact>
|
|
96
|
+
Compact
|
|
97
|
+
</Button>
|
|
98
|
+
</HStack>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
##### Interactive loading
|
|
102
|
+
|
|
103
|
+
Toggle loading state to see the transition. Use for async actions like save or submit.
|
|
75
104
|
|
|
76
105
|
```jsx live
|
|
77
106
|
function LoadingExample() {
|
|
@@ -609,6 +638,7 @@ A full-width primary action with a compact secondary option.
|
|
|
609
638
|
| `position` | `ResponsiveProp<fixed \| static \| relative \| absolute \| sticky>` | No | `-` | - |
|
|
610
639
|
| `prefix` | `string \| undefined` | No | `-` | - |
|
|
611
640
|
| `pressed` | `boolean` | No | `-` | Is the element being pressed. Primarily a mobile feature, but can be used on the web. |
|
|
641
|
+
| `progressCircleSize` | `number` | No | `24` | Size of the loading progress circle in px. |
|
|
612
642
|
| `property` | `string \| undefined` | No | `-` | - |
|
|
613
643
|
| `radioGroup` | `string \| undefined` | No | `-` | - |
|
|
614
644
|
| `ref` | `any` | No | `-` | - |
|
|
@@ -102,7 +102,64 @@ Use the `transparent` prop to remove the background until the user interacts wit
|
|
|
102
102
|
|
|
103
103
|
#### Loading
|
|
104
104
|
|
|
105
|
-
Use the `loading` prop
|
|
105
|
+
Use the `loading` prop when an action is in progress. The button becomes non-interactive and shows an indeterminate [ProgressCircle](/components/feedback/ProgressCircle) instead of the icon. The circle size follows the button’s `iconSize`.
|
|
106
|
+
|
|
107
|
+
##### Loading by variant
|
|
108
|
+
|
|
109
|
+
Loading works with all variants, transparent, and compact. Provide `accessibilityLabel` so screen readers announce the loading state (e.g. "Loading").
|
|
110
|
+
|
|
111
|
+
```jsx live
|
|
112
|
+
<HStack gap={2} flexWrap="wrap" alignItems="center">
|
|
113
|
+
<IconButton
|
|
114
|
+
loading
|
|
115
|
+
name="refresh"
|
|
116
|
+
accessibilityLabel="Loading"
|
|
117
|
+
variant="primary"
|
|
118
|
+
onClick={console.log}
|
|
119
|
+
/>
|
|
120
|
+
<IconButton
|
|
121
|
+
loading
|
|
122
|
+
name="refresh"
|
|
123
|
+
accessibilityLabel="Loading"
|
|
124
|
+
variant="secondary"
|
|
125
|
+
onClick={console.log}
|
|
126
|
+
/>
|
|
127
|
+
<IconButton
|
|
128
|
+
loading
|
|
129
|
+
name="refresh"
|
|
130
|
+
accessibilityLabel="Loading"
|
|
131
|
+
variant="tertiary"
|
|
132
|
+
onClick={console.log}
|
|
133
|
+
/>
|
|
134
|
+
<IconButton
|
|
135
|
+
loading
|
|
136
|
+
name="refresh"
|
|
137
|
+
accessibilityLabel="Loading"
|
|
138
|
+
variant="foregroundMuted"
|
|
139
|
+
onClick={console.log}
|
|
140
|
+
/>
|
|
141
|
+
<IconButton
|
|
142
|
+
loading
|
|
143
|
+
transparent
|
|
144
|
+
name="refresh"
|
|
145
|
+
accessibilityLabel="Loading"
|
|
146
|
+
variant="secondary"
|
|
147
|
+
onClick={console.log}
|
|
148
|
+
/>
|
|
149
|
+
<IconButton loading compact name="refresh" accessibilityLabel="Loading" onClick={console.log} />
|
|
150
|
+
<IconButton
|
|
151
|
+
loading
|
|
152
|
+
name="refresh"
|
|
153
|
+
accessibilityLabel="Loading"
|
|
154
|
+
compact={false}
|
|
155
|
+
onClick={console.log}
|
|
156
|
+
/>
|
|
157
|
+
</HStack>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
##### Interactive loading
|
|
161
|
+
|
|
162
|
+
Toggle loading to simulate an async action. The button’s `accessibilityLabel` can reflect the state (e.g. "Submit form" vs "Processing submission").
|
|
106
163
|
|
|
107
164
|
```jsx live
|
|
108
165
|
function LoadingExample() {
|
|
@@ -143,7 +143,7 @@ function LoadingExample() {
|
|
|
143
143
|
|
|
144
144
|
| Prop | Type | Required | Default | Description |
|
|
145
145
|
| --- | --- | --- | --- | --- |
|
|
146
|
-
| `primaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & { variant?: ButtonVariant \| undefined; disabled?: boolean \| undefined; loading?: boolean \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: start \| end \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & Omit<PressableBaseProps, children \| testID \| accessibilityLabel \| transparent \| name \| block \| start \| end \| loading \| variant \| startIcon \| startIconActive \| numberOfLines \| disabled \| noScaleOnPress \| compact \| endIcon \| endIconActive \| flush> & { onClick?: MouseEventHandler<Element> \| undefined; }, string \| JSXElementConstructor<any>>` | Yes | `-` | Primary action button |
|
|
146
|
+
| `primaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & { variant?: ButtonVariant \| undefined; disabled?: boolean \| undefined; loading?: boolean \| undefined; progressCircleSize?: number \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: start \| end \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & Omit<PressableBaseProps, children \| testID \| accessibilityLabel \| transparent \| name \| block \| start \| end \| loading \| variant \| startIcon \| startIconActive \| numberOfLines \| disabled \| noScaleOnPress \| progressCircleSize \| compact \| endIcon \| endIconActive \| flush> & { onClick?: MouseEventHandler<Element> \| undefined; }, string \| JSXElementConstructor<any>>` | Yes | `-` | Primary action button |
|
|
147
147
|
| `alignContent` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| space-between \| space-around \| space-evenly>` | No | `-` | - |
|
|
148
148
|
| `alignItems` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
|
|
149
149
|
| `alignSelf` | `ResponsiveProp<center \| normal \| auto \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
|
|
@@ -230,7 +230,7 @@ function LoadingExample() {
|
|
|
230
230
|
| `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
|
|
231
231
|
| `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
|
|
232
232
|
| `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
233
|
-
| `secondaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & { variant?: ButtonVariant; disabled?: boolean \| undefined; loading?: boolean \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: start \| end \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & Omit<PressableBaseProps, children \| testID \| accessibilityLabel \| transparent \| name \| block \| start \| end \| loading \| variant \| startIcon \| startIconActive \| numberOfLines \| disabled \| noScaleOnPress \| compact \| endIcon \| endIconActive \| flush> & { onClick?: MouseEventHandler<Element> \| undefined; }, string \| JSXElementConstructor<any>> \| undefined` | No | `-` | Secondary action button |
|
|
233
|
+
| `secondaryAction` | `ReactElement<SharedProps & Pick<SharedAccessibilityProps, accessibilityLabel> & { variant?: ButtonVariant; disabled?: boolean \| undefined; loading?: boolean \| undefined; progressCircleSize?: number \| undefined; transparent?: boolean \| undefined; block?: boolean \| undefined; compact?: boolean \| undefined; children: ReactNode; start?: ReactNode; startIcon?: IconName \| undefined; startIconActive?: boolean \| undefined; end?: ReactNode; endIcon?: IconName \| undefined; endIconActive?: boolean \| undefined; flush?: start \| end \| undefined; name?: string \| undefined; noScaleOnPress?: boolean \| undefined; numberOfLines?: number \| undefined; } & Omit<PressableBaseProps, children \| testID \| accessibilityLabel \| transparent \| name \| block \| start \| end \| loading \| variant \| startIcon \| startIconActive \| numberOfLines \| disabled \| noScaleOnPress \| progressCircleSize \| compact \| endIcon \| endIconActive \| flush> & { onClick?: MouseEventHandler<Element> \| undefined; }, string \| JSXElementConstructor<any>> \| undefined` | No | `-` | Secondary action button |
|
|
234
234
|
| `style` | `CSSProperties` | No | `-` | - |
|
|
235
235
|
| `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 |
|
|
236
236
|
| `textAlign` | `ResponsiveProp<center \| start \| end \| justify>` | No | `-` | - |
|
|
@@ -163,7 +163,6 @@ function Example() {
|
|
|
163
163
|
|
|
164
164
|
| Prop | Type | Required | Default | Description |
|
|
165
165
|
| --- | --- | --- | --- | --- |
|
|
166
|
-
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
167
166
|
| `className` | `string` | No | `-` | - |
|
|
168
167
|
| `classNames` | `{ root?: string; progress?: string \| undefined; } \| undefined` | No | `-` | Custom class names for individual elements of the ProgressBar component |
|
|
169
168
|
| `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `primary` | Custom progress color. |
|
|
@@ -172,6 +171,7 @@ function Example() {
|
|
|
172
171
|
| `key` | `Key \| null` | No | `-` | - |
|
|
173
172
|
| `onAnimationEnd` | `(() => void)` | No | `-` | Callback fired when the progress animation ends. |
|
|
174
173
|
| `onAnimationStart` | `(() => void)` | No | `-` | Callback fired when the progress animation starts. |
|
|
174
|
+
| `progress` | `number` | No | `-` | Number between 0-1 representing the progress percentage |
|
|
175
175
|
| `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
|
|
176
176
|
| `style` | `CSSProperties` | No | `-` | - |
|
|
177
177
|
| `styles` | `{ root?: CSSProperties; progress?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for individual elements of the ProgressBar component |
|
|
@@ -239,12 +239,12 @@ function Example() {
|
|
|
239
239
|
| Prop | Type | Required | Default | Description |
|
|
240
240
|
| --- | --- | --- | --- | --- |
|
|
241
241
|
| `label` | `number \| { value: number; render: (num: number, disabled?: boolean \| undefined) => ReactNode; }` | Yes | `-` | Label that is floated at the end of the filled in bar. If a number is used then it will format it as a percentage. |
|
|
242
|
-
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
243
242
|
| `className` | `string` | No | `-` | - |
|
|
244
243
|
| `classNames` | `{ root?: string; labelContainer?: string \| undefined; label?: string \| undefined; } \| undefined` | No | `-` | Custom class names for individual elements of the ProgressBarWithFloatLabel component |
|
|
245
244
|
| `disableAnimateOnMount` | `boolean` | No | `false` | Disable animation on component mount |
|
|
246
245
|
| `disabled` | `boolean` | No | `-` | Toggle used to show a disabled progress visualization |
|
|
247
246
|
| `labelPlacement` | `above \| below` | No | `above` | Position of label relative to the bar |
|
|
247
|
+
| `progress` | `number` | No | `-` | Number between 0-1 representing the progress percentage |
|
|
248
248
|
| `style` | `CSSProperties` | No | `-` | - |
|
|
249
249
|
| `styles` | `{ root?: CSSProperties; labelContainer?: CSSProperties \| undefined; label?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for individual elements of the ProgressBarWithFloatLabel component |
|
|
250
250
|
| `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 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ProgressCircle
|
|
2
2
|
|
|
3
|
-
A circular visual indicator of completion progress.
|
|
3
|
+
A circular visual indicator of completion progress. Supports both determinate progress (0–100%) and an indeterminate variant for loading states.
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
@@ -20,6 +20,65 @@ import { ProgressCircle } from '@coinbase/cds-web/visualizations/ProgressCircle'
|
|
|
20
20
|
</HStack>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
### Indeterminate
|
|
24
|
+
|
|
25
|
+
Use the `indeterminate` prop when progress is unknown (e.g. loading). The circle shows a spinning partial arc with no percentage text. This is the recommended replacement for the deprecated [Spinner](/components/feedback/Spinner) in loading contexts such as [IconButton](/components/inputs/IconButton) or button loading states.
|
|
26
|
+
|
|
27
|
+
When `indeterminate` is true, the default color is `fgMuted`; you can override `color` as needed. Always provide `accessibilityLabel` so screen readers announce the loading state.
|
|
28
|
+
|
|
29
|
+
#### Thickness (weight)
|
|
30
|
+
|
|
31
|
+
Indeterminate uses the same `weight` prop as determinate progress. The default is **`"normal"`** (4px stroke). Use `"thin"` (2px), `"semiheavy"` (8px), or `"heavy"` (12px) to change thickness.
|
|
32
|
+
|
|
33
|
+
```jsx live
|
|
34
|
+
<HStack gap={2} flexWrap="wrap" alignItems="center">
|
|
35
|
+
<VStack gap={1} alignItems="center">
|
|
36
|
+
<Text variant="label2">Default (normal)</Text>
|
|
37
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={64} />
|
|
38
|
+
</VStack>
|
|
39
|
+
<VStack gap={1} alignItems="center">
|
|
40
|
+
<Text variant="label2">weight="thin"</Text>
|
|
41
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={64} weight="thin" />
|
|
42
|
+
</VStack>
|
|
43
|
+
<VStack gap={1} alignItems="center">
|
|
44
|
+
<Text variant="label2">weight="semiheavy"</Text>
|
|
45
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={64} weight="semiheavy" />
|
|
46
|
+
</VStack>
|
|
47
|
+
</HStack>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Progress (arc length)
|
|
51
|
+
|
|
52
|
+
When `indeterminate` is true, the **`progress` prop controls the length of the visible arc** (how much of the circle is drawn), not a completion percentage. It defaults to `0.75` (a 270° arc). Override it to change the arc length—e.g. `0.5` for a half circle or `0.25` for a shorter arc.
|
|
53
|
+
|
|
54
|
+
```jsx live
|
|
55
|
+
<HStack gap={2} flexWrap="wrap" alignItems="center">
|
|
56
|
+
<VStack gap={1} alignItems="center">
|
|
57
|
+
<Text variant="label2">progress=0.25</Text>
|
|
58
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate progress={0.25} size={56} />
|
|
59
|
+
</VStack>
|
|
60
|
+
<VStack gap={1} alignItems="center">
|
|
61
|
+
<Text variant="label2">progress=0.5</Text>
|
|
62
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate progress={0.5} size={56} />
|
|
63
|
+
</VStack>
|
|
64
|
+
<VStack gap={1} alignItems="center">
|
|
65
|
+
<Text variant="label2">progress=0.75 (default)</Text>
|
|
66
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate progress={0.75} size={56} />
|
|
67
|
+
</VStack>
|
|
68
|
+
</HStack>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Sizes and color
|
|
72
|
+
|
|
73
|
+
```jsx live
|
|
74
|
+
<HStack gap={2} flexWrap="wrap" alignItems="center">
|
|
75
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={32} />
|
|
76
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={56} />
|
|
77
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate size={100} />
|
|
78
|
+
<ProgressCircle accessibilityLabel="Loading" indeterminate color="bgPrimary" size={56} />
|
|
79
|
+
</HStack>
|
|
80
|
+
```
|
|
81
|
+
|
|
23
82
|
### Thin
|
|
24
83
|
|
|
25
84
|
```jsx live
|
|
@@ -447,7 +506,6 @@ function Example() {
|
|
|
447
506
|
|
|
448
507
|
| Prop | Type | Required | Default | Description |
|
|
449
508
|
| --- | --- | --- | --- | --- |
|
|
450
|
-
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
451
509
|
| `className` | `string` | No | `-` | - |
|
|
452
510
|
| `classNames` | `{ root?: string; svg?: string \| undefined; circle?: string \| undefined; progress?: string \| undefined; } \| undefined` | No | `-` | Custom class names for individual elements of the ProgressCircle component |
|
|
453
511
|
| `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `primary` | Custom progress color. |
|
|
@@ -456,9 +514,11 @@ function Example() {
|
|
|
456
514
|
| `disabled` | `boolean` | No | `-` | Toggle used to show a disabled progress visualization |
|
|
457
515
|
| `hideContent` | `boolean` | No | `-` | Toggle used to hide the content node rendered inside the circle. |
|
|
458
516
|
| `hideText` | `boolean` | No | `-` | - |
|
|
517
|
+
| `indeterminate` | `boolean` | No | `-` | Toggle used to show an indeterminate progress circle. |
|
|
459
518
|
| `key` | `Key \| null` | No | `-` | - |
|
|
460
519
|
| `onAnimationEnd` | `(() => void)` | No | `-` | Callback fired when the progress animation ends. |
|
|
461
520
|
| `onAnimationStart` | `(() => void)` | No | `-` | Callback fired when the progress animation starts. |
|
|
521
|
+
| `progress` | `number` | No | `-` | Number between 0-1 representing the progress percentage |
|
|
462
522
|
| `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
|
|
463
523
|
| `size` | `number` | No | `-` | Optional size in px for the visualization. This is useful if the visualization is used in an HStack. If this is omitted the visualization will fill the parent width or height. Since its a circular visualization it will fill the smaller of the parent width or height |
|
|
464
524
|
| `style` | `CSSProperties` | No | `-` | - |
|
package/mcp-docs/web/routes.txt
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
- [Button](web/components/Button.txt): A pressable button element.
|
|
115
115
|
- [AvatarButton](web/components/AvatarButton.txt): A pressable Avatar.
|
|
116
116
|
- [Spinner](web/components/Spinner.txt): A loading indicator that displays a rotating animation to communicate that content is loading or a background process is in progress.
|
|
117
|
-
- [ProgressCircle](web/components/ProgressCircle.txt): A circular visual indicator of completion progress.
|
|
117
|
+
- [ProgressCircle](web/components/ProgressCircle.txt): A circular visual indicator of completion progress. Supports both determinate progress (0–100%) and an indeterminate variant for loading states.
|
|
118
118
|
- [ProgressBarWithFloatLabel](web/components/ProgressBarWithFloatLabel.txt): A ProgressBar with a floating label that moves with progress.
|
|
119
119
|
- [ProgressBarWithFixedLabels](web/components/ProgressBarWithFixedLabels.txt): A ProgressBar with fixed labels at defined positions.
|
|
120
120
|
- [ProgressBar](web/components/ProgressBar.txt): A visual indicator of completion progress.
|