@tempoxyz/ds 0.3.14 → 0.3.16

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 (209) hide show
  1. package/dist/docs/AGENTS.md +75 -10
  2. package/dist/docs/arsenal.md +44 -0
  3. package/dist/docs/{marketing/introduction/getting-started.md → marketing.md} +32 -24
  4. package/dist/docs/product/components/actions.md +2110 -0
  5. package/dist/docs/product/components/blockchain.md +3969 -0
  6. package/dist/docs/product/components/data-display.md +5901 -0
  7. package/dist/docs/product/components/feedback-and-status.md +4138 -0
  8. package/dist/docs/product/components/forms-and-inputs.md +10543 -0
  9. package/dist/docs/product/components/layout.md +3339 -0
  10. package/dist/docs/product/components/navigation.md +2914 -0
  11. package/dist/docs/product/components/overlays.md +4917 -0
  12. package/dist/docs/product/components.md +125 -125
  13. package/dist/docs/product/foundations.md +4597 -0
  14. package/dist/docs/product/patterns.md +10110 -0
  15. package/dist/marketing/index.js.zyzz.json +1 -1
  16. package/dist/marketing/vars.d.ts +618 -758
  17. package/dist/marketing/vars.d.ts.map +1 -1
  18. package/dist/marketing/vars.js +8 -5
  19. package/dist/marketing/vars.js.map +1 -1
  20. package/dist/marketing/vars.js.zyzz.json +1 -1
  21. package/dist/marketing/zyzz.config.d.ts +3042 -3757
  22. package/dist/marketing/zyzz.config.d.ts.map +1 -1
  23. package/dist/marketing/zyzz.config.js +1 -1
  24. package/dist/marketing/zyzz.config.js.map +1 -1
  25. package/dist/marketing/zyzz.config.js.zyzz.json +1 -1
  26. package/dist/mobile/components/Button.d.ts +115 -15
  27. package/dist/mobile/components/Button.d.ts.map +1 -1
  28. package/dist/mobile/components/Button.js +85 -14
  29. package/dist/mobile/components/Button.js.map +1 -1
  30. package/dist/mobile/components/IconButton.d.ts +129 -40
  31. package/dist/mobile/components/IconButton.d.ts.map +1 -1
  32. package/dist/mobile/components/IconButton.js +97 -28
  33. package/dist/mobile/components/IconButton.js.map +1 -1
  34. package/dist/mobile/components/TextInput.d.ts +132 -11
  35. package/dist/mobile/components/TextInput.d.ts.map +1 -1
  36. package/dist/mobile/components/TextInput.js +115 -14
  37. package/dist/mobile/components/TextInput.js.map +1 -1
  38. package/dist/mobile/index.d.ts +1 -0
  39. package/dist/mobile/index.d.ts.map +1 -1
  40. package/dist/mobile/index.js +1 -0
  41. package/dist/mobile/index.js.map +1 -1
  42. package/dist/mobile/vars.d.ts +103 -0
  43. package/dist/mobile/vars.d.ts.map +1 -1
  44. package/dist/mobile/vars.js +74 -0
  45. package/dist/mobile/vars.js.map +1 -1
  46. package/dist/mobile/zyzz.config.d.ts +408 -0
  47. package/dist/mobile/zyzz.config.d.ts.map +1 -1
  48. package/dist/web/components/AddressCard.js.zyzz.json +1 -1
  49. package/dist/web/components/Amount.css +1 -1
  50. package/dist/web/components/Amount.d.ts +9 -0
  51. package/dist/web/components/Amount.d.ts.map +1 -1
  52. package/dist/web/components/Amount.js +8 -5
  53. package/dist/web/components/Amount.js.map +1 -1
  54. package/dist/web/components/Amount.js.zyzz.json +1 -1
  55. package/dist/web/components/CopyButton.d.ts +6 -0
  56. package/dist/web/components/CopyButton.d.ts.map +1 -1
  57. package/dist/web/components/CopyButton.js +4 -1
  58. package/dist/web/components/CopyButton.js.map +1 -1
  59. package/dist/web/components/CopyButton.js.zyzz.json +1 -1
  60. package/dist/web/components/Hex.css +1 -1
  61. package/dist/web/components/Hex.d.ts +84 -3
  62. package/dist/web/components/Hex.d.ts.map +1 -1
  63. package/dist/web/components/Hex.js +20 -13
  64. package/dist/web/components/Hex.js.map +1 -1
  65. package/dist/web/components/Hex.js.zyzz.json +1 -1
  66. package/dist/web/components/Progress.css +1 -1
  67. package/dist/web/components/Progress.d.ts +12 -2
  68. package/dist/web/components/Progress.d.ts.map +1 -1
  69. package/dist/web/components/Progress.js +9 -5
  70. package/dist/web/components/Progress.js.map +1 -1
  71. package/dist/web/components/Progress.js.zyzz.json +1 -1
  72. package/dist/web/components/SecretValue.js.zyzz.json +1 -1
  73. package/dist/web/components/SidebarMenu.d.ts +4 -4
  74. package/dist/web/components/SidebarMenu.js +6 -6
  75. package/dist/web/components/SidebarMenu.js.map +1 -1
  76. package/dist/web/components/Snippet.js.zyzz.json +1 -1
  77. package/dist/web/index.js.zyzz.json +1 -1
  78. package/package.json +1 -1
  79. package/src/marketing/README.md +1 -1
  80. package/src/marketing/vars.ts +526 -604
  81. package/src/marketing/zyzz.config.ts +5 -4
  82. package/src/mobile/README.md +19 -6
  83. package/src/mobile/components/Button.tsx +94 -17
  84. package/src/mobile/components/IconButton.tsx +122 -30
  85. package/src/mobile/components/TextInput.tsx +139 -24
  86. package/src/mobile/index.ts +1 -0
  87. package/src/mobile/vars.ts +74 -0
  88. package/src/web/components/Amount.tsx +37 -3
  89. package/src/web/components/CopyButton.tsx +8 -0
  90. package/src/web/components/Hex.tsx +79 -13
  91. package/src/web/components/Progress.tsx +8 -2
  92. package/src/web/components/SidebarMenu.tsx +6 -6
  93. package/dist/docs/index.md +0 -145
  94. package/dist/docs/product/components/accordion.md +0 -489
  95. package/dist/docs/product/components/address-card.md +0 -147
  96. package/dist/docs/product/components/agent-logo.md +0 -194
  97. package/dist/docs/product/components/alert-dialog.md +0 -631
  98. package/dist/docs/product/components/alert.md +0 -448
  99. package/dist/docs/product/components/amount-input.md +0 -305
  100. package/dist/docs/product/components/amount.md +0 -794
  101. package/dist/docs/product/components/app-shell.md +0 -559
  102. package/dist/docs/product/components/asset-chip.md +0 -294
  103. package/dist/docs/product/components/autocomplete.md +0 -620
  104. package/dist/docs/product/components/avatar.md +0 -321
  105. package/dist/docs/product/components/badge.md +0 -339
  106. package/dist/docs/product/components/badged-logo.md +0 -116
  107. package/dist/docs/product/components/banner.md +0 -379
  108. package/dist/docs/product/components/bar-chart.md +0 -208
  109. package/dist/docs/product/components/breadcrumbs.md +0 -380
  110. package/dist/docs/product/components/button-group.md +0 -286
  111. package/dist/docs/product/components/button.md +0 -650
  112. package/dist/docs/product/components/calendar.md +0 -375
  113. package/dist/docs/product/components/callout.md +0 -96
  114. package/dist/docs/product/components/checkbox-group.md +0 -521
  115. package/dist/docs/product/components/checkbox.md +0 -467
  116. package/dist/docs/product/components/choice-group.md +0 -516
  117. package/dist/docs/product/components/choicebox.md +0 -641
  118. package/dist/docs/product/components/code.md +0 -100
  119. package/dist/docs/product/components/combobox.md +0 -939
  120. package/dist/docs/product/components/container.md +0 -257
  121. package/dist/docs/product/components/copy-button.md +0 -642
  122. package/dist/docs/product/components/date-picker.md +0 -514
  123. package/dist/docs/product/components/dialog.md +0 -1332
  124. package/dist/docs/product/components/drawer.md +0 -966
  125. package/dist/docs/product/components/empty.md +0 -340
  126. package/dist/docs/product/components/field.md +0 -570
  127. package/dist/docs/product/components/fieldset.md +0 -398
  128. package/dist/docs/product/components/frame.md +0 -434
  129. package/dist/docs/product/components/gauge.md +0 -299
  130. package/dist/docs/product/components/get-started-visual.md +0 -117
  131. package/dist/docs/product/components/grid.md +0 -288
  132. package/dist/docs/product/components/hero-visual.md +0 -155
  133. package/dist/docs/product/components/hex.md +0 -487
  134. package/dist/docs/product/components/icon-tile.md +0 -292
  135. package/dist/docs/product/components/identicon.md +0 -371
  136. package/dist/docs/product/components/inline.md +0 -233
  137. package/dist/docs/product/components/inset.md +0 -225
  138. package/dist/docs/product/components/kbd.md +0 -423
  139. package/dist/docs/product/components/list-group.md +0 -981
  140. package/dist/docs/product/components/loading-dots.md +0 -237
  141. package/dist/docs/product/components/menu.md +0 -934
  142. package/dist/docs/product/components/native-select.md +0 -204
  143. package/dist/docs/product/components/network-logo.md +0 -248
  144. package/dist/docs/product/components/number-field.md +0 -543
  145. package/dist/docs/product/components/otp-field.md +0 -616
  146. package/dist/docs/product/components/pagination.md +0 -516
  147. package/dist/docs/product/components/popover.md +0 -544
  148. package/dist/docs/product/components/progress.md +0 -388
  149. package/dist/docs/product/components/qr.md +0 -314
  150. package/dist/docs/product/components/radio-group.md +0 -528
  151. package/dist/docs/product/components/secret-value.md +0 -406
  152. package/dist/docs/product/components/select.md +0 -751
  153. package/dist/docs/product/components/separator.md +0 -379
  154. package/dist/docs/product/components/sidebar-menu.md +0 -922
  155. package/dist/docs/product/components/skeleton.md +0 -517
  156. package/dist/docs/product/components/slider.md +0 -539
  157. package/dist/docs/product/components/snippet.md +0 -424
  158. package/dist/docs/product/components/spinner.md +0 -216
  159. package/dist/docs/product/components/split-bar.md +0 -139
  160. package/dist/docs/product/components/split-button.md +0 -464
  161. package/dist/docs/product/components/stack.md +0 -299
  162. package/dist/docs/product/components/status-chip.md +0 -226
  163. package/dist/docs/product/components/status-indicator.md +0 -119
  164. package/dist/docs/product/components/status-row.md +0 -174
  165. package/dist/docs/product/components/stepper.md +0 -451
  166. package/dist/docs/product/components/success-hero.md +0 -157
  167. package/dist/docs/product/components/surface.md +0 -639
  168. package/dist/docs/product/components/switch.md +0 -472
  169. package/dist/docs/product/components/table.md +0 -968
  170. package/dist/docs/product/components/tabs.md +0 -627
  171. package/dist/docs/product/components/tempo-logo.md +0 -185
  172. package/dist/docs/product/components/text-input.md +0 -624
  173. package/dist/docs/product/components/textarea.md +0 -352
  174. package/dist/docs/product/components/toast.md +0 -535
  175. package/dist/docs/product/components/token-logo.md +0 -371
  176. package/dist/docs/product/components/token.md +0 -247
  177. package/dist/docs/product/components/tooltip.md +0 -490
  178. package/dist/docs/product/components/verification-code.md +0 -116
  179. package/dist/docs/product/components/visual.md +0 -249
  180. package/dist/docs/product/foundations/accessibility.md +0 -377
  181. package/dist/docs/product/foundations/agents.md +0 -159
  182. package/dist/docs/product/foundations/color.md +0 -522
  183. package/dist/docs/product/foundations/content/tone.md +0 -194
  184. package/dist/docs/product/foundations/content/voice.md +0 -194
  185. package/dist/docs/product/foundations/content/writing-style.md +0 -406
  186. package/dist/docs/product/foundations/iconography.md +0 -282
  187. package/dist/docs/product/foundations/intent.md +0 -360
  188. package/dist/docs/product/foundations/layout.md +0 -508
  189. package/dist/docs/product/foundations/linter.md +0 -523
  190. package/dist/docs/product/foundations/motion.md +0 -151
  191. package/dist/docs/product/foundations/radius-and-padding.md +0 -86
  192. package/dist/docs/product/foundations/typography.md +0 -331
  193. package/dist/docs/product/introduction/faq.md +0 -133
  194. package/dist/docs/product/introduction/getting-started.md +0 -377
  195. package/dist/docs/product/patterns/blockchain-values.md +0 -709
  196. package/dist/docs/product/patterns/dashboards.md +0 -638
  197. package/dist/docs/product/patterns/destructive-actions.md +0 -626
  198. package/dist/docs/product/patterns/empty-states.md +0 -612
  199. package/dist/docs/product/patterns/errors-and-validation.md +0 -808
  200. package/dist/docs/product/patterns/feedback-and-status.md +0 -518
  201. package/dist/docs/product/patterns/forms.md +0 -679
  202. package/dist/docs/product/patterns/loading.md +0 -630
  203. package/dist/docs/product/patterns/navigation.md +0 -397
  204. package/dist/docs/product/patterns/payments.md +0 -765
  205. package/dist/docs/product/patterns/responsive-layout.md +0 -997
  206. package/dist/docs/product/patterns/tables-and-lists.md +0 -1170
  207. package/dist/docs/product/products/tempo-console.md +0 -671
  208. package/dist/docs/product/products/tempo-performance.md +0 -435
  209. package/dist/docs/product/products/tempo-wallet.md +0 -438
@@ -0,0 +1,4138 @@
1
+ # Feedback and Status
2
+
3
+ Each component section states its guidance first, then its Examples and Use Cases. Read a section up to its Examples heading before you use the component, then read the examples it needs.
4
+
5
+ ## Contents
6
+
7
+ Components that report progress, results, and system state.
8
+
9
+ - [Alert](#alert): Shows an inline message tied to nearby content.
10
+ - [Banner](#banner): Shows a full-width message about the system or page.
11
+ - [Callout](#callout): Sets a short passage of body text apart in a subtle box.
12
+ - [Empty](#empty): Fills a region that has nothing to show yet.
13
+ - [Gauge](#gauge): Shows a measurement within a range as a ring.
14
+ - [LoadingDots](#loadingdots): Shows three pulsing dots for inline loading.
15
+ - [Progress](#progress-1): Shows how far a task has advanced.
16
+ - [Skeleton](#skeleton): Holds the place of content while it loads.
17
+ - [Spinner](#spinner): Shows that something is loading.
18
+ - [StatusChip](#statuschip): Names the status of a payment, an authorization, or a network.
19
+ - [StatusIndicator](#statusindicator): Names the status of a system or a service with a dot and a label.
20
+ - [StatusRow](#statusrow): Follows the status of one payment or task while it runs.
21
+ - [Toast](#toast): Shows a brief notification that dismisses itself.
22
+
23
+ ## Alert
24
+
25
+ Shows an inline message tied to nearby content.
26
+
27
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Alert.tsx)
28
+
29
+ Figma: [Alert](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=3056-453)
30
+
31
+ ### Overview
32
+
33
+ An inline message on a tinted container, with a square indicator in the color of its `intent`. It is a live region, so screen readers announce it when it appears.
34
+
35
+ ### Anatomy
36
+
37
+ Import the component and assemble its parts.
38
+
39
+ ```tsx
40
+ import { Alert } from '@tempoxyz/ds'
41
+
42
+ <Alert>
43
+ <Alert.Icon />
44
+ <Alert.Content>
45
+ <Alert.Title />
46
+ <Alert.Action />
47
+ </Alert.Content>
48
+ <Alert.Dismiss />
49
+ </Alert>
50
+ ```
51
+
52
+ ### Guidelines
53
+
54
+ #### When to Use
55
+
56
+ * Explain a condition that affects nearby content, such as higher network fees above the Send payment form.
57
+ * Keep a result visible beside its section, such as a failed webhook delivery.
58
+ * Give guidance before a task, such as a note that testnet tokens have no value.
59
+ * Add optional context with `tip`, such as the token that pays network fees.
60
+
61
+ #### When Not to Use
62
+
63
+ * Use [Banner](#banner) for a message about the whole product or page, such as an outage.
64
+ * Use [Toast](#toast) to confirm that an action finished, such as Payment sent.
65
+ * If an action needs a decision before it continues, use [AlertDialog](overlays.md#alertdialog).
66
+ * Use `Field.Error` from [Field](forms-and-inputs.md#field-1) for a validation message on one input.
67
+ * Use [Badge](data-display.md#badge) for a one-word status on a table row or card, such as Pending.
68
+
69
+ #### Choose an Intent by Severity
70
+
71
+ * **Neutral (default):** Context that needs no action, such as when deposits confirm.
72
+ * **Positive (positive):** A result that stays in place, such as a verified webhook endpoint.
73
+ * **Warning (warning):** An avoidable risk, such as sending to an address new to Tempo.
74
+ * **Negative (negative):** A blocking failure, such as balances that couldn't load.
75
+ * **Tip (tip):** Optional context, such as the token that pays the network fee.
76
+ * **Special (special):** A new feature to announce, such as vaults for idle USDC balances.
77
+
78
+ Use `warning` before a risky step and `negative` before one that can't be undone. Never use `positive` as decoration.
79
+
80
+ #### Pair the Icon With Text That States the Outcome
81
+
82
+ Add `Alert.Icon` to every alert. It draws a square in the color of the intent.
83
+
84
+ **Do:** Combine `Alert.Icon` with a sentence that names the condition.
85
+
86
+ ```tsx
87
+ /**
88
+ * Do example for "Pair the Icon With Text That States the Outcome" on the Alert page.
89
+ * Combine `Alert.Icon` with a sentence that names the condition.
90
+ * @module
91
+ */
92
+ import { Alert } from '@tempoxyz/ds'
93
+
94
+ /** Renders the static preview, which the guideline card shows inert. */
95
+ export function Demo() {
96
+ return (
97
+ <Alert intent="warning">
98
+ <Alert.Icon />
99
+ <Alert.Content>
100
+ Network fees are higher than usual.
101
+ <Alert.Action>Review fees</Alert.Action>
102
+ </Alert.Content>
103
+ </Alert>
104
+ )
105
+ }
106
+ ```
107
+
108
+ **Don't:** Leave out the icon or let the tint carry the warning.
109
+
110
+ ```tsx
111
+ /**
112
+ * Don't example for "Pair the Icon With Text That States the Outcome" on the Alert page.
113
+ * Don't leave out the icon or let the tint carry the warning.
114
+ * @module
115
+ */
116
+ import { Alert } from '@tempoxyz/ds'
117
+
118
+ /** Renders the static preview, which the guideline card shows inert. */
119
+ export function Demo() {
120
+ return (
121
+ <Alert intent="warning">
122
+ <Alert.Content>
123
+ Network fees
124
+ <Alert.Action>Review</Alert.Action>
125
+ </Alert.Content>
126
+ </Alert>
127
+ )
128
+ }
129
+ ```
130
+
131
+ #### Place It Beside What It Describes
132
+
133
+ Remove the alert when its condition ends, such as when fees return to normal. In a [Dialog](overlays.md#dialog), show one alert at full width, below the input it describes.
134
+
135
+ **Do:** Put the alert directly above the form it describes, or directly below its control.
136
+
137
+ ```tsx
138
+ /**
139
+ * Do example for "Place It Beside What It Describes" on the Alert page.
140
+ * Put the callout directly above the form it describes, or directly below its control.
141
+ * @module
142
+ */
143
+ import { Alert, Button, Field, Stack, style, TextInput } from '@tempoxyz/ds'
144
+
145
+ /** Renders the static preview, which the guideline card shows inert. */
146
+ export function Demo() {
147
+ return (
148
+ <Stack gap="16" {...styles.fill()}>
149
+ <div {...styles.activity()}>
150
+ <div {...styles.heading()}>Recent activity</div>
151
+ <div>Sent 25.00 USDC to 0x8f3c…a21b</div>
152
+ <div>Received 120.00 USDC from 0x41d0…9c7e</div>
153
+ </div>
154
+ <Alert intent="warning">
155
+ <Alert.Icon />
156
+ <Alert.Content>Network fees are higher than usual.</Alert.Content>
157
+ </Alert>
158
+ <Field.Root>
159
+ <Field.Label>Amount</Field.Label>
160
+ <TextInput.Group>
161
+ <TextInput.Control defaultValue="50.00" />
162
+ </TextInput.Group>
163
+ </Field.Root>
164
+ <Button>Send payment</Button>
165
+ </Stack>
166
+ )
167
+ }
168
+
169
+ namespace styles {
170
+ export const activity = style({
171
+ color: 'content.secondary',
172
+ display: 'flex',
173
+ flexDirection: 'column',
174
+ gap: '4',
175
+ typography: 'body.b2',
176
+ })
177
+
178
+ export const fill = style({ width: '100% !custom' })
179
+
180
+ export const heading = style({ color: 'content.primary', typography: 'body.b2' })
181
+ }
182
+ ```
183
+
184
+ **Don't:** Place it at the top of a long page, away from its content.
185
+
186
+ ```tsx
187
+ /**
188
+ * Don't example for "Place It Beside What It Describes" on the Alert page.
189
+ * Don't place it at the top of a long page, away from its content.
190
+ * @module
191
+ */
192
+ import { Alert, Button, Field, Stack, style, TextInput } from '@tempoxyz/ds'
193
+
194
+ /** Renders the static preview, which the guideline card shows inert. */
195
+ export function Demo() {
196
+ return (
197
+ <Stack gap="16" {...styles.fill()}>
198
+ <Alert intent="warning">
199
+ <Alert.Icon />
200
+ <Alert.Content>Network fees are higher than usual.</Alert.Content>
201
+ </Alert>
202
+ <div {...styles.activity()}>
203
+ <div {...styles.heading()}>Recent activity</div>
204
+ <div>Sent 25.00 USDC to 0x8f3c…a21b</div>
205
+ <div>Received 120.00 USDC from 0x41d0…9c7e</div>
206
+ </div>
207
+ <Field.Root>
208
+ <Field.Label>Amount</Field.Label>
209
+ <TextInput.Group>
210
+ <TextInput.Control defaultValue="50.00" />
211
+ </TextInput.Group>
212
+ </Field.Root>
213
+ <Button>Send payment</Button>
214
+ </Stack>
215
+ )
216
+ }
217
+
218
+ namespace styles {
219
+ export const activity = style({
220
+ color: 'content.secondary',
221
+ display: 'flex',
222
+ flexDirection: 'column',
223
+ gap: '4',
224
+ typography: 'body.b2',
225
+ })
226
+
227
+ export const fill = style({ width: '100% !custom' })
228
+
229
+ export const heading = style({ color: 'content.primary', typography: 'body.b2' })
230
+ }
231
+ ```
232
+
233
+ #### Offer One Action
234
+
235
+ For more options than one action, link to a page that explains them.
236
+
237
+ **Do:** Offer the one action that resolves the message.
238
+
239
+ ```tsx
240
+ /** Do example for "Offer One Action" on the Alert page: offer the one action that resolves the message. @module */
241
+ import { Alert } from '@tempoxyz/ds'
242
+
243
+ /** Renders the static preview, which the guideline card shows inert. */
244
+ export function Demo() {
245
+ return (
246
+ <Alert intent="negative">
247
+ <Alert.Icon />
248
+ <Alert.Content>
249
+ <Alert.Title>Webhook delivery failed</Alert.Title>
250
+ Your endpoint returned 500.
251
+ <Alert.Action>Retry</Alert.Action>
252
+ </Alert.Content>
253
+ </Alert>
254
+ )
255
+ }
256
+ ```
257
+
258
+ **Don't:** Line up several actions inside one alert.
259
+
260
+ ```tsx
261
+ /**
262
+ * Don't example for "Offer One Action" on the Alert page.
263
+ * Don't line up several actions inside one callout.
264
+ * @module
265
+ */
266
+ import { Alert } from '@tempoxyz/ds'
267
+
268
+ /** Renders the static preview, which the guideline card shows inert. */
269
+ export function Demo() {
270
+ return (
271
+ <Alert intent="negative">
272
+ <Alert.Icon />
273
+ <Alert.Content>
274
+ Webhook delivery failed.
275
+ <Alert.Action>Retry</Alert.Action>
276
+ <Alert.Action>Logs</Alert.Action>
277
+ <Alert.Action>Docs</Alert.Action>
278
+ </Alert.Content>
279
+ </Alert>
280
+ )
281
+ }
282
+ ```
283
+
284
+ To link elsewhere, pass `Alert.Action` a `render` with an `a` element and `nativeButton={false}`.
285
+
286
+ ### Content
287
+
288
+ * Lead with the condition, then the consequence or next step: Network fees are higher than usual. Your payment may take longer to confirm.
289
+ * Keep it to one or two sentences. Add an `Alert.Title` of two or three words, such as New address, when the message needs a label.
290
+ * Describe the condition, not the intent. Write Webhook delivery failed, not Error.
291
+ * Use specific values, such as the amount needed: You need to deposit $25.00 to continue.
292
+ * Start the action label with a verb, such as Review fees or Add funds.
293
+
294
+ ### Accessibility
295
+
296
+ An alert is a live region whose role depends on `intent`. It does not move focus when it appears.
297
+
298
+ #### Semantics
299
+
300
+ * **Neutral, Positive, Tip, and Special (status):** Announced at the next pause.
301
+ * **Warning and Negative (alert):** Interrupts the screen reader.
302
+ * **Role Override (role):** Replaces either default, such as `role="note"` for static text.
303
+ * **Alert.Icon (aria-hidden):** Never announced. The text carries the meaning.
304
+ * **Alert.Action (button):** A native button. Enter and Space activate it.
305
+ * **Contrast (content.primary):** Text stays primary on every tint and scheme. Keep the background.
306
+
307
+ #### Keyboard
308
+
309
+ * **Move to the Action (Tab):** Moves focus to the alert's action, if any.
310
+ * **Activate the Action (Enter or Space):** Activates the action.
311
+
312
+ #### Your Responsibilities
313
+
314
+ * **Reserve Assertive Intents (warning or negative):** They interrupt the screen reader, so use them only for a message the reader must act on.
315
+ * **Insert It When the Condition Occurs:** An alert present on first render may not be announced. Insert it after the failed request.
316
+ * **Render the Region First:** If one alert shows several messages, render the live region before you change its content.
317
+ * **Remove It on Dismiss (onClick):** `Alert.Dismiss` only renders the button. Remove the alert and move focus in `onClick`.
318
+
319
+ ### Related
320
+
321
+ [Banner](#banner)
322
+
323
+ Use for a message about the whole page.
324
+
325
+ [Toast](#toast)
326
+
327
+ Use for confirming a finished action.
328
+
329
+ [Field](forms-and-inputs.md#field-1)
330
+
331
+ Use for validation messages on an input.
332
+
333
+ [Errors and Validation](../patterns.md#errors-and-validation)
334
+
335
+ Covers reporting failures.
336
+
337
+ [Feedback and Status](../patterns.md#feedback-and-status)
338
+
339
+ Covers choosing a message component.
340
+
341
+ ### Examples
342
+
343
+ #### Basic
344
+
345
+ ```tsx
346
+ import { Alert } from '@tempoxyz/ds'
347
+
348
+ export function Demo() {
349
+ return (
350
+ <Alert>
351
+ <Alert.Icon />
352
+ <Alert.Content>Changes may take a few minutes to appear.</Alert.Content>
353
+ </Alert>
354
+ )
355
+ }
356
+ ```
357
+
358
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Alert/Basic.tsx)
359
+
360
+ #### Intent
361
+
362
+ Set `intent` to `neutral` (default), `positive`, `warning`, `negative`, `tip`, or `special`.
363
+
364
+ ```tsx
365
+ import { Alert, style } from '@tempoxyz/ds'
366
+
367
+ export const fill = true
368
+ export function Demo() {
369
+ return (
370
+ <div {...styles.stack()}>
371
+ {(['neutral', 'positive', 'warning', 'negative', 'tip', 'special'] as const).map((intent) => (
372
+ <Alert intent={intent} key={intent}>
373
+ <Alert.Icon />
374
+ <Alert.Content>You need to deposit $25.00 to continue.</Alert.Content>
375
+ </Alert>
376
+ ))}
377
+ </div>
378
+ )
379
+ }
380
+
381
+ namespace styles {
382
+ export const stack = style({
383
+ display: 'flex',
384
+ flexDirection: 'column',
385
+ gap: '12',
386
+ maxWidth: '36rem !custom',
387
+ })
388
+ }
389
+ ```
390
+
391
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Alert/Intent.tsx)
392
+
393
+ #### Title and Action
394
+
395
+ Add an `Alert.Title` above the message, and an `Alert.Action` after it, inside `Alert.Content`.
396
+
397
+ ```tsx
398
+ import { Alert, style } from '@tempoxyz/ds'
399
+
400
+ export const fill = true
401
+ export function Demo() {
402
+ return (
403
+ <Alert intent="warning" {...styles.note()}>
404
+ <Alert.Icon />
405
+ <Alert.Content>
406
+ <Alert.Title>New address</Alert.Title>
407
+ Check the first and last 4 characters.
408
+ <Alert.Action>View details</Alert.Action>
409
+ </Alert.Content>
410
+ </Alert>
411
+ )
412
+ }
413
+
414
+ namespace styles {
415
+ export const note = style({ maxWidth: '24rem !custom' })
416
+ }
417
+ ```
418
+
419
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Alert/Title.tsx)
420
+
421
+ #### Inline
422
+
423
+ The content flows as text, so inline elements such as `strong` stay on the lines of the message.
424
+
425
+ ```tsx
426
+ /** Renders a warning whose message holds inline `strong` text, for the Alert docs. @module */
427
+ import { Alert } from '@tempoxyz/ds'
428
+
429
+ export function Demo() {
430
+ return (
431
+ <Alert intent="warning" role="note">
432
+ <Alert.Icon />
433
+ <Alert.Content>
434
+ Only send <strong>supported stablecoins</strong> on <strong>Tempo</strong>. Sending other
435
+ tokens or using a different network may result in permanent loss.
436
+ </Alert.Content>
437
+ </Alert>
438
+ )
439
+ }
440
+ ```
441
+
442
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Alert/Inline.tsx)
443
+
444
+ #### Dismiss
445
+
446
+ Add an `Alert.Dismiss` after `Alert.Content`. Remove the alert in its `onClick`.
447
+
448
+ ```tsx
449
+ import { Alert, style } from '@tempoxyz/ds'
450
+
451
+ export const fill = true
452
+ export function Demo() {
453
+ return (
454
+ <Alert intent="tip" {...styles.note()}>
455
+ <Alert.Icon />
456
+ <Alert.Content>
457
+ <Alert.Title>Fee token</Alert.Title>
458
+ Fees are paid in USDC. Change it in Settings.
459
+ </Alert.Content>
460
+ <Alert.Dismiss />
461
+ </Alert>
462
+ )
463
+ }
464
+
465
+ namespace styles {
466
+ export const note = style({ maxWidth: '24rem !custom' })
467
+ }
468
+ ```
469
+
470
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Alert/Dismiss.tsx)
471
+
472
+ ## Banner
473
+
474
+ Shows a full-width message about the system or page.
475
+
476
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Banner.tsx)
477
+
478
+ ### Overview
479
+
480
+ A full-width strip for a message about the whole product or page.
481
+
482
+ ### Anatomy
483
+
484
+ Import the component and assemble its parts.
485
+
486
+ ```tsx
487
+ import { Banner } from '@tempoxyz/ds'
488
+
489
+ <Banner>
490
+ <Banner.Content />
491
+ <Banner.Action />
492
+ <Banner.Dismiss />
493
+ </Banner>
494
+ ```
495
+
496
+ ### Guidelines
497
+
498
+ #### When to Use
499
+
500
+ * Report a condition that affects the whole product or page, such as degraded RPC service or paused deposits.
501
+ * Announce maintenance or a change for every account, such as a new webhook retry policy.
502
+ * Mark the environment, such as a testnet build of Tempo Wallet.
503
+
504
+ #### When Not to Use
505
+
506
+ * Use [Alert](#alert) for a message about one section, form, or field.
507
+ * Use [Toast](#toast) to confirm that an action finished, such as Payment sent.
508
+ * If an action needs a decision before it continues, use [AlertDialog](overlays.md#alertdialog).
509
+ * Use `Field.Error` from [Field](forms-and-inputs.md#field-1) for a validation message on one input.
510
+
511
+ #### Choose an Intent by Severity
512
+
513
+ * **Neutral (neutral):** The default. Announcements with no severity, such as a testnet notice.
514
+ * **Info (info):** Context that needs no action now, such as upcoming maintenance.
515
+ * **Positive (positive):** A resolved condition, such as resumed deposits.
516
+ * **Warning (warning):** Degraded service or a step to take soon, such as delayed deposits.
517
+ * **Negative (negative):** An outage or failure that blocks work, such as paused payments.
518
+
519
+ #### State Severity in the Text
520
+
521
+ Banner has no icon part, so the text carries the severity. The `intent` tint doesn't reach screen reader users or forced-colors modes.
522
+
523
+ **Do:** Name the affected feature and the impact, such as delayed deposits.
524
+
525
+ ```tsx
526
+ /**
527
+ * Do example for "State Severity in the Text" on the Banner page.
528
+ * Name the affected feature and the impact, such as delayed deposits.
529
+ * @module
530
+ */
531
+ import { Banner } from '@tempoxyz/ds'
532
+
533
+ /** Renders the static preview, which the guideline card shows inert. */
534
+ export function Demo() {
535
+ return (
536
+ <Banner intent="warning">
537
+ <Banner.Content>Deposits from Ethereum are delayed by about 20 minutes.</Banner.Content>
538
+ <Banner.Action>View status</Banner.Action>
539
+ </Banner>
540
+ )
541
+ }
542
+ ```
543
+
544
+ **Don't:** Rely on the `negative` tint to say that something is broken.
545
+
546
+ ```tsx
547
+ /**
548
+ * Don't example for "State Severity in the Text" on the Banner page.
549
+ * Don't rely on the `negative` tint to say that something is broken.
550
+ * @module
551
+ */
552
+ import { Banner } from '@tempoxyz/ds'
553
+
554
+ /** Renders the static preview, which the guideline card shows inert. */
555
+ export function Demo() {
556
+ return (
557
+ <Banner intent="negative">
558
+ <Banner.Content>Heads up</Banner.Content>
559
+ <Banner.Action>Learn more</Banner.Action>
560
+ </Banner>
561
+ )
562
+ }
563
+ ```
564
+
565
+ #### Show One Banner at a Time
566
+
567
+ Hold the less severe messages until the current one clears. Place the banner above the page header.
568
+
569
+ **Do:** Show the single most urgent banner above the page content.
570
+
571
+ ```tsx
572
+ /**
573
+ * Do example for "Show One Banner at a Time" on the Banner page.
574
+ * Show the single most urgent banner above the page content.
575
+ * @module
576
+ */
577
+ import { Banner, style } from '@tempoxyz/ds'
578
+
579
+ /** Renders the static preview, which the guideline card shows inert. */
580
+ export function Demo() {
581
+ return (
582
+ <div {...styles.page()}>
583
+ <Banner intent="negative">
584
+ <Banner.Content>Payments are paused while we fix an RPC outage.</Banner.Content>
585
+ </Banner>
586
+ <div {...styles.content()}>
587
+ <div {...styles.label()}>Balance</div>
588
+ <div {...styles.value()}>$1,250.00</div>
589
+ </div>
590
+ </div>
591
+ )
592
+ }
593
+
594
+ namespace styles {
595
+ export const content = style({
596
+ display: 'flex',
597
+ flexDirection: 'column',
598
+ gap: '4',
599
+ padding: '16',
600
+ })
601
+
602
+ export const label = style({ color: 'content.secondary', typography: 'body.b3' })
603
+
604
+ export const page = style({ display: 'flex', flexDirection: 'column', width: '100% !custom' })
605
+
606
+ export const value = style({ color: 'content.primary', typography: 'heading.h2' })
607
+ }
608
+ ```
609
+
610
+ **Don't:** Stack several banners of different intents.
611
+
612
+ ```tsx
613
+ /**
614
+ * Don't example for "Show One Banner at a Time" on the Banner page.
615
+ * Don't stack several banners of different intents.
616
+ * @module
617
+ */
618
+ import { Banner, style } from '@tempoxyz/ds'
619
+
620
+ /** Renders the static preview, which the guideline card shows inert. */
621
+ export function Demo() {
622
+ return (
623
+ <div {...styles.page()}>
624
+ <Banner intent="negative">
625
+ <Banner.Content>Payments are paused.</Banner.Content>
626
+ </Banner>
627
+ <Banner intent="info">
628
+ <Banner.Content>Maintenance on Oct 22 at 14:00 UTC.</Banner.Content>
629
+ </Banner>
630
+ <Banner>
631
+ <Banner.Content>Webhooks now retry for 24 hours.</Banner.Content>
632
+ <Banner.Dismiss />
633
+ </Banner>
634
+ </div>
635
+ )
636
+ }
637
+
638
+ namespace styles {
639
+ export const page = style({ display: 'flex', flexDirection: 'column', width: '100% !custom' })
640
+ }
641
+ ```
642
+
643
+ #### Limit Dismissal to Announcements
644
+
645
+ `Banner.Dismiss` only renders the button. Remove the banner in its `onClick`, and store the dismissal so the banner doesn't return on the next page.
646
+
647
+ **Do:** Add `Banner.Dismiss` to announcements and `info` messages.
648
+
649
+ ```tsx
650
+ /**
651
+ * Do example for "Limit Dismissal to Announcements" on the Banner page.
652
+ * Add `Banner.Dismiss` to announcements and `info` messages.
653
+ * @module
654
+ */
655
+ import { Banner, style } from '@tempoxyz/ds'
656
+
657
+ /** Renders the static preview, which the guideline card shows inert. */
658
+ export function Demo() {
659
+ return (
660
+ <div {...styles.page()}>
661
+ <Banner intent="info">
662
+ <Banner.Content>Maintenance starts Oct 22 at 14:00 UTC.</Banner.Content>
663
+ <Banner.Dismiss />
664
+ </Banner>
665
+ </div>
666
+ )
667
+ }
668
+
669
+ namespace styles {
670
+ export const page = style({ display: 'flex', flexDirection: 'column', width: '100% !custom' })
671
+ }
672
+ ```
673
+
674
+ **Don't:** Let people dismiss an active outage. Remove the banner when the condition ends.
675
+
676
+ ```tsx
677
+ /**
678
+ * Don't example for "Limit Dismissal to Announcements" on the Banner page.
679
+ * Don't let people dismiss an active outage. Remove the banner when the condition ends.
680
+ * @module
681
+ */
682
+ import { Banner, style } from '@tempoxyz/ds'
683
+
684
+ /** Renders the static preview, which the guideline card shows inert. */
685
+ export function Demo() {
686
+ return (
687
+ <div {...styles.page()}>
688
+ <Banner intent="negative">
689
+ <Banner.Content>Payments are paused during an RPC outage.</Banner.Content>
690
+ <Banner.Dismiss />
691
+ </Banner>
692
+ </div>
693
+ )
694
+ }
695
+
696
+ namespace styles {
697
+ export const page = style({ display: 'flex', flexDirection: 'column', width: '100% !custom' })
698
+ }
699
+ ```
700
+
701
+ #### Offer One Action
702
+
703
+ **Do:** Add at most one `Banner.Action`, such as View status.
704
+
705
+ ```tsx
706
+ /**
707
+ * Do example for "Offer One Action" on the Banner page.
708
+ * Add at most one `Banner.Action`, such as View status.
709
+ * @module
710
+ */
711
+ import { Banner, style } from '@tempoxyz/ds'
712
+
713
+ /** Renders the static preview, which the guideline card shows inert. */
714
+ export function Demo() {
715
+ return (
716
+ <div {...styles.page()}>
717
+ <Banner intent="warning">
718
+ <Banner.Content>Deposits from Ethereum are delayed by about 20 minutes.</Banner.Content>
719
+ <Banner.Action>View status</Banner.Action>
720
+ </Banner>
721
+ </div>
722
+ )
723
+ }
724
+
725
+ namespace styles {
726
+ export const page = style({ display: 'flex', flexDirection: 'column', width: '100% !custom' })
727
+ }
728
+ ```
729
+
730
+ **Don't:** Add several actions to one banner.
731
+
732
+ ```tsx
733
+ /** Don't example for "Offer One Action" on the Banner page. Don't add several actions to one banner. @module */
734
+ import { Banner, style } from '@tempoxyz/ds'
735
+
736
+ /** Renders the static preview, which the guideline card shows inert. */
737
+ export function Demo() {
738
+ return (
739
+ <div {...styles.page()}>
740
+ <Banner intent="warning">
741
+ <Banner.Content>Deposits are delayed.</Banner.Content>
742
+ <Banner.Action>Status</Banner.Action>
743
+ <Banner.Action>Support</Banner.Action>
744
+ <Banner.Action>Retry</Banner.Action>
745
+ </Banner>
746
+ </div>
747
+ )
748
+ }
749
+
750
+ namespace styles {
751
+ export const page = style({ display: 'flex', flexDirection: 'column', width: '100% !custom' })
752
+ }
753
+ ```
754
+
755
+ ### Content
756
+
757
+ * Lead with what changed and who it affects, then what to do: Deposits from Ethereum are delayed by about 20 minutes.
758
+ * Keep it to one or two short sentences.
759
+ * Give times with a time zone, such as Maintenance starts Oct 22 at 14:00 UTC.
760
+ * Describe the condition, not the intent. Write Payments are paused, not Error or Warning.
761
+ * Name the destination in the action label, such as View status. Avoid Click here and Learn more.
762
+
763
+ ### Accessibility
764
+
765
+ Renders a plain `div` with no role and no live region. The action and dismiss controls are native buttons, and the banner never takes focus.
766
+
767
+ #### Semantics
768
+
769
+ * **Banner (div):** Not a landmark or live region. Screen readers read it in order, so place it before the main content.
770
+ * **Banner.Action (button):** To make it a link, pass `render` with a link and `nativeButton={false}`.
771
+ * **Banner.Dismiss (button):** Named "Dismiss" by default. Its close icon is decorative.
772
+
773
+ #### Keyboard
774
+
775
+ * **Move to the Next Control (Tab):** Focuses the action, then the dismiss button.
776
+ * **Activate the Button (Enter or Space):** Activates the action or the dismiss button.
777
+
778
+ #### Your Responsibilities
779
+
780
+ * **Announce Late Banners (role):** If a banner appears after page load, add `role="status"`, or `role="alert"` for an outage.
781
+ * **Move Focus on Dismiss:** After a dismissal, move focus to the start of the main content.
782
+ * **Name Each Dismiss (aria-label):** If a page has several, name each one, such as "Dismiss maintenance notice".
783
+
784
+ ### Related
785
+
786
+ [Alert](#alert)
787
+
788
+ Use for a message about one section.
789
+
790
+ [Toast](#toast)
791
+
792
+ Use for confirming a finished action.
793
+
794
+ [AlertDialog](overlays.md#alertdialog)
795
+
796
+ Use for a decision before an action continues.
797
+
798
+ [Feedback and Status](../patterns.md#feedback-and-status)
799
+
800
+ Covers choosing a message component.
801
+
802
+ ### Examples
803
+
804
+ #### Basic
805
+
806
+ ```tsx
807
+ import { Banner } from '@tempoxyz/ds'
808
+
809
+ export const fill = true
810
+ export function Demo() {
811
+ return (
812
+ <Banner>
813
+ <Banner.Content>Tempo mainnet is live.</Banner.Content>
814
+ <Banner.Action>Read more</Banner.Action>
815
+ <Banner.Dismiss />
816
+ </Banner>
817
+ )
818
+ }
819
+ ```
820
+
821
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Banner/Basic.tsx)
822
+
823
+ #### Intent
824
+
825
+ Set `intent` to `neutral` (default), `info`, `positive`, `warning`, or `negative`.
826
+
827
+ ```tsx
828
+ import { Banner, style } from '@tempoxyz/ds'
829
+
830
+ export const fill = true
831
+ export function Demo() {
832
+ return (
833
+ <div {...styles.stack()}>
834
+ {(['neutral', 'info', 'positive', 'warning', 'negative'] as const).map((intent) => (
835
+ <Banner intent={intent} key={intent}>
836
+ <Banner.Content>Tempo mainnet is live.</Banner.Content>
837
+ <Banner.Action>Read more</Banner.Action>
838
+ <Banner.Dismiss />
839
+ </Banner>
840
+ ))}
841
+ </div>
842
+ )
843
+ }
844
+
845
+ namespace styles {
846
+ export const stack = style({ display: 'flex', flexDirection: 'column', gap: '8' })
847
+ }
848
+ ```
849
+
850
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Banner/Intent.tsx)
851
+
852
+ ## Callout
853
+
854
+ Sets a short passage of body text apart in a subtle box.
855
+
856
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Callout.tsx)
857
+
858
+ Figma: [Callout](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=3506-2664)
859
+
860
+ ### Overview
861
+
862
+ A callout renders body text in a subtle box, padded 24px above and below and 32px at the sides. It sets a summary or an aside apart from the text around it, and adds no role or announcement.
863
+
864
+ ### Anatomy
865
+
866
+ Import the component and assemble its parts.
867
+
868
+ ```tsx
869
+ import { Callout } from '@tempoxyz/ds'
870
+
871
+ <Callout />
872
+ ```
873
+
874
+ ### Guidelines
875
+
876
+ #### When to Use
877
+
878
+ * Set a summary, a definition, or an aside apart from the body of an article or a docs page.
879
+
880
+ #### When Not to Use
881
+
882
+ * Use an [Alert](#alert) for a message about a status or an outcome.
883
+ * Use a [Banner](#banner) for a message about the whole page or product.
884
+ * Use a [Snippet](data-display.md#snippet) for code that people copy.
885
+
886
+ #### Keep the Passage Optional
887
+
888
+ **Do:** Use it for context that a reader can skip without missing a step.
889
+
890
+ ```tsx
891
+ <Callout style={{ width: 360 }}>
892
+ Tempo settles a payment in under a second, with fees paid in stablecoins.
893
+ </Callout>
894
+ ```
895
+
896
+ **Don't:** Use it for an error or a warning. Use an Alert instead.
897
+
898
+ ```tsx
899
+ <Callout style={{ width: 360 }}>Your payment failed. Check the address and try again.</Callout>
900
+ ```
901
+
902
+ #### Keep One Callout per Section
903
+
904
+ * **One Passage (1):** Sets one passage apart, so the reader notices it among the body text.
905
+ * **Short Text (3 lines):** Holds a few lines at most. Move a longer passage into the body text.
906
+
907
+ ### Content
908
+
909
+ * Write complete sentences in the same voice as the text around the callout.
910
+ * Keep it to one idea in two or three lines.
911
+
912
+ ### Accessibility
913
+
914
+ A callout renders a `<div>` with no role, so screen readers read its text in place.
915
+
916
+ * **Root (div):** Reads its text in place, as part of the surrounding content, with no role.
917
+ * **Landmark (role):** If the callout is an aside, set `role="note"` and an `aria-label` that names it.
918
+ * **Contrast (4.5:1):** Renders primary text on the subtle fill, above 4.5:1 in both color schemes.
919
+
920
+ ### Related
921
+
922
+ [Alert](#alert)
923
+
924
+ Use for a message about a status or an outcome.
925
+
926
+ [Banner](#banner)
927
+
928
+ Use for a message about the whole page.
929
+
930
+ ### Examples
931
+
932
+ #### Basic
933
+
934
+ ```tsx
935
+ import { Callout } from '@tempoxyz/ds'
936
+
937
+ export function Demo() {
938
+ return (
939
+ <Callout>
940
+ Stablecoin payments move fiat-referenced digital assets over blockchain networks. The onchain
941
+ transfer is only one part of the end-to-end payment.
942
+ </Callout>
943
+ )
944
+ }
945
+ ```
946
+
947
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Callout/Basic.tsx)
948
+
949
+ ## Empty
950
+
951
+ Fills a region that has nothing to show yet.
952
+
953
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Empty.tsx)
954
+
955
+ Figma: [Messaging/Progress Panel](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-3967) (`Empty.Root`)
956
+
957
+ ### Overview
958
+
959
+ A centered placeholder with a title, a description, an optional icon, and actions.
960
+
961
+ ### Anatomy
962
+
963
+ Import the component and assemble its parts.
964
+
965
+ ```tsx
966
+ import { Empty } from '@tempoxyz/ds'
967
+
968
+ <Empty.Root>
969
+ <Empty.Icon />
970
+ <Empty.Title />
971
+ <Empty.Description />
972
+ <Empty.Actions />
973
+ </Empty.Root>
974
+ ```
975
+
976
+ ### Guidelines
977
+
978
+ #### When to Use
979
+
980
+ * Fill a list or table with no records yet.
981
+ * Replace results when a search or filter matches nothing.
982
+ * Confirm that a list is clear on purpose, such as a retry queue with nothing left.
983
+
984
+ #### When Not to Use
985
+
986
+ * Use [Skeleton](#skeleton) while the request runs. Show the empty state only after it returns no records.
987
+ * Use a `negative` [Alert](#alert) with a Retry action if the data fails to load.
988
+ * Use `Combobox.Empty` of [Combobox](forms-and-inputs.md#combobox) or `Autocomplete.Empty` of [Autocomplete](forms-and-inputs.md#autocomplete) for a popup list with no matches.
989
+
990
+ #### Explain Why, Then Offer a Next Step
991
+
992
+ * **`Empty.Title`:** States what belongs here.
993
+ * **`Empty.Description`:** States why there is nothing.
994
+ * **`Empty.Actions`:** Holds a [Button](actions.md#button) for the next step.
995
+
996
+ **Do:** Say what will appear and offer the action that adds it.
997
+
998
+ ```tsx
999
+ /**
1000
+ * Do example for "Explain Why, Then Offer a Next Step" on the Empty page.
1001
+ * Say what will appear and offer the action that adds it.
1002
+ * @module
1003
+ */
1004
+ import { Button, Empty } from '@tempoxyz/ds'
1005
+ import { Key } from '@tempoxyz/ds/icons'
1006
+
1007
+ /** Renders the static preview, which the guideline card shows inert. */
1008
+ export function Demo() {
1009
+ return (
1010
+ <Empty.Root>
1011
+ <Empty.Icon>
1012
+ <Key />
1013
+ </Empty.Icon>
1014
+ <Empty.Title>No API keys yet</Empty.Title>
1015
+ <Empty.Description>Create a key to call the Tempo API from your server.</Empty.Description>
1016
+ <Empty.Actions>
1017
+ <Button size="small">Create key</Button>
1018
+ </Empty.Actions>
1019
+ </Empty.Root>
1020
+ )
1021
+ }
1022
+ ```
1023
+
1024
+ **Don't:** Show a bare No data with no reason or next step.
1025
+
1026
+ ```tsx
1027
+ /**
1028
+ * Don't example for "Explain Why, Then Offer a Next Step" on the Empty page.
1029
+ * Don't show a bare No data with no reason or next step.
1030
+ * @module
1031
+ */
1032
+ import { Empty } from '@tempoxyz/ds'
1033
+
1034
+ /** Renders the static preview, which the guideline card shows inert. */
1035
+ export function Demo() {
1036
+ return (
1037
+ <Empty.Root>
1038
+ <Empty.Title>No data</Empty.Title>
1039
+ </Empty.Root>
1040
+ )
1041
+ }
1042
+ ```
1043
+
1044
+ #### Match the Message to the Cause
1045
+
1046
+ * **Nothing Created Yet:** Offer the action that adds the first item.
1047
+ * **No Search Results:** Repeat the query and offer to clear it.
1048
+ * **Filters Exclude All:** Offer to clear the filters.
1049
+ * **Cleared on Purpose:** Offer no action, or a link to the logs.
1050
+
1051
+ #### Offer One Primary Action
1052
+
1053
+ Add a `secondary` button only for a real alternative, such as View docs. Use `size="small"` to match the centered text.
1054
+
1055
+ **Do:** Give `Empty.Actions` one `primary` button that resolves the empty state.
1056
+
1057
+ ```tsx
1058
+ /**
1059
+ * Do example for "Offer One Primary Action" on the Empty page.
1060
+ * Give `Empty.Actions` one `primary` button that resolves the empty state.
1061
+ * @module
1062
+ */
1063
+ import { Button, Empty } from '@tempoxyz/ds'
1064
+ import { Key } from '@tempoxyz/ds/icons'
1065
+
1066
+ /** Renders the static preview, which the guideline card shows inert. */
1067
+ export function Demo() {
1068
+ return (
1069
+ <Empty.Root>
1070
+ <Empty.Icon>
1071
+ <Key />
1072
+ </Empty.Icon>
1073
+ <Empty.Title>No API keys yet</Empty.Title>
1074
+ <Empty.Description>Create a key to call the Tempo API from your server.</Empty.Description>
1075
+ <Empty.Actions>
1076
+ <Button size="small" variant="secondary">
1077
+ View docs
1078
+ </Button>
1079
+ <Button size="small">Create key</Button>
1080
+ </Empty.Actions>
1081
+ </Empty.Root>
1082
+ )
1083
+ }
1084
+ ```
1085
+
1086
+ **Don't:** Offer several `primary` buttons.
1087
+
1088
+ ```tsx
1089
+ /** Don't example for "Offer One Primary Action" on the Empty page. Don't offer several `primary` buttons. @module */
1090
+ import { Button, Empty } from '@tempoxyz/ds'
1091
+ import { Key } from '@tempoxyz/ds/icons'
1092
+
1093
+ /** Renders the static preview, which the guideline card shows inert. */
1094
+ export function Demo() {
1095
+ return (
1096
+ <Empty.Root>
1097
+ <Empty.Icon>
1098
+ <Key />
1099
+ </Empty.Icon>
1100
+ <Empty.Title>No API keys yet</Empty.Title>
1101
+ <Empty.Description>Create a key to call the Tempo API from your server.</Empty.Description>
1102
+ <Empty.Actions>
1103
+ <Button size="small">View docs</Button>
1104
+ <Button size="small">Import key</Button>
1105
+ <Button size="small">Create key</Button>
1106
+ </Empty.Actions>
1107
+ </Empty.Root>
1108
+ )
1109
+ }
1110
+ ```
1111
+
1112
+ #### Keep It Inside the Region It Replaces
1113
+
1114
+ **Do:** Render `Empty.Root` in place of the list or table body. Keep the heading and filters around it.
1115
+
1116
+ ```tsx
1117
+ /**
1118
+ * Do example for "Keep It Inside the Region It Replaces" on the Empty page.
1119
+ * Render `Empty.Root` in place of the list or table body. Keep the heading and filters around it.
1120
+ * @module
1121
+ */
1122
+ import { Empty, style, Surface, TextInput } from '@tempoxyz/ds'
1123
+ import { Search } from '@tempoxyz/ds/icons'
1124
+
1125
+ /** Renders the static preview, which the guideline card shows inert. */
1126
+ export function Demo() {
1127
+ return (
1128
+ <Surface size="medium" {...styles.card()}>
1129
+ <div {...styles.heading()}>Payments</div>
1130
+ <TextInput.Group>
1131
+ <TextInput.Prefix>
1132
+ <Search />
1133
+ </TextInput.Prefix>
1134
+ <TextInput.Control aria-label="Search payments" defaultValue="0x8f3c" />
1135
+ </TextInput.Group>
1136
+ <Empty.Root>
1137
+ <Empty.Title>No results for "0x8f3c"</Empty.Title>
1138
+ <Empty.Description>Check the address, or search by amount.</Empty.Description>
1139
+ </Empty.Root>
1140
+ </Surface>
1141
+ )
1142
+ }
1143
+
1144
+ namespace styles {
1145
+ export const card = style({
1146
+ boxSizing: 'border-box',
1147
+ display: 'flex',
1148
+ flexDirection: 'column',
1149
+ gap: '16',
1150
+ width: '100% !custom',
1151
+ })
1152
+
1153
+ export const heading = style({ color: 'content.primary', typography: 'body.b1Strong' })
1154
+ }
1155
+ ```
1156
+
1157
+ **Don't:** Replace the heading and filters with the empty state.
1158
+
1159
+ ```tsx
1160
+ /**
1161
+ * Don't example for "Keep It Inside the Region It Replaces" on the Empty page.
1162
+ * Don't replace the heading and filters with the empty state.
1163
+ * @module
1164
+ */
1165
+ import { Empty, style, Surface } from '@tempoxyz/ds'
1166
+
1167
+ /** Renders the static preview, which the guideline card shows inert. */
1168
+ export function Demo() {
1169
+ return (
1170
+ <Surface size="medium" {...styles.card()}>
1171
+ <Empty.Root>
1172
+ <Empty.Title>No results for "0x8f3c"</Empty.Title>
1173
+ <Empty.Description>Check the address, or search by amount.</Empty.Description>
1174
+ </Empty.Root>
1175
+ </Surface>
1176
+ )
1177
+ }
1178
+
1179
+ namespace styles {
1180
+ export const card = style({
1181
+ boxSizing: 'border-box',
1182
+ display: 'flex',
1183
+ flexDirection: 'column',
1184
+ gap: '16',
1185
+ width: '100% !custom',
1186
+ })
1187
+ }
1188
+ ```
1189
+
1190
+ Use `Empty.Icon` for an icon that names the content type, such as `Key` for API keys. Leave out status icons such as `AlertTriangle`.
1191
+
1192
+ ### Content
1193
+
1194
+ * **Title:** State what is missing, such as No activity yet, without a period.
1195
+ * **Description:** In one sentence, state when content appears or why it is hidden, such as Transactions appear here once you send or receive. It wraps at 22.5rem.
1196
+ * **Tone:** Avoid blame and jokes. Write No payments match these filters, not You haven't made any payments.
1197
+ * **Action:** Start with a verb and name the object, such as Create key. Avoid Get started.
1198
+
1199
+ ### Accessibility
1200
+
1201
+ An empty state renders plain elements with no ARIA wiring, in the order you compose them.
1202
+
1203
+ #### Semantics
1204
+
1205
+ * **Empty.Title (h3):** Titles the empty state below a section heading.
1206
+ * **Empty.Description (p):** Explains why the area is empty or what to do.
1207
+ * **Empty.Icon (aria-hidden):** A decorative badge that screen readers skip.
1208
+ * **Empty.Actions:** Holds the buttons or links you pass.
1209
+
1210
+ #### Keyboard
1211
+
1212
+ * **Move Through the Actions (Tab):** Moves focus to each action, in order.
1213
+ * **Activate an Action (Enter or Space):** Actions keep native keys and focus outlines.
1214
+
1215
+ #### Your Responsibilities
1216
+
1217
+ * **Keep the Heading Order (h2 then h3):** Put the empty state under a section heading to keep the outline in order (SC 1.3.1).
1218
+ * **Announce New Results (role="status"):** Not a live region. If it replaces results after a search, announce it in a status element.
1219
+
1220
+ ### Related
1221
+
1222
+ [Skeleton](#skeleton)
1223
+
1224
+ Use for content that is still loading.
1225
+
1226
+ [Alert](#alert)
1227
+
1228
+ Use for a failed load with a retry.
1229
+
1230
+ [Button](actions.md#button)
1231
+
1232
+ Use for the action that fills the state.
1233
+
1234
+ [Empty States](../patterns.md#empty-states)
1235
+
1236
+ Covers first-use, no-results, and cleared states.
1237
+
1238
+ ### Examples
1239
+
1240
+ #### Basic
1241
+
1242
+ ```tsx
1243
+ import { Button, Empty } from '@tempoxyz/ds'
1244
+ import { Clipboard } from '@tempoxyz/ds/icons'
1245
+
1246
+ export function Demo() {
1247
+ return (
1248
+ <Empty.Root>
1249
+ <Empty.Icon>
1250
+ <Clipboard />
1251
+ </Empty.Icon>
1252
+ <Empty.Title>No activity yet</Empty.Title>
1253
+ <Empty.Description>Transactions will appear here once you send or receive.</Empty.Description>
1254
+ <Empty.Actions>
1255
+ <Button size="small">Refresh</Button>
1256
+ <Button size="small" variant="secondary">
1257
+ Learn more
1258
+ </Button>
1259
+ </Empty.Actions>
1260
+ </Empty.Root>
1261
+ )
1262
+ }
1263
+ ```
1264
+
1265
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Empty/Basic.tsx)
1266
+
1267
+ #### Progress
1268
+
1269
+ Use a [Spinner](#spinner) instead of the icon while the region waits on another task, such as a checkout in another window. Frame it in a `medium` [Surface](layout.md#surface) for a panel.
1270
+
1271
+ ```tsx
1272
+ /** An empty state in a medium surface that waits on a checkout in another window. @module */
1273
+ import { Empty, Spinner, Surface } from '@tempoxyz/ds'
1274
+
1275
+ export function Demo() {
1276
+ return (
1277
+ <Surface size="medium">
1278
+ <Empty.Root>
1279
+ <Spinner aria-label="Waiting for checkout" />
1280
+ <Empty.Title>Finish checkout in the window that opened</Empty.Title>
1281
+ <Empty.Description>Buying $10.00 of MACH. This updates when it lands.</Empty.Description>
1282
+ </Empty.Root>
1283
+ </Surface>
1284
+ )
1285
+ }
1286
+ ```
1287
+
1288
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Empty/Progress.tsx)
1289
+
1290
+ ## Gauge
1291
+
1292
+ Shows a measurement within a range as a ring.
1293
+
1294
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Gauge.tsx)
1295
+
1296
+ ### Overview
1297
+
1298
+ A gauge is a ring that shows a measurement within a range, such as usage or a score.
1299
+
1300
+ ### Anatomy
1301
+
1302
+ Import the component and assemble its parts.
1303
+
1304
+ ```tsx
1305
+ import { Gauge } from '@tempoxyz/ds'
1306
+
1307
+ <Gauge />
1308
+ ```
1309
+
1310
+ ### Guidelines
1311
+
1312
+ #### When to Use
1313
+
1314
+ * Show how much of a limit is used, such as API requests against a quota.
1315
+ * Show a ratio in a metric tile, such as gas used against the gas limit.
1316
+ * Show a score with a fixed range, such as validator uptime.
1317
+
1318
+ #### When Not to Use
1319
+
1320
+ * Use [Progress](#progress-1) for a task that advances, such as an upload.
1321
+ * Use [Skeleton](#skeleton) or [Spinner](#spinner) while the measurement loads.
1322
+ * Use [Slider](forms-and-inputs.md#slider) when the user sets the value.
1323
+ * Use plain text if the value has no fixed maximum, such as 4,812 TPS.
1324
+
1325
+ #### Show the Value in Text
1326
+
1327
+ Set `showValue` to print the percentage in the ring.
1328
+
1329
+ **Do:** Pair the ring with its label and the absolute values beside it.
1330
+
1331
+ ```tsx
1332
+ /**
1333
+ * Do example for "Show the Value in Text" on the Gauge page.
1334
+ * Pair the ring with its label and the absolute values beside it.
1335
+ * @module
1336
+ */
1337
+ import { Gauge, style } from '@tempoxyz/ds'
1338
+
1339
+ /** Renders the static preview, which the guideline card shows inert. */
1340
+ export function Demo() {
1341
+ return (
1342
+ <div {...styles.row()}>
1343
+ <Gauge aria-labelledby="gauge-requests" max={10000} showValue value={7200} />
1344
+ <div {...styles.text()}>
1345
+ <div {...styles.label()} id="gauge-requests">
1346
+ API requests this month
1347
+ </div>
1348
+ <div {...styles.value()}>7,200 of 10,000</div>
1349
+ </div>
1350
+ </div>
1351
+ )
1352
+ }
1353
+
1354
+ namespace styles {
1355
+ export const label = style({ color: 'content.primary', typography: 'body.b2' })
1356
+
1357
+ export const row = style({ alignItems: 'center', display: 'flex', gap: '12' })
1358
+
1359
+ export const text = style({ display: 'flex', flexDirection: 'column', gap: '4' })
1360
+
1361
+ export const value = style({ color: 'content.secondary', typography: 'body.b3' })
1362
+ }
1363
+ ```
1364
+
1365
+ **Don't:** Show a ring without its value or what it measures.
1366
+
1367
+ ```tsx
1368
+ /**
1369
+ * Don't example for "Show the Value in Text" on the Gauge page.
1370
+ * Don't show a ring without its value or what it measures.
1371
+ * @module
1372
+ */
1373
+ import { Gauge } from '@tempoxyz/ds'
1374
+
1375
+ /** Renders the static preview, which the guideline card shows inert. */
1376
+ export function Demo() {
1377
+ return <Gauge aria-label="Usage" max={10000} value={7200} />
1378
+ }
1379
+ ```
1380
+
1381
+ #### Pass the Real Range
1382
+
1383
+ The ring, `showValue`, and the accessible value derive the percentage from `min` (default 0) and `max` (default 100).
1384
+
1385
+ **Do:** Set `max` to the actual bound, such as `value={7200}` with `max={10000}`.
1386
+
1387
+ ```tsx
1388
+ /**
1389
+ * Do example for "Pass the Real Range" on the Gauge page.
1390
+ * Set `max` to the actual bound, such as `value={7200}` with `max={10000}`.
1391
+ * @module
1392
+ */
1393
+ import { Gauge, style } from '@tempoxyz/ds'
1394
+
1395
+ /** Renders the static preview, which the guideline card shows inert. */
1396
+ export function Demo() {
1397
+ return (
1398
+ <div {...styles.row()}>
1399
+ <Gauge aria-labelledby="gauge-range" max={10000} showValue value={7200} />
1400
+ <div {...styles.text()}>
1401
+ <div {...styles.label()} id="gauge-range">
1402
+ API requests this month
1403
+ </div>
1404
+ <div {...styles.value()}>7,200 of 10,000</div>
1405
+ </div>
1406
+ </div>
1407
+ )
1408
+ }
1409
+
1410
+ namespace styles {
1411
+ export const label = style({ color: 'content.primary', typography: 'body.b2' })
1412
+
1413
+ export const row = style({ alignItems: 'center', display: 'flex', gap: '12' })
1414
+
1415
+ export const text = style({ display: 'flex', flexDirection: 'column', gap: '4' })
1416
+
1417
+ export const value = style({ color: 'content.secondary', typography: 'body.b3' })
1418
+ }
1419
+ ```
1420
+
1421
+ **Don't:** Pass a raw count against the default `max` of 100.
1422
+
1423
+ ```tsx
1424
+ /**
1425
+ * Don't example for "Pass the Real Range" on the Gauge page.
1426
+ * Don't pass a raw count against the default `max` of 100.
1427
+ * @module
1428
+ */
1429
+ import { Gauge, style } from '@tempoxyz/ds'
1430
+
1431
+ /** Renders the static preview, which the guideline card shows inert. */
1432
+ export function Demo() {
1433
+ return (
1434
+ <div {...styles.row()}>
1435
+ <Gauge aria-labelledby="gauge-default" showValue value={7200} />
1436
+ <div {...styles.text()}>
1437
+ <div {...styles.label()} id="gauge-default">
1438
+ API requests this month
1439
+ </div>
1440
+ <div {...styles.value()}>7,200 of 10,000</div>
1441
+ </div>
1442
+ </div>
1443
+ )
1444
+ }
1445
+
1446
+ namespace styles {
1447
+ export const label = style({ color: 'content.primary', typography: 'body.b2' })
1448
+
1449
+ export const row = style({ alignItems: 'center', display: 'flex', gap: '12' })
1450
+
1451
+ export const text = style({ display: 'flex', flexDirection: 'column', gap: '4' })
1452
+
1453
+ export const value = style({ color: 'content.secondary', typography: 'body.b3' })
1454
+ }
1455
+ ```
1456
+
1457
+ #### Choose an Intent
1458
+
1459
+ * **Most Measurements (neutral):** The default, for a measurement such as API requests against a quota.
1460
+ * **Full Is Good (positive):** A measurement where a full value is good, such as 100% uptime.
1461
+ * **Nearing a Limit (Alert):** There is no `warning` intent. Add a `warning` [Alert](#alert) with the next step.
1462
+
1463
+ #### Match Size to Context
1464
+
1465
+ * **Small (32px):** Table cells and dense lists. Print the value beside it.
1466
+ * **Medium (48px):** The default, for metric tiles and cards.
1467
+ * **Large (80px):** A featured measurement, such as plan usage in billing.
1468
+
1469
+ ### Content
1470
+
1471
+ * **Label:** Name the measurement, not the component, such as Gas used.
1472
+
1473
+ ### Accessibility
1474
+
1475
+ A gauge renders a `meter`. It follows the [WAI-ARIA Authoring Practices meter pattern](https://www.w3.org/WAI/ARIA/apg/patterns/meter/). It is not a live region, so a changed value is read only on the next visit.
1476
+
1477
+ #### Semantics
1478
+
1479
+ * **Root (meter):** Reports its minimum, maximum, and value to assistive technology.
1480
+ * **Value Text (72%):** Defaults to the value as a locale-formatted percentage of the range.
1481
+ * **Ring (aria-hidden):** Hidden. Assistive technology reads the value text instead.
1482
+ * **Visible Value (showValue):** Shows the number. It ignores `format`, which changes only the announced text.
1483
+ * **Arc Color (foreground):** Green for positive intent, on a gray track. Keep the gauge on a plain surface.
1484
+ * **Reduced Motion (reduce):** Under reduced motion, the arc doesn't animate between values.
1485
+
1486
+ #### Your Responsibilities
1487
+
1488
+ * **Name the Gauge (SC 4.1.2):** Use `aria-label` or `aria-labelledby`. The gauge renders no label.
1489
+ * **Describe Non-Percentage Values (getAriaValueText):** Use it if a percentage doesn't describe the value, such as "7.2 of 10 GB".
1490
+
1491
+ ### Related
1492
+
1493
+ [Progress](#progress-1)
1494
+
1495
+ Use for a task that advances.
1496
+
1497
+ [Alert](#alert)
1498
+
1499
+ Use for a warning when usage nears a limit.
1500
+
1501
+ [Dashboards](../patterns.md#dashboards)
1502
+
1503
+ Covers laying out metric tiles.
1504
+
1505
+ ### Examples
1506
+
1507
+ #### Basic
1508
+
1509
+ ```tsx
1510
+ import { Gauge } from '@tempoxyz/ds'
1511
+
1512
+ export function Demo() {
1513
+ return <Gauge aria-label="Storage used" showValue value={72} />
1514
+ }
1515
+ ```
1516
+
1517
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Gauge/Basic.tsx)
1518
+
1519
+ #### Intent
1520
+
1521
+ Set `intent` to `neutral` (default) or `positive`.
1522
+
1523
+ ```tsx
1524
+ import { Gauge, style } from '@tempoxyz/ds'
1525
+
1526
+ export function Demo() {
1527
+ return (
1528
+ <div {...styles.row()}>
1529
+ {(['neutral', 'positive'] as const).map((intent, index) => (
1530
+ <Gauge aria-label={intent} intent={intent} key={intent} showValue value={20 + index * 20} />
1531
+ ))}
1532
+ </div>
1533
+ )
1534
+ }
1535
+
1536
+ namespace styles {
1537
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
1538
+ }
1539
+ ```
1540
+
1541
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Gauge/Intent.tsx)
1542
+
1543
+ #### Size
1544
+
1545
+ Set `size` to `small`, `medium` (default), or `large`.
1546
+
1547
+ ```tsx
1548
+ import { Gauge, style } from '@tempoxyz/ds'
1549
+
1550
+ export function Demo() {
1551
+ return (
1552
+ <div {...styles.row()}>
1553
+ <Gauge aria-label="Small" size="small" value={72} />
1554
+ <Gauge aria-label="Medium" size="medium" value={72} />
1555
+ <Gauge aria-label="Large" showValue size="large" value={72} />
1556
+ </div>
1557
+ )
1558
+ }
1559
+
1560
+ namespace styles {
1561
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
1562
+ }
1563
+ ```
1564
+
1565
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Gauge/Size.tsx)
1566
+
1567
+ #### ShowValue
1568
+
1569
+ Set `showValue` to print the value inside the ring.
1570
+
1571
+ ```tsx
1572
+ import { Gauge, style } from '@tempoxyz/ds'
1573
+
1574
+ export function Demo() {
1575
+ return (
1576
+ <div {...styles.row()}>
1577
+ <Gauge aria-label="Hidden value" value={40} />
1578
+ <Gauge aria-label="Shown value" showValue value={40} />
1579
+ </div>
1580
+ )
1581
+ }
1582
+
1583
+ namespace styles {
1584
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
1585
+ }
1586
+ ```
1587
+
1588
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Gauge/ShowValue.tsx)
1589
+
1590
+ ## LoadingDots
1591
+
1592
+ Shows three pulsing dots for inline loading.
1593
+
1594
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/LoadingDots.tsx)
1595
+
1596
+ ### Overview
1597
+
1598
+ LoadingDots renders three pulsing dots inline, such as inside a button or beside text.
1599
+
1600
+ ### Anatomy
1601
+
1602
+ Import the component and assemble its parts.
1603
+
1604
+ ```tsx
1605
+ import { LoadingDots } from '@tempoxyz/ds'
1606
+
1607
+ <LoadingDots />
1608
+ ```
1609
+
1610
+ ### Guidelines
1611
+
1612
+ #### When to Use
1613
+
1614
+ * Show a short wait inside a line of text, such as Estimating network fee.
1615
+ * Hold the place of one inline value, such as an exchange rate or a recipient name.
1616
+
1617
+ #### When Not to Use
1618
+
1619
+ * Use `loading` on a [Button](actions.md#button) while its action runs.
1620
+ * Use [Spinner](#spinner) for a busy region or control.
1621
+ * Use [Skeleton](#skeleton) for content with a known shape, such as rows or cards.
1622
+ * Use [Progress](#progress-1) for measurable work, or any wait longer than about 10 seconds.
1623
+
1624
+ #### Keep Them in Line With Text
1625
+
1626
+ The dots render as an inline `span`, aligned to the middle of the line in the current text color.
1627
+
1628
+ **Do:** Put the dots after the words that describe the wait.
1629
+
1630
+ ```tsx
1631
+ /**
1632
+ * Do example for "Keep Them in Line With Text" on the LoadingDots page.
1633
+ * Put the dots after the words that describe the wait.
1634
+ * @module
1635
+ */
1636
+ import { LoadingDots, style } from '@tempoxyz/ds'
1637
+
1638
+ /** Renders the static preview, which the guideline card shows inert. */
1639
+ export function Demo() {
1640
+ return (
1641
+ <div {...styles.text()}>
1642
+ Estimating network fee <LoadingDots aria-label="Estimating network fee" size="small" />
1643
+ </div>
1644
+ )
1645
+ }
1646
+
1647
+ namespace styles {
1648
+ export const text = style({ color: 'content.secondary', typography: 'body.b2' })
1649
+ }
1650
+ ```
1651
+
1652
+ **Don't:** Fill an empty card with dots in place of its content.
1653
+
1654
+ ```tsx
1655
+ /**
1656
+ * Don't example for "Keep Them in Line With Text" on the LoadingDots page.
1657
+ * Don't fill an empty card with dots in place of its content.
1658
+ * @module
1659
+ */
1660
+ import { LoadingDots, style } from '@tempoxyz/ds'
1661
+
1662
+ /** Renders the static preview, which the guideline card shows inert. */
1663
+ export function Demo() {
1664
+ return (
1665
+ <div {...styles.card()}>
1666
+ <div {...styles.title()}>Activity</div>
1667
+ <div {...styles.body()}>
1668
+ <LoadingDots size="large" />
1669
+ </div>
1670
+ </div>
1671
+ )
1672
+ }
1673
+
1674
+ namespace styles {
1675
+ export const body = style({
1676
+ alignItems: 'center',
1677
+ display: 'flex',
1678
+ height: '100',
1679
+ justifyContent: 'center',
1680
+ })
1681
+
1682
+ export const card = style({
1683
+ borderColor: 'line.secondary',
1684
+ borderRadius: 'xs',
1685
+ borderStyle: 'solid',
1686
+ borderWidth: 'regular',
1687
+ boxSizing: 'border-box',
1688
+ padding: '16',
1689
+ width: '100% !custom',
1690
+ })
1691
+
1692
+ export const title = style({ color: 'content.primary', typography: 'body.b2Strong' })
1693
+ }
1694
+ ```
1695
+
1696
+ #### Show Them Only After a Delay
1697
+
1698
+ * **Fast Responses (Under 300 ms):** Show no dots. Render the value when it arrives.
1699
+ * **Longer Waits (Over 300 ms):** Show the dots after the delay, to avoid a flash.
1700
+
1701
+ #### Replace Them With the Result
1702
+
1703
+ Keep the text length stable so the line does not reflow. If loading fails, show an error message in place of the dots.
1704
+
1705
+ **Do:** Replace the dots with the value when loading finishes.
1706
+
1707
+ ```tsx
1708
+ /**
1709
+ * Do example for "Replace Them With the Result" on the LoadingDots page.
1710
+ * Replace the dots with the value when loading finishes.
1711
+ * @module
1712
+ */
1713
+ import { style } from '@tempoxyz/ds'
1714
+
1715
+ /** Renders the static preview, which the guideline card shows inert. */
1716
+ export function Demo() {
1717
+ return <div {...styles.text()}>Network fee: $0.01</div>
1718
+ }
1719
+
1720
+ namespace styles {
1721
+ export const text = style({ color: 'content.secondary', typography: 'body.b2' })
1722
+ }
1723
+ ```
1724
+
1725
+ **Don't:** Leave the dots beside the value after it arrives.
1726
+
1727
+ ```tsx
1728
+ /**
1729
+ * Don't example for "Replace Them With the Result" on the LoadingDots page.
1730
+ * Don't leave the dots beside the value after it arrives.
1731
+ * @module
1732
+ */
1733
+ import { LoadingDots, style } from '@tempoxyz/ds'
1734
+
1735
+ /** Renders the static preview, which the guideline card shows inert. */
1736
+ export function Demo() {
1737
+ return (
1738
+ <div {...styles.text()}>
1739
+ Network fee: $0.01 <LoadingDots aria-label="Estimating network fee" size="small" />
1740
+ </div>
1741
+ )
1742
+ }
1743
+
1744
+ namespace styles {
1745
+ export const text = style({ color: 'content.secondary', typography: 'body.b2' })
1746
+ }
1747
+ ```
1748
+
1749
+ #### Size Them to the Text
1750
+
1751
+ * **Small (small):** Dense text, such as table cells.
1752
+ * **Medium (medium):** The default, beside body text.
1753
+ * **Large (large):** Beside larger values or headings.
1754
+
1755
+ ### Accessibility
1756
+
1757
+ LoadingDots renders a polite live region named "Loading". The dots carry no text.
1758
+
1759
+ #### Semantics
1760
+
1761
+ * **Root (status):** Announced politely as "Loading" by default, after current speech.
1762
+ * **Custom Name (aria-label):** Replaces the default "Loading" name with a more specific one.
1763
+ * **Reduced Motion (reduce):** If the reader prefers reduced motion, the dots hold still at reduced opacity.
1764
+
1765
+ #### Your Responsibilities
1766
+
1767
+ * **Say What Is Loading (aria-label):** Name it, such as "Estimating network fee", when "Loading" is too vague.
1768
+ * **Keep Visible Text:** The dots are not focusable, and the accessible name is not visible. Keep text beside them.
1769
+ * **Show One per Region:** Many status regions at once, such as one per table row, repeat the announcement.
1770
+ * **Announce the Outcome (SC 4.1.3):** Announce the result or error in a live region when loading finishes.
1771
+
1772
+ ### Related
1773
+
1774
+ [Spinner](#spinner)
1775
+
1776
+ Use for a busy region or control.
1777
+
1778
+ [Skeleton](#skeleton)
1779
+
1780
+ Use for content with a known shape.
1781
+
1782
+ [Button](actions.md#button)
1783
+
1784
+ Use for an action's loading state.
1785
+
1786
+ [Loading](../patterns.md#loading)
1787
+
1788
+ Covers choosing a loading indicator.
1789
+
1790
+ ### Examples
1791
+
1792
+ #### Basic
1793
+
1794
+ ```tsx
1795
+ import { LoadingDots } from '@tempoxyz/ds'
1796
+
1797
+ export function Demo() {
1798
+ return <LoadingDots />
1799
+ }
1800
+ ```
1801
+
1802
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/LoadingDots/Basic.tsx)
1803
+
1804
+ #### Size
1805
+
1806
+ Set `size` to `small`, `medium` (default), or `large`.
1807
+
1808
+ ```tsx
1809
+ import { LoadingDots, style } from '@tempoxyz/ds'
1810
+
1811
+ export function Demo() {
1812
+ return (
1813
+ <div {...styles.row()}>
1814
+ {(['small', 'medium', 'large'] as const).map((size) => (
1815
+ <LoadingDots key={size} size={size} />
1816
+ ))}
1817
+ </div>
1818
+ )
1819
+ }
1820
+
1821
+ namespace styles {
1822
+ export const row = style({ alignItems: 'center', display: 'flex', gap: '24' })
1823
+ }
1824
+ ```
1825
+
1826
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/LoadingDots/Size.tsx)
1827
+
1828
+ ## Progress
1829
+
1830
+ Shows how far a task has advanced.
1831
+
1832
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Progress.tsx)
1833
+
1834
+ Figma: [Progress](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=3048-372) (`Progress.Root`)
1835
+
1836
+ ### Overview
1837
+
1838
+ A bar that fills in the `intent` color as a task advances or a measurement nears its limit, with an optional label and printed value.
1839
+
1840
+ ### Anatomy
1841
+
1842
+ Import the component and assemble its parts.
1843
+
1844
+ ```tsx
1845
+ import { Progress } from '@tempoxyz/ds'
1846
+
1847
+ <Progress.Root>
1848
+ <Progress.Label />
1849
+ <Progress.Value />
1850
+ <Progress.Track>
1851
+ <Progress.Indicator />
1852
+ </Progress.Track>
1853
+ </Progress.Root>
1854
+ ```
1855
+
1856
+ ### Guidelines
1857
+
1858
+ #### When to Use
1859
+
1860
+ * Report measurable work, such as an upload of a payouts CSV or an export of 1,240 transactions.
1861
+ * Count through a batch, such as 3 of 5 payments in a payout run.
1862
+ * Track a long sync with a known end, such as block indexing up to the current height.
1863
+ * Show an indeterminate bar for a named task of unknown length, such as a bridge deposit confirmation.
1864
+ * Show the share of a limit used as a meter, such as an app's daily spending limit.
1865
+
1866
+ #### When Not to Use
1867
+
1868
+ * Use [Gauge](#gauge) for a measurement in a compact ring, such as storage used.
1869
+ * Use [Spinner](#spinner) for a short wait in a region or control.
1870
+ * Use [Skeleton](#skeleton) for content with a known shape.
1871
+ * Use `loading` on a [Button](actions.md#button) while its action runs.
1872
+ * Use [Stepper](navigation.md#stepper) for a fixed sequence of steps, such as account setup.
1873
+
1874
+ #### Show Determinate Progress When You Can Measure It
1875
+
1876
+ A rough count of steps is enough. Keep `value={null}` for work with no measurable end.
1877
+
1878
+ **Do:** Pass a `value` for an upload whose size you know.
1879
+
1880
+ ```tsx
1881
+ /**
1882
+ * Do example for "Show Determinate Progress When You Can Measure It" on the Progress page.
1883
+ * Pass a `value` for an upload whose size you know.
1884
+ * @module
1885
+ */
1886
+ import { Progress, style } from '@tempoxyz/ds'
1887
+
1888
+ /** Renders the static preview, which the guideline card shows inert. */
1889
+ export function Demo() {
1890
+ return (
1891
+ <Progress.Root value={60} {...styles.progress()}>
1892
+ <Progress.Label>Uploading payouts.csv</Progress.Label>
1893
+ <Progress.Value />
1894
+ <Progress.Track>
1895
+ <Progress.Indicator />
1896
+ </Progress.Track>
1897
+ </Progress.Root>
1898
+ )
1899
+ }
1900
+
1901
+ namespace styles {
1902
+ export const progress = style({ maxWidth: '20rem !custom' })
1903
+ }
1904
+ ```
1905
+
1906
+ **Don't:** Show an indeterminate bar for work you can measure.
1907
+
1908
+ ```tsx
1909
+ /**
1910
+ * Don't example for "Show Determinate Progress When You Can Measure It" on the Progress page.
1911
+ * Don't show an indeterminate bar for work you can measure.
1912
+ * @module
1913
+ */
1914
+ import { Progress, style } from '@tempoxyz/ds'
1915
+
1916
+ /** Renders the static preview, which the guideline card shows inert. */
1917
+ export function Demo() {
1918
+ return (
1919
+ <Progress.Root value={null} {...styles.progress()}>
1920
+ <Progress.Label>Uploading payouts.csv</Progress.Label>
1921
+ <Progress.Track>
1922
+ <Progress.Indicator />
1923
+ </Progress.Track>
1924
+ </Progress.Root>
1925
+ )
1926
+ }
1927
+
1928
+ namespace styles {
1929
+ export const progress = style({ maxWidth: '20rem !custom' })
1930
+ }
1931
+ ```
1932
+
1933
+ #### Name the Task
1934
+
1935
+ Add `Progress.Value` to print the percentage, or pass it a function child for units, such as 3 of 5 files. Without a visible label, pass `aria-label`.
1936
+
1937
+ **Do:** Put a `Progress.Label` in every bar.
1938
+
1939
+ ```tsx
1940
+ /** Do example for "Name the Task" on the Progress page: put a `Progress.Label` in every bar. @module */
1941
+ import { Progress, style } from '@tempoxyz/ds'
1942
+
1943
+ /** Renders the static preview, which the guideline card shows inert. */
1944
+ export function Demo() {
1945
+ return (
1946
+ <Progress.Root value={60} {...styles.progress()}>
1947
+ <Progress.Label>Exporting 1,240 transactions</Progress.Label>
1948
+ <Progress.Value />
1949
+ <Progress.Track>
1950
+ <Progress.Indicator />
1951
+ </Progress.Track>
1952
+ </Progress.Root>
1953
+ )
1954
+ }
1955
+
1956
+ namespace styles {
1957
+ export const progress = style({ maxWidth: '20rem !custom' })
1958
+ }
1959
+ ```
1960
+
1961
+ **Don't:** Show a bar without a name for its task.
1962
+
1963
+ ```tsx
1964
+ /** Don't example for "Name the Task" on the Progress page. Don't show a bar without a name for its task. @module */
1965
+ import { Progress, style } from '@tempoxyz/ds'
1966
+
1967
+ /** Renders the static preview, which the guideline card shows inert. */
1968
+ export function Demo() {
1969
+ return (
1970
+ <Progress.Root value={60} {...styles.progress()}>
1971
+ <Progress.Value />
1972
+ <Progress.Track>
1973
+ <Progress.Indicator />
1974
+ </Progress.Track>
1975
+ </Progress.Root>
1976
+ )
1977
+ }
1978
+
1979
+ namespace styles {
1980
+ export const progress = style({ maxWidth: '20rem !custom' })
1981
+ }
1982
+ ```
1983
+
1984
+ #### Move Forward Only
1985
+
1986
+ Use an indeterminate bar for a phase you cannot measure. A meter moves in either direction as its measurement changes.
1987
+
1988
+ **Do:** If a task has phases, such as upload then verification, change the label for each.
1989
+
1990
+ ```tsx
1991
+ /**
1992
+ * Do example for "Move Forward Only" on the Progress page.
1993
+ * If a task has phases, such as upload then verification, change the label for each.
1994
+ * @module
1995
+ */
1996
+ import { Progress, style } from '@tempoxyz/ds'
1997
+
1998
+ /** Renders the static preview, which the guideline card shows inert. */
1999
+ export function Demo() {
2000
+ return (
2001
+ <div {...styles.steps()}>
2002
+ <Progress.Root value={90} {...styles.progress()}>
2003
+ <Progress.Label>Uploading payouts.csv</Progress.Label>
2004
+ <Progress.Value />
2005
+ <Progress.Track>
2006
+ <Progress.Indicator />
2007
+ </Progress.Track>
2008
+ </Progress.Root>
2009
+ <div {...styles.step()}>Then</div>
2010
+ <Progress.Root value={10} {...styles.progress()}>
2011
+ <Progress.Label>Verifying payments</Progress.Label>
2012
+ <Progress.Value />
2013
+ <Progress.Track>
2014
+ <Progress.Indicator />
2015
+ </Progress.Track>
2016
+ </Progress.Root>
2017
+ </div>
2018
+ )
2019
+ }
2020
+
2021
+ namespace styles {
2022
+ export const progress = style({ maxWidth: '20rem !custom' })
2023
+
2024
+ export const step = style({ color: 'content.secondary', typography: 'body.b3' })
2025
+
2026
+ export const steps = style({
2027
+ display: 'flex',
2028
+ flexDirection: 'column',
2029
+ gap: '12',
2030
+ width: '100% !custom',
2031
+ })
2032
+ }
2033
+ ```
2034
+
2035
+ **Don't:** Let the value decrease or restart at 0 under the same label.
2036
+
2037
+ ```tsx
2038
+ /**
2039
+ * Don't example for "Move Forward Only" on the Progress page.
2040
+ * Don't let the value decrease or restart at 0 under the same label.
2041
+ * @module
2042
+ */
2043
+ import { Progress, style } from '@tempoxyz/ds'
2044
+
2045
+ /** Renders the static preview, which the guideline card shows inert. */
2046
+ export function Demo() {
2047
+ return (
2048
+ <div {...styles.steps()}>
2049
+ <Progress.Root value={90} {...styles.progress()}>
2050
+ <Progress.Label>Uploading payouts.csv</Progress.Label>
2051
+ <Progress.Value />
2052
+ <Progress.Track>
2053
+ <Progress.Indicator />
2054
+ </Progress.Track>
2055
+ </Progress.Root>
2056
+ <div {...styles.step()}>Then</div>
2057
+ <Progress.Root value={10} {...styles.progress()}>
2058
+ <Progress.Label>Uploading payouts.csv</Progress.Label>
2059
+ <Progress.Value />
2060
+ <Progress.Track>
2061
+ <Progress.Indicator />
2062
+ </Progress.Track>
2063
+ </Progress.Root>
2064
+ </div>
2065
+ )
2066
+ }
2067
+
2068
+ namespace styles {
2069
+ export const progress = style({ maxWidth: '20rem !custom' })
2070
+
2071
+ export const step = style({ color: 'content.secondary', typography: 'body.b3' })
2072
+
2073
+ export const steps = style({
2074
+ display: 'flex',
2075
+ flexDirection: 'column',
2076
+ gap: '12',
2077
+ width: '100% !custom',
2078
+ })
2079
+ }
2080
+ ```
2081
+
2082
+ #### Report the Outcome
2083
+
2084
+ * **Success (positive):** Set `intent` to `positive` and change the label. Then replace the bar with the result, such as a link to the file.
2085
+ * **Failure (Alert):** Don't turn the bar `negative` for a failed task. Replace it with a `negative` [Alert](#alert) that offers Retry.
2086
+
2087
+ #### State the Reading in Text
2088
+
2089
+ The `warning` and `negative` intents add color, which not every reader perceives.
2090
+
2091
+ **Do:** Print the amount in `Progress.Value`, such as $90.00 of a daily limit.
2092
+
2093
+ ```tsx
2094
+ /** Do example for "State the Reading in Text" on the Progress page: print the amount. @module */
2095
+ import { Progress, style } from '@tempoxyz/ds'
2096
+
2097
+ /** Renders the static preview, which the guideline card shows inert. */
2098
+ export function Demo() {
2099
+ return (
2100
+ <Progress.Root
2101
+ format={{ currency: 'USD', style: 'currency' }}
2102
+ intent="warning"
2103
+ role="meter"
2104
+ value={90}
2105
+ {...styles.progress()}
2106
+ >
2107
+ <Progress.Label>Daily limit</Progress.Label>
2108
+ <Progress.Value />
2109
+ <Progress.Track>
2110
+ <Progress.Indicator />
2111
+ </Progress.Track>
2112
+ </Progress.Root>
2113
+ )
2114
+ }
2115
+
2116
+ namespace styles {
2117
+ export const progress = style({ maxWidth: '20rem !custom' })
2118
+ }
2119
+ ```
2120
+
2121
+ **Don't:** Rely on the `warning` color alone to report a low limit.
2122
+
2123
+ ```tsx
2124
+ /** Don't example for "State the Reading in Text" on the Progress page: color alone. @module */
2125
+ import { Progress, style } from '@tempoxyz/ds'
2126
+
2127
+ /** Renders the static preview, which the guideline card shows inert. */
2128
+ export function Demo() {
2129
+ return (
2130
+ <Progress.Root
2131
+ aria-label="Daily limit"
2132
+ intent="warning"
2133
+ role="meter"
2134
+ value={90}
2135
+ {...styles.progress()}
2136
+ >
2137
+ <Progress.Track>
2138
+ <Progress.Indicator />
2139
+ </Progress.Track>
2140
+ </Progress.Root>
2141
+ )
2142
+ }
2143
+
2144
+ namespace styles {
2145
+ export const progress = style({ maxWidth: '20rem !custom' })
2146
+ }
2147
+ ```
2148
+
2149
+ ### Content
2150
+
2151
+ * **Label:** A verb ending in -ing and its object, such as Uploading payouts.csv.
2152
+ * **Units:** If a percentage hides the size of the job, count files, payments, or blocks.
2153
+ * **Time estimate:** Add one only when it is reliable, and round it, such as About 2 minutes left.
2154
+ * **Meter value:** State the amount and its limit, such as $90.00 of $100.00 per week.
2155
+
2156
+ ### Accessibility
2157
+
2158
+ The bar is not a live region. A changed value is read only when the reader returns to it.
2159
+
2160
+ #### Semantics
2161
+
2162
+ * **Progress.Root (progressbar):** Reports its range and value to assistive technology.
2163
+ * **Value Text (aria-valuetext):** Defaults to a locale percentage, such as "60%". `format` and `getAriaValueText` change it.
2164
+ * **Progress.Label (aria-labelledby):** Names the bar.
2165
+ * **Progress.Value (aria-hidden):** Screen readers skip it and read the value text once.
2166
+ * **Indeterminate Bars (value={null}):** Reports no current value. Under reduced motion, the sliding segment becomes a dimmed full bar.
2167
+ * **Meters (role="meter"):** Reports a measurement, such as a limit used, with the same range, value, and label.
2168
+
2169
+ #### Your Responsibilities
2170
+
2171
+ * **Describe Units (getAriaValueText):** Use it for a value with units, such as "3 of 5 files".
2172
+ * **Announce Completion (SC 4.1.3):** Announce the result, such as "Upload complete", in a status message or toast.
2173
+ * **Keep Label and Value Visible (4px):** The track is thin. The label and value carry the information for anyone who cannot see the fill.
2174
+
2175
+ ### Related
2176
+
2177
+ [Gauge](#gauge)
2178
+
2179
+ Use for a measurement in a compact ring.
2180
+
2181
+ [Spinner](#spinner)
2182
+
2183
+ Use for a short wait of unknown length.
2184
+
2185
+ [Skeleton](#skeleton)
2186
+
2187
+ Use for content with a known shape.
2188
+
2189
+ [Loading](../patterns.md#loading)
2190
+
2191
+ Covers choosing a loading indicator.
2192
+
2193
+ ### Examples
2194
+
2195
+ #### Basic
2196
+
2197
+ ```tsx
2198
+ import { Progress, style } from '@tempoxyz/ds'
2199
+
2200
+ export const fill = true
2201
+ export function Demo() {
2202
+ return (
2203
+ <Progress.Root value={60} {...styles.progress()}>
2204
+ <Progress.Label>Uploading</Progress.Label>
2205
+ <Progress.Value />
2206
+ <Progress.Track>
2207
+ <Progress.Indicator />
2208
+ </Progress.Track>
2209
+ </Progress.Root>
2210
+ )
2211
+ }
2212
+
2213
+ namespace styles {
2214
+ export const progress = style({ maxWidth: '24rem !custom' })
2215
+ }
2216
+ ```
2217
+
2218
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Progress/Basic.tsx)
2219
+
2220
+ #### Intent
2221
+
2222
+ Set `intent` to `neutral` (default), `positive`, `warning`, or `negative`. Use `warning` and `negative` for a meter that nears or reaches its limit.
2223
+
2224
+ ```tsx
2225
+ import { Progress, style } from '@tempoxyz/ds'
2226
+
2227
+ export const fill = true
2228
+ export function Demo() {
2229
+ return (
2230
+ <div {...styles.stack()}>
2231
+ {(['neutral', 'positive', 'warning', 'negative'] as const).map((intent, index) => (
2232
+ <Progress.Root intent={intent} key={intent} value={20 + index * 20}>
2233
+ <Progress.Label>{intent}</Progress.Label>
2234
+ <Progress.Value />
2235
+ <Progress.Track>
2236
+ <Progress.Indicator />
2237
+ </Progress.Track>
2238
+ </Progress.Root>
2239
+ ))}
2240
+ </div>
2241
+ )
2242
+ }
2243
+
2244
+ namespace styles {
2245
+ export const stack = style({
2246
+ display: 'flex',
2247
+ flexDirection: 'column',
2248
+ gap: '16',
2249
+ maxWidth: '24rem !custom',
2250
+ })
2251
+ }
2252
+ ```
2253
+
2254
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Progress/Intent.tsx)
2255
+
2256
+ #### Value
2257
+
2258
+ If the remaining work is unknown, pass `value={null}` for an indeterminate bar.
2259
+
2260
+ ```tsx
2261
+ import { Progress, style } from '@tempoxyz/ds'
2262
+
2263
+ export const fill = true
2264
+ export function Demo() {
2265
+ return (
2266
+ <Progress.Root value={null} {...styles.progress()}>
2267
+ <Progress.Label>Indeterminate</Progress.Label>
2268
+ <Progress.Track>
2269
+ <Progress.Indicator />
2270
+ </Progress.Track>
2271
+ </Progress.Root>
2272
+ )
2273
+ }
2274
+
2275
+ namespace styles {
2276
+ export const progress = style({ maxWidth: '24rem !custom' })
2277
+ }
2278
+ ```
2279
+
2280
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Progress/Value.tsx)
2281
+
2282
+ #### Meter
2283
+
2284
+ If the bar shows a measurement against a limit, such as the share of a spending limit used, pass `role="meter"`. Pass `getAriaValueText` to read the limit too.
2285
+
2286
+ ```tsx
2287
+ import { Progress, style } from '@tempoxyz/ds'
2288
+
2289
+ export const fill = true
2290
+ export function Demo() {
2291
+ return (
2292
+ <div {...styles.stack()}>
2293
+ <Progress.Root
2294
+ format={{ currency: 'USD', style: 'currency' }}
2295
+ getAriaValueText={(value) => `${value} of $100.00 per day`}
2296
+ role="meter"
2297
+ value={20}
2298
+ >
2299
+ <Progress.Label>Daily limit</Progress.Label>
2300
+ <Progress.Value />
2301
+ <Progress.Track>
2302
+ <Progress.Indicator />
2303
+ </Progress.Track>
2304
+ </Progress.Root>
2305
+ <Progress.Root
2306
+ format={{ currency: 'USD', style: 'currency' }}
2307
+ getAriaValueText={(value) => `${value} of $100.00 per week`}
2308
+ intent="warning"
2309
+ role="meter"
2310
+ value={90}
2311
+ >
2312
+ <Progress.Label>Weekly limit</Progress.Label>
2313
+ <Progress.Value />
2314
+ <Progress.Track>
2315
+ <Progress.Indicator />
2316
+ </Progress.Track>
2317
+ </Progress.Root>
2318
+ <Progress.Root
2319
+ format={{ currency: 'USD', style: 'currency' }}
2320
+ getAriaValueText={(value) => `${value} of $100.00 per month`}
2321
+ intent="negative"
2322
+ role="meter"
2323
+ value={100}
2324
+ >
2325
+ <Progress.Label>Monthly limit</Progress.Label>
2326
+ <Progress.Value />
2327
+ <Progress.Track>
2328
+ <Progress.Indicator />
2329
+ </Progress.Track>
2330
+ </Progress.Root>
2331
+ </div>
2332
+ )
2333
+ }
2334
+
2335
+ namespace styles {
2336
+ export const stack = style({
2337
+ display: 'flex',
2338
+ flexDirection: 'column',
2339
+ gap: '16',
2340
+ maxWidth: '24rem !custom',
2341
+ })
2342
+ }
2343
+ ```
2344
+
2345
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Progress/Meter.tsx)
2346
+
2347
+ ## Skeleton
2348
+
2349
+ Holds the place of content while it loads.
2350
+
2351
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Skeleton.tsx)
2352
+
2353
+ ### Overview
2354
+
2355
+ Skeleton renders a loading placeholder at the size of the content it wraps.
2356
+
2357
+ ### Anatomy
2358
+
2359
+ Import the component and assemble its parts.
2360
+
2361
+ ```tsx
2362
+ import { Skeleton } from '@tempoxyz/ds'
2363
+
2364
+ <Skeleton />
2365
+ ```
2366
+
2367
+ ### Guidelines
2368
+
2369
+ #### When to Use
2370
+
2371
+ * Hold the place of content with a known layout, such as balances, activity rows, or metric tiles.
2372
+ * Fill table rows, cards, and lists on first load, with the expected or a typical item count.
2373
+
2374
+ #### When Not to Use
2375
+
2376
+ * Use [Spinner](#spinner) when the shape of the result is unknown, or for a busy control.
2377
+ * Use [Progress](#progress-1) for a long task with measurable work.
2378
+ * Use `loading` on a [Button](actions.md#button) while its action runs.
2379
+ * Use [Empty](#empty) when the request returns no records.
2380
+
2381
+ #### Match the Final Content's Shape
2382
+
2383
+ * **`circle`:** Avatars, identicons, and token icons.
2384
+ * **`pill`:** Pill-shaped controls, such as an extra-small button.
2385
+ * **`default`:** Text, blocks, badges, and buttons.
2386
+
2387
+ For a list, repeat each row's structure instead of one block.
2388
+
2389
+ **Do:** Mirror each row's icon, text lines, and amount.
2390
+
2391
+ ```tsx
2392
+ /**
2393
+ * Do example for "Match the Final Content's Shape" on the Skeleton page.
2394
+ * Mirror each row's icon, text lines, and amount.
2395
+ * @module
2396
+ */
2397
+ import { Skeleton, style } from '@tempoxyz/ds'
2398
+
2399
+ /** Renders the static preview, which the guideline card shows inert. */
2400
+ export function Demo() {
2401
+ return (
2402
+ <div {...styles.list()}>
2403
+ {['0x8f3c…a21b', '0x41d2…9c07', '0xb7e0…3f5a'].map((address) => (
2404
+ <div {...styles.row()} key={address}>
2405
+ <Skeleton shape="circle" style={{ height: 32, width: 32 }} />
2406
+ <div {...styles.text()}>
2407
+ <Skeleton>
2408
+ <div {...styles.title()}>{address}</div>
2409
+ </Skeleton>
2410
+ <Skeleton>
2411
+ <div {...styles.meta()}>Oct 18, 14:02</div>
2412
+ </Skeleton>
2413
+ </div>
2414
+ <Skeleton>
2415
+ <div {...styles.title()}>+50.00 USDC</div>
2416
+ </Skeleton>
2417
+ </div>
2418
+ ))}
2419
+ </div>
2420
+ )
2421
+ }
2422
+
2423
+ namespace styles {
2424
+ export const list = style({ display: 'flex', flexDirection: 'column', gap: '16' })
2425
+
2426
+ export const meta = style({ typography: 'body.b3' })
2427
+
2428
+ export const row = style({ alignItems: 'center', display: 'flex', gap: '12' })
2429
+
2430
+ export const text = style({
2431
+ alignItems: 'flex-start',
2432
+ display: 'flex',
2433
+ flex: '1 !custom',
2434
+ flexDirection: 'column',
2435
+ gap: '4',
2436
+ })
2437
+
2438
+ export const title = style({ typography: 'body.b2' })
2439
+ }
2440
+ ```
2441
+
2442
+ **Don't:** Cover a list with one block that hides its structure.
2443
+
2444
+ ```tsx
2445
+ /**
2446
+ * Don't example for "Match the Final Content's Shape" on the Skeleton page.
2447
+ * Don't cover a list with one block that hides its structure.
2448
+ * @module
2449
+ */
2450
+ import { Skeleton } from '@tempoxyz/ds'
2451
+
2452
+ /** Renders the static preview, which the guideline card shows inert. */
2453
+ export function Demo() {
2454
+ return <Skeleton style={{ height: 144, width: 256 }} />
2455
+ }
2456
+ ```
2457
+
2458
+ #### Wrap the Real Content
2459
+
2460
+ Skeleton takes the size of its children and hides them with `visibility: hidden`. Set `show={false}` when the data arrives, so the content keeps its place in reading order.
2461
+
2462
+ ```tsx
2463
+ <Skeleton show={loading}>
2464
+ <Amount currency="USD" value={balance} />
2465
+ </Skeleton>
2466
+ ```
2467
+
2468
+ Size an empty skeleton with `style` only when there is nothing to wrap.
2469
+
2470
+ **Do:** Wrap the element that holds the data, with a placeholder of typical length.
2471
+
2472
+ ```tsx
2473
+ /**
2474
+ * Do example for "Wrap the Real Content" on the Skeleton page.
2475
+ * Wrap the element that holds the data, with a placeholder of typical length.
2476
+ * @module
2477
+ */
2478
+ import { Skeleton, style } from '@tempoxyz/ds'
2479
+
2480
+ /** Renders the static preview, which the guideline card shows inert. */
2481
+ export function Demo() {
2482
+ return (
2483
+ <div {...styles.card()}>
2484
+ <div {...styles.label()}>Balance</div>
2485
+ <Skeleton>
2486
+ <div {...styles.value()}>1,250.00 USDC</div>
2487
+ </Skeleton>
2488
+ </div>
2489
+ )
2490
+ }
2491
+
2492
+ namespace styles {
2493
+ export const card = style({
2494
+ alignItems: 'flex-start',
2495
+ display: 'flex',
2496
+ flexDirection: 'column',
2497
+ gap: '4',
2498
+ })
2499
+
2500
+ export const label = style({ color: 'content.secondary', typography: 'body.b3' })
2501
+
2502
+ export const value = style({ color: 'content.primary', typography: 'heading.h1' })
2503
+ }
2504
+ ```
2505
+
2506
+ **Don't:** Swap in a separately sized block that doesn't match the content.
2507
+
2508
+ ```tsx
2509
+ /**
2510
+ * Don't example for "Wrap the Real Content" on the Skeleton page.
2511
+ * Don't swap in a separately sized block that doesn't match the content.
2512
+ * @module
2513
+ */
2514
+ import { Skeleton, style } from '@tempoxyz/ds'
2515
+
2516
+ /** Renders the static preview, which the guideline card shows inert. */
2517
+ export function Demo() {
2518
+ return (
2519
+ <div {...styles.card()}>
2520
+ <div {...styles.label()}>Balance</div>
2521
+ <Skeleton style={{ height: 12, width: 80 }} />
2522
+ </div>
2523
+ )
2524
+ }
2525
+
2526
+ namespace styles {
2527
+ export const card = style({
2528
+ alignItems: 'flex-start',
2529
+ display: 'flex',
2530
+ flexDirection: 'column',
2531
+ gap: '4',
2532
+ })
2533
+
2534
+ export const label = style({ color: 'content.secondary', typography: 'body.b3' })
2535
+ }
2536
+ ```
2537
+
2538
+ #### Keep Labels and Controls Visible
2539
+
2540
+ Keep headings, labels, tabs, filters, and buttons that do not depend on the data on screen.
2541
+
2542
+ **Do:** Keep the label and actions, and hold the place of the amount.
2543
+
2544
+ ```tsx
2545
+ /**
2546
+ * Do example for "Keep Labels and Controls Visible" on the Skeleton page.
2547
+ * Keep the label and actions, and hold the place of the amount.
2548
+ * @module
2549
+ */
2550
+ import { Button, Skeleton, style } from '@tempoxyz/ds'
2551
+
2552
+ /** Renders the static preview, which the guideline card shows inert. */
2553
+ export function Demo() {
2554
+ return (
2555
+ <div {...styles.card()}>
2556
+ <div {...styles.label()}>Balance</div>
2557
+ <Skeleton>
2558
+ <div {...styles.value()}>$1,250.00</div>
2559
+ </Skeleton>
2560
+ <div {...styles.actions()}>
2561
+ <Button size="small">Send</Button>
2562
+ <Button size="small" variant="secondary">
2563
+ Receive
2564
+ </Button>
2565
+ </div>
2566
+ </div>
2567
+ )
2568
+ }
2569
+
2570
+ namespace styles {
2571
+ export const actions = style({ display: 'flex', gap: '8', marginBlockStart: '12' })
2572
+
2573
+ export const card = style({
2574
+ alignItems: 'flex-start',
2575
+ display: 'flex',
2576
+ flexDirection: 'column',
2577
+ gap: '4',
2578
+ })
2579
+
2580
+ export const label = style({ color: 'content.secondary', typography: 'body.b3' })
2581
+
2582
+ export const value = style({ color: 'content.primary', typography: 'heading.h1' })
2583
+ }
2584
+ ```
2585
+
2586
+ **Don't:** Turn static labels and buttons into skeletons.
2587
+
2588
+ ```tsx
2589
+ /**
2590
+ * Don't example for "Keep Labels and Controls Visible" on the Skeleton page.
2591
+ * Don't turn static labels and buttons into skeletons.
2592
+ * @module
2593
+ */
2594
+ import { Button, Skeleton, style } from '@tempoxyz/ds'
2595
+
2596
+ /** Renders the static preview, which the guideline card shows inert. */
2597
+ export function Demo() {
2598
+ return (
2599
+ <div {...styles.card()}>
2600
+ <Skeleton>
2601
+ <div {...styles.label()}>Balance</div>
2602
+ </Skeleton>
2603
+ <Skeleton>
2604
+ <div {...styles.value()}>$1,250.00</div>
2605
+ </Skeleton>
2606
+ <div {...styles.actions()}>
2607
+ <Skeleton shape="pill">
2608
+ <Button size="small">Send</Button>
2609
+ </Skeleton>
2610
+ <Skeleton shape="pill">
2611
+ <Button size="small" variant="secondary">
2612
+ Receive
2613
+ </Button>
2614
+ </Skeleton>
2615
+ </div>
2616
+ </div>
2617
+ )
2618
+ }
2619
+
2620
+ namespace styles {
2621
+ export const actions = style({ display: 'flex', gap: '8', marginBlockStart: '12' })
2622
+
2623
+ export const card = style({
2624
+ alignItems: 'flex-start',
2625
+ display: 'flex',
2626
+ flexDirection: 'column',
2627
+ gap: '4',
2628
+ })
2629
+
2630
+ export const label = style({ color: 'content.secondary', typography: 'body.b3' })
2631
+
2632
+ export const value = style({ color: 'content.primary', typography: 'heading.h1' })
2633
+ }
2634
+ ```
2635
+
2636
+ #### Keep Current Data During a Refresh
2637
+
2638
+ **Do:** Keep values on screen, such as a polled balance, until the new ones arrive.
2639
+
2640
+ ```tsx
2641
+ /**
2642
+ * Do example for "Keep Current Data During a Refresh" on the Skeleton page.
2643
+ * Keep values on screen, such as a polled balance, until the new ones arrive.
2644
+ * @module
2645
+ */
2646
+ import { style } from '@tempoxyz/ds'
2647
+
2648
+ const payments = [
2649
+ { address: '0x8f3c…a21b', amount: '+50.00 USDC' },
2650
+ { address: '0x41d2…9c07', amount: '-25.00 USDC' },
2651
+ ]
2652
+
2653
+ /** Renders the static preview, which the guideline card shows inert. */
2654
+ export function Demo() {
2655
+ return (
2656
+ <div {...styles.list()}>
2657
+ <div {...styles.heading()}>Activity</div>
2658
+ {payments.map((payment) => (
2659
+ <div {...styles.row()} key={payment.address}>
2660
+ <div>{payment.address}</div>
2661
+ <div>{payment.amount}</div>
2662
+ </div>
2663
+ ))}
2664
+ </div>
2665
+ )
2666
+ }
2667
+
2668
+ namespace styles {
2669
+ export const heading = style({ color: 'content.primary', typography: 'body.b2Strong' })
2670
+
2671
+ export const list = style({
2672
+ display: 'flex',
2673
+ flexDirection: 'column',
2674
+ gap: '12',
2675
+ width: '100% !custom',
2676
+ })
2677
+
2678
+ export const row = style({
2679
+ alignItems: 'center',
2680
+ display: 'flex',
2681
+ justifyContent: 'space-between',
2682
+ typography: 'body.b2',
2683
+ })
2684
+ }
2685
+ ```
2686
+
2687
+ **Don't:** Return to skeletons on every refresh.
2688
+
2689
+ ```tsx
2690
+ /**
2691
+ * Don't example for "Keep Current Data During a Refresh" on the Skeleton page.
2692
+ * Don't return to skeletons on every refresh.
2693
+ * @module
2694
+ */
2695
+ import { Skeleton, style } from '@tempoxyz/ds'
2696
+
2697
+ const payments = [
2698
+ { address: '0x8f3c…a21b', amount: '+50.00 USDC' },
2699
+ { address: '0x41d2…9c07', amount: '-25.00 USDC' },
2700
+ ]
2701
+
2702
+ /** Renders the static preview, which the guideline card shows inert. */
2703
+ export function Demo() {
2704
+ return (
2705
+ <div {...styles.list()}>
2706
+ <div {...styles.heading()}>Activity</div>
2707
+ {payments.map((payment) => (
2708
+ <div {...styles.row()} key={payment.address}>
2709
+ <Skeleton>
2710
+ <div>{payment.address}</div>
2711
+ </Skeleton>
2712
+ <Skeleton>
2713
+ <div>{payment.amount}</div>
2714
+ </Skeleton>
2715
+ </div>
2716
+ ))}
2717
+ </div>
2718
+ )
2719
+ }
2720
+
2721
+ namespace styles {
2722
+ export const heading = style({ color: 'content.primary', typography: 'body.b2Strong' })
2723
+
2724
+ export const list = style({
2725
+ display: 'flex',
2726
+ flexDirection: 'column',
2727
+ gap: '12',
2728
+ width: '100% !custom',
2729
+ })
2730
+
2731
+ export const row = style({
2732
+ alignItems: 'center',
2733
+ display: 'flex',
2734
+ justifyContent: 'space-between',
2735
+ typography: 'body.b2',
2736
+ })
2737
+ }
2738
+ ```
2739
+
2740
+ #### Skip It for Fast Responses
2741
+
2742
+ * **Fast Responses (Under 300 ms):** Delay the skeleton, so the content renders without a flash.
2743
+ * **Typical Waits (300 ms to 10 s):** Show the skeleton.
2744
+ * **Long Waits (Over 10 s):** Show [Progress](#progress-1). See [Loading](../patterns.md#loading).
2745
+
2746
+ ### Accessibility
2747
+
2748
+ Skeleton renders a `div` that marks its content busy and hides it until `show={false}`. It has no live region, and most screen readers ignore `aria-busy` on a plain `div`.
2749
+
2750
+ #### Semantics
2751
+
2752
+ * **Busy State (aria-busy):** Marks the region busy while `show` is true.
2753
+ * **Hidden Content (visibility: hidden):** Screen readers skip the placeholder text, and focus cannot reach hidden controls.
2754
+ * **Pointer Events:** The root blocks pointer events while it shows, so placeholder buttons are inert.
2755
+ * **Reduced Motion (prefers-reduced-motion):** The sweep stops, and the placeholder stays a static tint.
2756
+
2757
+ #### Your Responsibilities
2758
+
2759
+ * **Announce Long Loads (status):** For main content, state what loads in a status message, such as "Loading activity".
2760
+ * **Handle Failures:** If loading fails, show an error message. Never leave a skeleton that does not resolve.
2761
+
2762
+ ### Related
2763
+
2764
+ [Spinner](#spinner)
2765
+
2766
+ Use for loading with an unknown shape.
2767
+
2768
+ [Progress](#progress-1)
2769
+
2770
+ Use for measurable work.
2771
+
2772
+ [Empty](#empty)
2773
+
2774
+ Use for a region with nothing to show.
2775
+
2776
+ [Loading](../patterns.md#loading)
2777
+
2778
+ Covers choosing a loading indicator.
2779
+
2780
+ ### Examples
2781
+
2782
+ #### Basic
2783
+
2784
+ ```tsx
2785
+ import { Skeleton, style } from '@tempoxyz/ds'
2786
+
2787
+ export function Demo() {
2788
+ return (
2789
+ <div {...styles.row()}>
2790
+ <div {...styles.column()}>
2791
+ <Skeleton style={{ height: 14, width: 160 }} />
2792
+ <Skeleton style={{ height: 14, width: 96 }} />
2793
+ </div>
2794
+ <Skeleton>
2795
+ <p {...styles.text()}>Keeps the size of its content</p>
2796
+ </Skeleton>
2797
+ </div>
2798
+ )
2799
+ }
2800
+
2801
+ namespace styles {
2802
+ export const column = style({ display: 'flex', flexDirection: 'column', gap: '8' })
2803
+
2804
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
2805
+
2806
+ export const text = style({ margin: '0', typography: 'body.b2' })
2807
+ }
2808
+ ```
2809
+
2810
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Skeleton/Basic.tsx)
2811
+
2812
+ #### Shape
2813
+
2814
+ Set `shape` to `default` (default), `pill`, or `circle`.
2815
+
2816
+ ```tsx
2817
+ import { Skeleton, style } from '@tempoxyz/ds'
2818
+
2819
+ export function Demo() {
2820
+ return (
2821
+ <div {...styles.row()}>
2822
+ <Skeleton shape="circle" style={{ height: 40, width: 40 }} />
2823
+ <Skeleton shape="default" style={{ height: 14, width: 160 }} />
2824
+ <Skeleton shape="pill" style={{ height: 32, width: 96 }} />
2825
+ </div>
2826
+ )
2827
+ }
2828
+
2829
+ namespace styles {
2830
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
2831
+ }
2832
+ ```
2833
+
2834
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Skeleton/Shape.tsx)
2835
+
2836
+ #### Show
2837
+
2838
+ Set `show={false}` when data arrives to reveal the content. `show` defaults to `true`.
2839
+
2840
+ ```tsx
2841
+ import { Skeleton, style } from '@tempoxyz/ds'
2842
+
2843
+ export function Demo() {
2844
+ return (
2845
+ <div {...styles.row()}>
2846
+ <Skeleton>
2847
+ <p {...styles.text()}>Loading content</p>
2848
+ </Skeleton>
2849
+ <Skeleton show={false}>
2850
+ <p {...styles.text()}>Loaded content</p>
2851
+ </Skeleton>
2852
+ </div>
2853
+ )
2854
+ }
2855
+
2856
+ namespace styles {
2857
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
2858
+
2859
+ export const text = style({ margin: '0', typography: 'body.b2' })
2860
+ }
2861
+ ```
2862
+
2863
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Skeleton/Show.tsx)
2864
+
2865
+ ## Spinner
2866
+
2867
+ Shows that something is loading.
2868
+
2869
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Spinner.tsx)
2870
+
2871
+ Figma: [Spinner](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=1186-3872)
2872
+
2873
+ ### Overview
2874
+
2875
+ An indeterminate loading indicator whose arc draws in the current text color, optionally on an elevated tile. Pass `aria-label` to name what loads.
2876
+
2877
+ ### Anatomy
2878
+
2879
+ Import the component and assemble its parts.
2880
+
2881
+ ```tsx
2882
+ import { Spinner } from '@tempoxyz/ds'
2883
+
2884
+ <Spinner />
2885
+ ```
2886
+
2887
+ ### Guidelines
2888
+
2889
+ #### When to Use
2890
+
2891
+ * Mark a region busy for a short, unknown time, such as a table that refreshes after a filter change.
2892
+ * Mark a small area that fetches data, such as a quote card or an address lookup.
2893
+ * Hold the place of a result with no predictable shape, such as a quote that returns a price or an error.
2894
+
2895
+ #### When Not to Use
2896
+
2897
+ * Use `loading` on a [Button](actions.md#button) while its action runs, not a spinner beside it.
2898
+ * Use [Skeleton](#skeleton) for content with a known shape, such as activity rows or metric tiles.
2899
+ * Use [Progress](#progress-1) for measurable work, or any wait over about 10 seconds.
2900
+ * Use [LoadingDots](#loadingdots) for a short wait inside a line of text.
2901
+
2902
+ #### Match the Indicator to the Wait
2903
+
2904
+ * **Under About 300 ms (nothing):** Show nothing. Render the result when it arrives.
2905
+ * **About 300 ms to 10 Seconds (Spinner):** Mark the busy region or control.
2906
+ * **Over About 10 Seconds (Progress):** Show a value for measurable work.
2907
+
2908
+ Once a spinner appears, keep it for at least about 500 ms so it doesn't flash. For whole pages, see [Loading](../patterns.md#loading).
2909
+
2910
+ #### Use One Spinner per Region
2911
+
2912
+ **Do:** Center one spinner where the content will appear, and keep loaded content visible.
2913
+
2914
+ ```tsx
2915
+ /**
2916
+ * Do example for "Use One Spinner per Region" on the Spinner page.
2917
+ * Center one spinner where the content will appear, and keep loaded content visible.
2918
+ * @module
2919
+ */
2920
+ import { Spinner, style, Surface } from '@tempoxyz/ds'
2921
+
2922
+ /** Renders the static preview, which the guideline card shows inert. */
2923
+ export function Demo() {
2924
+ return (
2925
+ <div {...styles.page()}>
2926
+ <Surface size="small" {...styles.card()}>
2927
+ <div {...styles.label()}>Balance</div>
2928
+ <div {...styles.value()}>1,250.00 USDC</div>
2929
+ </Surface>
2930
+ <Surface size="small" {...styles.region()}>
2931
+ <Spinner aria-label="Loading activity" />
2932
+ </Surface>
2933
+ </div>
2934
+ )
2935
+ }
2936
+
2937
+ namespace styles {
2938
+ export const card = style({ display: 'flex', flexDirection: 'column', gap: '4' })
2939
+
2940
+ export const label = style({ color: 'content.secondary', typography: 'body.b3' })
2941
+
2942
+ export const page = style({
2943
+ display: 'flex',
2944
+ flexDirection: 'column',
2945
+ gap: '12',
2946
+ width: '100% !custom',
2947
+ })
2948
+
2949
+ export const region = style({
2950
+ alignItems: 'center',
2951
+ display: 'flex',
2952
+ height: '6rem !custom',
2953
+ justifyContent: 'center',
2954
+ })
2955
+
2956
+ export const value = style({ color: 'content.primary', typography: 'heading.h2' })
2957
+ }
2958
+ ```
2959
+
2960
+ **Don't:** Cover the whole page, which blocks content that already loaded.
2961
+
2962
+ ```tsx
2963
+ /**
2964
+ * Don't example for "Use One Spinner per Region" on the Spinner page.
2965
+ * Don't cover the whole page, which blocks content that already loaded.
2966
+ * @module
2967
+ */
2968
+ import { Spinner, style, Surface } from '@tempoxyz/ds'
2969
+
2970
+ /** Renders the static preview, which the guideline card shows inert. */
2971
+ export function Demo() {
2972
+ return (
2973
+ <Surface size="small" {...styles.page()}>
2974
+ <Spinner aria-label="Loading" />
2975
+ </Surface>
2976
+ )
2977
+ }
2978
+
2979
+ namespace styles {
2980
+ export const page = style({
2981
+ alignItems: 'center',
2982
+ boxSizing: 'border-box',
2983
+ display: 'flex',
2984
+ height: '10rem !custom',
2985
+ justifyContent: 'center',
2986
+ width: '100% !custom',
2987
+ })
2988
+ }
2989
+ ```
2990
+
2991
+ #### Place It Beside a Status Line
2992
+
2993
+ Show the spinner inline beside a short status line, such as Approving. For a pending action, use `loading` on a [Button](actions.md#button).
2994
+
2995
+ ### Accessibility
2996
+
2997
+ A spinner renders an indeterminate `progressbar` named "Loading". It is not a live region, so it is read only when the reader reaches it.
2998
+
2999
+ #### Semantics
3000
+
3001
+ * **Root (progressbar):** Named "Loading", with no value, so it reads as indeterminate.
3002
+ * **Custom Name (aria-label):** Replaces the default name.
3003
+ * **Ring (aria-hidden):** A hidden SVG that stops rotating under reduced motion.
3004
+ * **Color (3:1):** Uses the text color. Keep 3:1 contrast against the background.
3005
+
3006
+ #### Your Responsibilities
3007
+
3008
+ * **Say What Is Loading (aria-label):** Name what loads, such as "Loading transactions". Several spinners named "Loading" are indistinguishable.
3009
+ * **Announce the Result (SC 4.1.3):** A spinner isn't announced. Announce the result or an error in a status message or a [Toast](#toast).
3010
+ * **Mark the Region Busy (aria-busy):** Set `aria-busy` on the loading region, so assistive technology waits for its content.
3011
+
3012
+ ### Related
3013
+
3014
+ [Skeleton](#skeleton)
3015
+
3016
+ Use for content with a known shape.
3017
+
3018
+ [Progress](#progress-1)
3019
+
3020
+ Use for measurable work.
3021
+
3022
+ [LoadingDots](#loadingdots)
3023
+
3024
+ Use for a wait inside a line of text.
3025
+
3026
+ [Button](actions.md#button)
3027
+
3028
+ Use for an action's loading state.
3029
+
3030
+ [Loading](../patterns.md#loading)
3031
+
3032
+ Covers choosing a loading indicator.
3033
+
3034
+ ### Examples
3035
+
3036
+ #### Basic
3037
+
3038
+ ```tsx
3039
+ import { Spinner } from '@tempoxyz/ds'
3040
+
3041
+ export function Demo() {
3042
+ return <Spinner aria-label="Loading transactions" />
3043
+ }
3044
+ ```
3045
+
3046
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Spinner/Basic.tsx)
3047
+
3048
+ #### Elevated
3049
+
3050
+ Set `elevated` to place the spinner on a 44px raised tile with a shadow.
3051
+
3052
+ ```tsx
3053
+ import { Spinner } from '@tempoxyz/ds'
3054
+
3055
+ export function Demo() {
3056
+ return <Spinner aria-label="Loading quote" elevated />
3057
+ }
3058
+ ```
3059
+
3060
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Spinner/Elevated.tsx)
3061
+
3062
+ #### Size
3063
+
3064
+ Set `size="40"` for a 40px ring with a thicker stroke, such as a spinner that fills an empty panel.
3065
+
3066
+ ```tsx
3067
+ /** Renders the 16px and 40px spinner rings side by side. @module */
3068
+ import { Spinner } from '@tempoxyz/ds'
3069
+
3070
+ export function Demo() {
3071
+ return (
3072
+ <div style={{ alignItems: 'center', display: 'flex', gap: 24 }}>
3073
+ <Spinner aria-label="Loading balance" />
3074
+ <Spinner aria-label="Loading activity" size="40" />
3075
+ </div>
3076
+ )
3077
+ }
3078
+ ```
3079
+
3080
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Spinner/Size.tsx)
3081
+
3082
+ ## StatusChip
3083
+
3084
+ Names the status of a payment, an authorization, or a network.
3085
+
3086
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/StatusChip.tsx)
3087
+
3088
+ Figma: [Elements/Network Chip](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-3090), [Messaging/Status Chip](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-3776)
3089
+
3090
+ ### Overview
3091
+
3092
+ A status chip renders a short label in a tinted pill, led by a dot in the color of its `intent`. A loading chip replaces the dot with a spinner, for a status that is still in progress. A network chip names a network at a fixed minimum width.
3093
+
3094
+ ### Anatomy
3095
+
3096
+ Import the component and assemble its parts.
3097
+
3098
+ ```tsx
3099
+ import { StatusChip } from '@tempoxyz/ds'
3100
+
3101
+ <StatusChip />
3102
+ ```
3103
+
3104
+ ### Guidelines
3105
+
3106
+ #### When to Use
3107
+
3108
+ * Show where a payment, a deposit, or an authorization stands, such as Pending or Authorized.
3109
+ * Show whether a network is live or a testnet, with `network`.
3110
+
3111
+ #### When Not to Use
3112
+
3113
+ * Use [Badge](data-display.md#badge) for a category or an attribute that is not a status.
3114
+ * Use [Alert](#alert) to explain a status and what to do next.
3115
+ * Use [AssetChip](blockchain.md#assetchip) for the assets a row supports.
3116
+
3117
+ #### Pick the Intent From the Outcome
3118
+
3119
+ * **Positive:** The action is done, or the item is live.
3120
+ * **Warning:** The item waits on a person or a later step.
3121
+ * **Negative:** The action failed and needs attention.
3122
+ * **Neutral:** The item ended without an outcome.
3123
+
3124
+ #### Name Only Statuses
3125
+
3126
+ **Do:** Place the chip at the end of the row whose status it names.
3127
+
3128
+ ```tsx
3129
+ import { ListGroup, StatusChip } from '@tempoxyz/ds'
3130
+
3131
+ export function Demo() {
3132
+ return (
3133
+ <ListGroup variant="boxed">
3134
+ <ListGroup.Row>
3135
+ <ListGroup.Info>
3136
+ <ListGroup.Title>Claude</ListGroup.Title>
3137
+ <ListGroup.Description>$10.00 a month</ListGroup.Description>
3138
+ </ListGroup.Info>
3139
+ <StatusChip intent="positive" size="small">
3140
+ Authorized
3141
+ </StatusChip>
3142
+ </ListGroup.Row>
3143
+ </ListGroup>
3144
+ )
3145
+ }
3146
+ ```
3147
+
3148
+ **Don't:** Use a status chip for a category. Use a [Badge](data-display.md#badge).
3149
+
3150
+ ```tsx
3151
+ import { ListGroup, StatusChip } from '@tempoxyz/ds'
3152
+
3153
+ export function Demo() {
3154
+ return (
3155
+ <ListGroup variant="boxed">
3156
+ <ListGroup.Row>
3157
+ <ListGroup.Info>
3158
+ <ListGroup.Title>Claude</ListGroup.Title>
3159
+ <ListGroup.Description>$10.00 a month</ListGroup.Description>
3160
+ </ListGroup.Info>
3161
+ <StatusChip intent="positive" size="small">
3162
+ Agent
3163
+ </StatusChip>
3164
+ </ListGroup.Row>
3165
+ </ListGroup>
3166
+ )
3167
+ }
3168
+ ```
3169
+
3170
+ ### Content
3171
+
3172
+ #### Write the Status
3173
+
3174
+ Write one or two words that name the state, such as Pending, Live, or Needs approval. Use sentence case, and leave out words such as Status.
3175
+
3176
+ ### Accessibility
3177
+
3178
+ A status chip renders a `<span>` that screen readers read as text in place. The dot and the spinner are hidden, so the label alone carries the status.
3179
+
3180
+ #### Semantics
3181
+
3182
+ * **Root (span):** Screen readers read the label in place, without the dot.
3183
+ * **Loading (aria-hidden):** The spinner is hidden, so screen readers read the label once.
3184
+
3185
+ #### Your Responsibilities
3186
+
3187
+ * **Name the Status in Text (SC 1.4.1):** The intent color is decorative, so the label must name the status.
3188
+ * **Announce a Change (aria-live):** Wrap a chip that changes in place in a polite live region.
3189
+
3190
+ ### Related
3191
+
3192
+ [Badge](data-display.md#badge)
3193
+
3194
+ Use for categories and attributes.
3195
+
3196
+ [Alert](#alert)
3197
+
3198
+ Use for a status that needs an explanation.
3199
+
3200
+ [StatusRow](#statusrow)
3201
+
3202
+ Use for a status that follows a payment in a row.
3203
+
3204
+ ### Examples
3205
+
3206
+ #### Basic
3207
+
3208
+ ```tsx
3209
+ import { StatusChip } from '@tempoxyz/ds'
3210
+
3211
+ export function Demo() {
3212
+ return <StatusChip intent="warning">Pending</StatusChip>
3213
+ }
3214
+ ```
3215
+
3216
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Basic.tsx)
3217
+
3218
+ #### Intent
3219
+
3220
+ Set `intent` to `neutral` (default), `positive`, `warning`, or `negative`.
3221
+
3222
+ ```tsx
3223
+ import { StatusChip, style } from '@tempoxyz/ds'
3224
+
3225
+ export function Demo() {
3226
+ return (
3227
+ <div {...styles.row()}>
3228
+ <StatusChip intent="positive">Authorized</StatusChip>
3229
+ <StatusChip intent="warning">Needs approval</StatusChip>
3230
+ <StatusChip intent="negative">Failed</StatusChip>
3231
+ <StatusChip intent="neutral">Expired</StatusChip>
3232
+ </div>
3233
+ )
3234
+ }
3235
+
3236
+ namespace styles {
3237
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '8' })
3238
+ }
3239
+ ```
3240
+
3241
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Intent.tsx)
3242
+
3243
+ #### Size
3244
+
3245
+ Set `size` to `medium` (28px, default) or `small` (24px).
3246
+
3247
+ ```tsx
3248
+ import { StatusChip, style } from '@tempoxyz/ds'
3249
+
3250
+ export function Demo() {
3251
+ return (
3252
+ <div {...styles.row()}>
3253
+ <StatusChip intent="positive">Live</StatusChip>
3254
+ <StatusChip intent="positive" size="small">
3255
+ Live
3256
+ </StatusChip>
3257
+ </div>
3258
+ )
3259
+ }
3260
+
3261
+ namespace styles {
3262
+ export const row = style({ alignItems: 'center', display: 'flex', gap: '8' })
3263
+ }
3264
+ ```
3265
+
3266
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Size.tsx)
3267
+
3268
+ #### Loading
3269
+
3270
+ Set `loading` for a status in progress, such as Processing.
3271
+
3272
+ ```tsx
3273
+ import { StatusChip } from '@tempoxyz/ds'
3274
+
3275
+ export function Demo() {
3276
+ return <StatusChip loading>Processing</StatusChip>
3277
+ }
3278
+ ```
3279
+
3280
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Loading.tsx)
3281
+
3282
+ #### Network
3283
+
3284
+ Set `network` for a chip that names a network, such as Mainnet or Testnet. It keeps an 80px minimum width, with the dot closer to the label.
3285
+
3286
+ ```tsx
3287
+ import { StatusChip, style } from '@tempoxyz/ds'
3288
+
3289
+ export function Demo() {
3290
+ return (
3291
+ <div {...styles.row()}>
3292
+ <StatusChip intent="positive" network>
3293
+ Mainnet
3294
+ </StatusChip>
3295
+ <StatusChip intent="warning" network>
3296
+ Testnet
3297
+ </StatusChip>
3298
+ </div>
3299
+ )
3300
+ }
3301
+
3302
+ namespace styles {
3303
+ export const row = style({ alignItems: 'center', display: 'flex', gap: '8' })
3304
+ }
3305
+ ```
3306
+
3307
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Network.tsx)
3308
+
3309
+ ## StatusIndicator
3310
+
3311
+ Names the status of a system or a service with a dot and a label.
3312
+
3313
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/StatusIndicator.tsx)
3314
+
3315
+ Figma: [Status indicator](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=3065-474)
3316
+
3317
+ ### Overview
3318
+
3319
+ A status indicator renders a short secondary label, led by an 8px dot in the color of its `intent`. It has no fill, so it sits quietly beside a title or in a list of services.
3320
+
3321
+ ### Anatomy
3322
+
3323
+ Import the component and assemble its parts.
3324
+
3325
+ ```tsx
3326
+ import { StatusIndicator } from '@tempoxyz/ds'
3327
+
3328
+ <StatusIndicator />
3329
+ ```
3330
+
3331
+ ### Guidelines
3332
+
3333
+ #### When to Use
3334
+
3335
+ * Show the live status of a system, a service, or a connection, such as Operational or Degraded.
3336
+
3337
+ #### When Not to Use
3338
+
3339
+ * Use a [StatusChip](#statuschip) for the status of a payment or an authorization.
3340
+ * Use a [Badge](data-display.md#badge) for a category or an attribute.
3341
+ * Use an [Alert](#alert) for a status that needs an explanation.
3342
+
3343
+ #### Match the Intent to the Status
3344
+
3345
+ * **Healthy (positive):** A service that works as expected, such as an online validator.
3346
+ * **Degraded (warning):** A service that works with delays or reduced capacity right now.
3347
+ * **Down (negative):** A service that fails or can't be reached, such as an offline node.
3348
+ * **Idle (neutral):** A service that is paused, idle, or in a state that isn't known yet.
3349
+
3350
+ #### Name the Status in the Label
3351
+
3352
+ **Do:** Name the status in a word, so it doesn't depend on the dot color.
3353
+
3354
+ ```tsx
3355
+ <StatusIndicator intent="negative">Down</StatusIndicator>
3356
+ ```
3357
+
3358
+ **Don't:** Label the dot with the name of the service alone.
3359
+
3360
+ ```tsx
3361
+ <StatusIndicator intent="negative">API</StatusIndicator>
3362
+ ```
3363
+
3364
+ ### Content
3365
+
3366
+ * Keep the label to one or two words in sentence case, such as Operational or Partial outage.
3367
+ * Use one word for one status across a product.
3368
+
3369
+ ### Accessibility
3370
+
3371
+ A status indicator renders a `<span>` with no role. The dot is hidden, so screen readers read the label alone.
3372
+
3373
+ * **Dot (aria-hidden):** Hides the dot from screen readers, so the label carries the status.
3374
+ * **Live Updates (role):** If the status changes in place, set `role="status"` so the change is announced.
3375
+
3376
+ ### Related
3377
+
3378
+ [StatusChip](#statuschip)
3379
+
3380
+ Use for the status of a payment or an authorization.
3381
+
3382
+ [Badge](data-display.md#badge)
3383
+
3384
+ Use for categories and attributes.
3385
+
3386
+ [Alert](#alert)
3387
+
3388
+ Use for a status that needs an explanation.
3389
+
3390
+ ### Examples
3391
+
3392
+ #### Basic
3393
+
3394
+ ```tsx
3395
+ import { StatusIndicator } from '@tempoxyz/ds'
3396
+
3397
+ export function Demo() {
3398
+ return <StatusIndicator intent="positive">Operational</StatusIndicator>
3399
+ }
3400
+ ```
3401
+
3402
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusIndicator/Basic.tsx)
3403
+
3404
+ #### Intent
3405
+
3406
+ Set `intent` to `neutral` (default), `positive`, `warning`, or `negative`. Each colors the dot.
3407
+
3408
+ ```tsx
3409
+ import { StatusIndicator, style } from '@tempoxyz/ds'
3410
+
3411
+ export function Demo() {
3412
+ return (
3413
+ <div {...styles.row()}>
3414
+ <StatusIndicator intent="neutral">Idle</StatusIndicator>
3415
+ <StatusIndicator intent="positive">Operational</StatusIndicator>
3416
+ <StatusIndicator intent="warning">Degraded</StatusIndicator>
3417
+ <StatusIndicator intent="negative">Down</StatusIndicator>
3418
+ </div>
3419
+ )
3420
+ }
3421
+
3422
+ namespace styles {
3423
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
3424
+ }
3425
+ ```
3426
+
3427
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusIndicator/Intent.tsx)
3428
+
3429
+ ## StatusRow
3430
+
3431
+ Follows the status of one payment or task while it runs.
3432
+
3433
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/StatusRow.tsx)
3434
+
3435
+ Figma: [Messaging/Status Row](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-3981)
3436
+
3437
+ ### Overview
3438
+
3439
+ A status row renders a tinted row with a leading mark, a title over a description, and an optional trailing [StatusChip](#statuschip). It announces a change of its text to screen readers, so it can update in place as the task moves on.
3440
+
3441
+ ### Anatomy
3442
+
3443
+ Import the component and assemble its parts.
3444
+
3445
+ ```tsx
3446
+ import { StatusRow } from '@tempoxyz/ds'
3447
+
3448
+ <StatusRow>
3449
+ <StatusRow.Icon />
3450
+ <StatusRow.Content>
3451
+ <StatusRow.Title />
3452
+ <StatusRow.Description />
3453
+ </StatusRow.Content>
3454
+ </StatusRow>
3455
+ ```
3456
+
3457
+ ### Guidelines
3458
+
3459
+ #### When to Use
3460
+
3461
+ * Follow a deposit, a payment, or an authorization that completes within minutes.
3462
+ * Confirm in place that the task finished.
3463
+
3464
+ #### When Not to Use
3465
+
3466
+ * Use [Alert](#alert) for guidance that is not tied to a running task.
3467
+ * Use [Toast](#toast) to confirm an action briefly and out of the flow.
3468
+ * Use [ListGroup](data-display.md#listgroup) for a list of finished payments.
3469
+
3470
+ #### Match the Mark to the State
3471
+
3472
+ * **Running (neutral):** A spinner, with a chip that names the step.
3473
+ * **Done (positive):** A check in the positive color, without a chip.
3474
+
3475
+ #### State the Task and the Wait
3476
+
3477
+ **Do:** Name the amount in the title and the expected wait in the description.
3478
+
3479
+ ```tsx
3480
+ import { Spinner, StatusRow } from '@tempoxyz/ds'
3481
+
3482
+ export function Demo() {
3483
+ return (
3484
+ <StatusRow>
3485
+ <StatusRow.Icon>
3486
+ <Spinner />
3487
+ </StatusRow.Icon>
3488
+ <StatusRow.Content>
3489
+ <StatusRow.Title>Waiting for $10.00</StatusRow.Title>
3490
+ <StatusRow.Description>Usually under a minute on Tempo.</StatusRow.Description>
3491
+ </StatusRow.Content>
3492
+ </StatusRow>
3493
+ )
3494
+ }
3495
+ ```
3496
+
3497
+ **Don't:** Ask people to wait without saying for what or for how long.
3498
+
3499
+ ```tsx
3500
+ import { Spinner, StatusRow } from '@tempoxyz/ds'
3501
+
3502
+ export function Demo() {
3503
+ return (
3504
+ <StatusRow>
3505
+ <StatusRow.Icon>
3506
+ <Spinner />
3507
+ </StatusRow.Icon>
3508
+ <StatusRow.Content>
3509
+ <StatusRow.Title>Please wait</StatusRow.Title>
3510
+ <StatusRow.Description>Something is happening.</StatusRow.Description>
3511
+ </StatusRow.Content>
3512
+ </StatusRow>
3513
+ )
3514
+ }
3515
+ ```
3516
+
3517
+ ### Content
3518
+
3519
+ #### Write the Title and the Description
3520
+
3521
+ Start the title with the state and the amount, such as Waiting for $10.00. In the description, give the expected wait and whether people can leave the page.
3522
+
3523
+ ### Accessibility
3524
+
3525
+ A status row renders a `<div>` with the `status` role, so screen readers announce a change of its text politely. The leading mark is hidden.
3526
+
3527
+ #### Semantics
3528
+
3529
+ * **Root (status):** Screen readers announce a change of the text without moving focus.
3530
+ * **Icon (aria-hidden):** The spinner and the check are hidden, so the title carries the state.
3531
+
3532
+ #### Your Responsibilities
3533
+
3534
+ * **Update the Row in Place (SC 4.1.3):** Change the text of the mounted row, so the status role announces it.
3535
+
3536
+ ### Related
3537
+
3538
+ [StatusChip](#statuschip)
3539
+
3540
+ Use for the status at the end of the row.
3541
+
3542
+ [Spinner](#spinner)
3543
+
3544
+ Use for the leading mark while the task runs.
3545
+
3546
+ [Alert](#alert)
3547
+
3548
+ Use for guidance that is not tied to a running task.
3549
+
3550
+ ### Examples
3551
+
3552
+ #### Basic
3553
+
3554
+ ```tsx
3555
+ import { Spinner, StatusChip, StatusRow } from '@tempoxyz/ds'
3556
+
3557
+ export function Demo() {
3558
+ return (
3559
+ <StatusRow>
3560
+ <StatusRow.Icon>
3561
+ <Spinner />
3562
+ </StatusRow.Icon>
3563
+ <StatusRow.Content>
3564
+ <StatusRow.Title>Waiting for $10.00</StatusRow.Title>
3565
+ <StatusRow.Description>
3566
+ Usually under a minute on Tempo. You can leave this page.
3567
+ </StatusRow.Description>
3568
+ </StatusRow.Content>
3569
+ <StatusChip intent="warning" size="small">
3570
+ Pending
3571
+ </StatusChip>
3572
+ </StatusRow>
3573
+ )
3574
+ }
3575
+ ```
3576
+
3577
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusRow/Basic.tsx)
3578
+
3579
+ #### Intent
3580
+
3581
+ Set `intent` to `neutral` (default) while the task runs, or `positive` once it is done.
3582
+
3583
+ ```tsx
3584
+ import { StatusRow } from '@tempoxyz/ds'
3585
+ import { CheckCircle } from '@tempoxyz/ds/icons'
3586
+
3587
+ export function Demo() {
3588
+ return (
3589
+ <StatusRow intent="positive">
3590
+ <StatusRow.Icon>
3591
+ <CheckCircle />
3592
+ </StatusRow.Icon>
3593
+ <StatusRow.Content>
3594
+ <StatusRow.Title>Received $10.00</StatusRow.Title>
3595
+ <StatusRow.Description>The funds are in your wallet.</StatusRow.Description>
3596
+ </StatusRow.Content>
3597
+ </StatusRow>
3598
+ )
3599
+ }
3600
+ ```
3601
+
3602
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusRow/Intent.tsx)
3603
+
3604
+ ## Toast
3605
+
3606
+ Shows a brief notification that dismisses itself.
3607
+
3608
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Toast.tsx)
3609
+
3610
+ Figma: [Toast](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=1186-3381) (`Toast.Item`)
3611
+
3612
+ ### Overview
3613
+
3614
+ Toasts are queued with a hook and render in a live region at the edge of the viewport.
3615
+
3616
+ ### Anatomy
3617
+
3618
+ Import the component and assemble its parts.
3619
+
3620
+ ```tsx
3621
+ import { Toast } from '@tempoxyz/ds'
3622
+
3623
+ <Toast.Provider>
3624
+ <Toast.Viewport />
3625
+ <Toast.Item />
3626
+ </Toast.Provider>
3627
+ ```
3628
+
3629
+ ### Guidelines
3630
+
3631
+ #### When to Use
3632
+
3633
+ * Confirm that a user action finished, such as Payment sent or Webhook saved.
3634
+ * Report a background event that needs no response, such as a deposit that arrived while the user was on another page.
3635
+ * Offer a short Undo after a reversible action, such as Archived, when the same result is reachable elsewhere.
3636
+
3637
+ #### When Not to Use
3638
+
3639
+ * Use an [Alert](#alert) for an error or warning that must stay beside its content, such as a failed payment.
3640
+ * Use a [Banner](#banner) for a condition that affects the whole product, such as an outage.
3641
+ * Use an [AlertDialog](overlays.md#alertdialog) for a decision before an action continues.
3642
+ * Use `Field.Error` from [Field](forms-and-inputs.md#field-1) for validation messages on an input.
3643
+ * Use `loading` on a [Button](actions.md#button), or [Progress](#progress-1), for work that still runs.
3644
+
3645
+ #### Keep Required Actions Out of Toasts
3646
+
3647
+ A toast dismisses itself, and keyboard users must press F6 to reach it. Put required steps in the page or in an [AlertDialog](overlays.md#alertdialog).
3648
+
3649
+ **Do:** Confirm a finished action and include the detail that identifies it.
3650
+
3651
+ ```tsx
3652
+ /**
3653
+ * Do example for "Keep Required Actions Out of Toasts" on the Toast page.
3654
+ * Confirm a finished action and include the detail that identifies it.
3655
+ * @module
3656
+ */
3657
+ import { CheckCircle, Close } from '@tempoxyz/ds/icons'
3658
+ import { style } from '@tempoxyz/ds'
3659
+
3660
+ // Toasts render in a portal, so this preview draws one in place with the toast's styles.
3661
+ /** Renders the static preview, which the guideline card shows inert. */
3662
+ export function Demo() {
3663
+ return (
3664
+ <div {...styles.toast()}>
3665
+ <CheckCircle {...styles.icon()} />
3666
+ <div {...styles.body()}>
3667
+ <div {...styles.title()}>Payment sent</div>
3668
+ <div {...styles.description()}>50.00 USDC to 0x8f3c…a21b</div>
3669
+ </div>
3670
+ <Close {...styles.close()} />
3671
+ </div>
3672
+ )
3673
+ }
3674
+
3675
+ namespace styles {
3676
+ export const body = style({
3677
+ display: 'flex',
3678
+ flex: '1 !custom',
3679
+ flexDirection: 'column',
3680
+ minWidth: '0px !custom',
3681
+ rowGap: '4',
3682
+ })
3683
+
3684
+ export const close = style({ color: 'content.tertiary', flexShrink: '0 !custom', fontSize: '16' })
3685
+
3686
+ export const description = style({ color: 'content.secondary', typography: 'body.b2' })
3687
+
3688
+ export const icon = style({ color: 'content.positive', flexShrink: '0 !custom', fontSize: '20' })
3689
+
3690
+ export const title = style({ color: 'content.primary', typography: 'body.b2Strong' })
3691
+
3692
+ export const toast = style({
3693
+ alignItems: 'center',
3694
+ backgroundColor: 'background.elevated',
3695
+ borderRadius: 'sm',
3696
+ boxShadow: 'regular',
3697
+ boxSizing: 'border-box',
3698
+ columnGap: '12',
3699
+ display: 'flex',
3700
+ paddingBlock: '16',
3701
+ paddingInline: '20',
3702
+ width: '100% !custom',
3703
+ })
3704
+ }
3705
+ ```
3706
+
3707
+ **Don't:** Ask for a confirmation or another required step in a toast.
3708
+
3709
+ ```tsx
3710
+ /**
3711
+ * Don't example for "Keep Required Actions Out of Toasts" on the Toast page.
3712
+ * Don't ask for a confirmation or another required step in a toast.
3713
+ * @module
3714
+ */
3715
+ import { AlertTriangle, Close } from '@tempoxyz/ds/icons'
3716
+ import { style } from '@tempoxyz/ds'
3717
+
3718
+ // Toasts render in a portal, so this preview draws one in place with the toast's styles.
3719
+ /** Renders the static preview, which the guideline card shows inert. */
3720
+ export function Demo() {
3721
+ return (
3722
+ <div {...styles.toast()}>
3723
+ <AlertTriangle {...styles.icon()} />
3724
+ <div {...styles.body()}>
3725
+ <div {...styles.title()}>Confirm payment</div>
3726
+ <div {...styles.description()}>50.00 USDC to 0x8f3c…a21b</div>
3727
+ </div>
3728
+ <span {...styles.action()}>Confirm</span>
3729
+ <Close {...styles.close()} />
3730
+ </div>
3731
+ )
3732
+ }
3733
+
3734
+ namespace styles {
3735
+ export const action = style({
3736
+ alignItems: 'center',
3737
+ backgroundColor: 'container.regular',
3738
+ borderRadius: 'full',
3739
+ color: 'content.primary',
3740
+ cornerShape: 'round',
3741
+ display: 'inline-flex',
3742
+ flexShrink: '0 !custom',
3743
+ height: '32',
3744
+ paddingInline: '12',
3745
+ typography: 'body.b3Strong',
3746
+ })
3747
+
3748
+ export const body = style({
3749
+ display: 'flex',
3750
+ flex: '1 !custom',
3751
+ flexDirection: 'column',
3752
+ minWidth: '0px !custom',
3753
+ rowGap: '4',
3754
+ })
3755
+
3756
+ export const close = style({ color: 'content.tertiary', flexShrink: '0 !custom', fontSize: '16' })
3757
+
3758
+ export const description = style({ color: 'content.secondary', typography: 'body.b2' })
3759
+
3760
+ export const icon = style({ color: 'content.warning', flexShrink: '0 !custom', fontSize: '20' })
3761
+
3762
+ export const title = style({ color: 'content.primary', typography: 'body.b2Strong' })
3763
+
3764
+ export const toast = style({
3765
+ alignItems: 'center',
3766
+ backgroundColor: 'background.elevated',
3767
+ borderRadius: 'sm',
3768
+ boxShadow: 'regular',
3769
+ boxSizing: 'border-box',
3770
+ columnGap: '12',
3771
+ display: 'flex',
3772
+ paddingBlock: '16',
3773
+ paddingInline: '20',
3774
+ width: '100% !custom',
3775
+ })
3776
+ }
3777
+ ```
3778
+
3779
+ An Undo action is fine if the page also reverses the change, such as an Archive tab that restores an archived key.
3780
+
3781
+ #### Choose an Intent
3782
+
3783
+ * **Neutral (neutral):** The default, with no icon. Updates with no outcome to judge, such as Signed out.
3784
+ * **Info (info):** Events the user didn't start, such as a deposit that arrived.
3785
+ * **Positive (positive):** An action that succeeded, such as a confirmation that reads Payment sent.
3786
+ * **Warning (warning):** An action that finished with a caveat, such as a test delivery that timed out.
3787
+ * **Negative (negative):** A non-critical action that failed and that the user can try again.
3788
+
3789
+ #### Set Duration by Content
3790
+
3791
+ * **Short Content (5 seconds):** The default, for a title and a short description.
3792
+ * **Longer Description (timeout):** Raise `timeout`, or set it app-wide on `Toast.Provider`.
3793
+ * **Action (timeout: 0):** Keeps the toast open until dismissed ([SC 2.2.1](https://www.w3.org/WAI/WCAG22/Understanding/timing-adjustable.html)).
3794
+
3795
+ #### Send One Toast per Outcome
3796
+
3797
+ `Toast.Provider` shows up to three toasts by default, and hides older ones past its `limit`. Combine related results into one toast.
3798
+
3799
+ **Do:** Combine related results into one toast, such as 3 payments sent.
3800
+
3801
+ ```tsx
3802
+ /**
3803
+ * Do example for "Send One Toast per Outcome" on the Toast page.
3804
+ * Combine related results into one toast, such as 3 payments sent.
3805
+ * @module
3806
+ */
3807
+ import { CheckCircle, Close } from '@tempoxyz/ds/icons'
3808
+ import { style } from '@tempoxyz/ds'
3809
+
3810
+ // Toasts render in a portal, so this preview draws one in place with the toast's styles.
3811
+ /** Renders the static preview, which the guideline card shows inert. */
3812
+ export function Demo() {
3813
+ return (
3814
+ <div {...styles.toast()}>
3815
+ <CheckCircle {...styles.icon()} />
3816
+ <div {...styles.body()}>
3817
+ <div {...styles.title()}>3 payments sent</div>
3818
+ <div {...styles.description()}>150.00 USDC to 3 recipients</div>
3819
+ </div>
3820
+ <Close {...styles.close()} />
3821
+ </div>
3822
+ )
3823
+ }
3824
+
3825
+ namespace styles {
3826
+ export const body = style({
3827
+ display: 'flex',
3828
+ flex: '1 !custom',
3829
+ flexDirection: 'column',
3830
+ minWidth: '0px !custom',
3831
+ rowGap: '4',
3832
+ })
3833
+
3834
+ export const close = style({ color: 'content.tertiary', flexShrink: '0 !custom', fontSize: '16' })
3835
+
3836
+ export const description = style({ color: 'content.secondary', typography: 'body.b2' })
3837
+
3838
+ export const icon = style({ color: 'content.positive', flexShrink: '0 !custom', fontSize: '20' })
3839
+
3840
+ export const title = style({ color: 'content.primary', typography: 'body.b2Strong' })
3841
+
3842
+ export const toast = style({
3843
+ alignItems: 'center',
3844
+ backgroundColor: 'background.elevated',
3845
+ borderRadius: 'sm',
3846
+ boxShadow: 'regular',
3847
+ boxSizing: 'border-box',
3848
+ columnGap: '12',
3849
+ display: 'flex',
3850
+ paddingBlock: '16',
3851
+ paddingInline: '20',
3852
+ width: '100% !custom',
3853
+ })
3854
+ }
3855
+ ```
3856
+
3857
+ **Don't:** Send a separate toast for each result of one action.
3858
+
3859
+ ```tsx
3860
+ /**
3861
+ * Don't example for "Send One Toast per Outcome" on the Toast page.
3862
+ * Don't send a separate toast for each result of one action.
3863
+ * @module
3864
+ */
3865
+ import { CheckCircle, Close } from '@tempoxyz/ds/icons'
3866
+ import { style } from '@tempoxyz/ds'
3867
+
3868
+ const payments = ['0x8f3c…a21b', '0x41d0…9c7e', '0xb27a…04f5']
3869
+
3870
+ // Toasts render in a portal, so this preview draws them in place with the toast's styles.
3871
+ /** Renders the static preview, which the guideline card shows inert. */
3872
+ export function Demo() {
3873
+ return (
3874
+ <div {...styles.stack()}>
3875
+ {payments.map((address) => (
3876
+ <div key={address} {...styles.toast()}>
3877
+ <CheckCircle {...styles.icon()} />
3878
+ <div {...styles.body()}>
3879
+ <div {...styles.title()}>Payment sent</div>
3880
+ <div {...styles.description()}>50.00 USDC to {address}</div>
3881
+ </div>
3882
+ <Close {...styles.close()} />
3883
+ </div>
3884
+ ))}
3885
+ </div>
3886
+ )
3887
+ }
3888
+
3889
+ namespace styles {
3890
+ export const body = style({
3891
+ display: 'flex',
3892
+ flex: '1 !custom',
3893
+ flexDirection: 'column',
3894
+ minWidth: '0px !custom',
3895
+ rowGap: '4',
3896
+ })
3897
+
3898
+ export const close = style({ color: 'content.tertiary', flexShrink: '0 !custom', fontSize: '16' })
3899
+
3900
+ export const description = style({ color: 'content.secondary', typography: 'body.b2' })
3901
+
3902
+ export const icon = style({ color: 'content.positive', flexShrink: '0 !custom', fontSize: '20' })
3903
+
3904
+ export const stack = style({
3905
+ display: 'flex',
3906
+ flexDirection: 'column',
3907
+ gap: '8',
3908
+ width: '100% !custom',
3909
+ })
3910
+
3911
+ export const title = style({ color: 'content.primary', typography: 'body.b2Strong' })
3912
+
3913
+ export const toast = style({
3914
+ alignItems: 'center',
3915
+ backgroundColor: 'background.elevated',
3916
+ borderRadius: 'sm',
3917
+ boxShadow: 'regular',
3918
+ boxSizing: 'border-box',
3919
+ columnGap: '12',
3920
+ display: 'flex',
3921
+ paddingBlock: '16',
3922
+ paddingInline: '20',
3923
+ width: '100% !custom',
3924
+ })
3925
+ }
3926
+ ```
3927
+
3928
+ ### Content
3929
+
3930
+ * Write the title as the result in a few words, usually past tense: Payment sent, Key revoked, Webhook saved.
3931
+ * Add a description only for the detail that identifies the action, such as 50.00 USDC to 0x8f3c…a21b.
3932
+ * Leave out exclamation marks and filler such as Success or Done.
3933
+ * Label the action with one verb, such as Undo or Retry.
3934
+
3935
+ ### Accessibility
3936
+
3937
+ Toasts never take focus on their own. Don't move focus to a new toast yourself.
3938
+
3939
+ #### Semantics
3940
+
3941
+ * **Toast.Viewport (region):** A landmark named "Notifications". Announces new toasts without moving focus.
3942
+ * **Toast (dialog):** A non-modal dialog, named by its title and described by its description.
3943
+ * **High Priority (alertdialog):** With `priority: 'high'`, a separate alert interrupts current speech. Intent alone never does.
3944
+ * **Action and Dismiss (button):** The action is named by `action.label`. Every toast also has a Dismiss button.
3945
+ * **Intent Icon (aria-hidden):** Hidden from assistive technology, so the title must carry the outcome.
3946
+
3947
+ #### Keyboard
3948
+
3949
+ * **Reach the Viewport (F6):** Moves focus to the toast viewport from anywhere on the page.
3950
+ * **Move Through the Toast (Tab):** Moves focus to the newest toast, then to its action and Dismiss button.
3951
+ * **Move Back (Shift+Tab):** Moves focus back. From the viewport, returns focus to where it was before F6.
3952
+ * **Activate a Button (Enter or Space):** Activates the action or the Dismiss button that holds focus.
3953
+ * **Dismiss the Toast (Escape):** Dismisses the toast that holds focus, the same as its Dismiss button.
3954
+
3955
+ #### Dismissal
3956
+
3957
+ * **Pausing:** Hover or focus in the viewport pauses all dismiss timers, as does a background window.
3958
+ * **Swiping:** On touch screens, a swipe down or to the right dismisses a toast.
3959
+
3960
+ #### Your Responsibilities
3961
+
3962
+ * **Reserve High Priority (priority: 'high'):** Use it only for urgent messages. Show critical errors inline or in a [Dialog](overlays.md#dialog).
3963
+ * **Render One Viewport (F6):** Render one viewport per app, so the shortcut always reaches it.
3964
+
3965
+ ### Related
3966
+
3967
+ [Alert](#alert)
3968
+
3969
+ Use for messages that stay beside their content.
3970
+
3971
+ [Banner](#banner)
3972
+
3973
+ Use for messages about the whole product.
3974
+
3975
+ [AlertDialog](overlays.md#alertdialog)
3976
+
3977
+ Use for decisions before an action continues.
3978
+
3979
+ [Feedback and Status](../patterns.md#feedback-and-status)
3980
+
3981
+ Covers choosing a message component.
3982
+
3983
+ ### Examples
3984
+
3985
+ #### Basic
3986
+
3987
+ ```tsx
3988
+ import { Button, Toast } from '@tempoxyz/ds'
3989
+
3990
+ function Trigger() {
3991
+ const toast = Toast.useToast()
3992
+
3993
+ return (
3994
+ <Button
3995
+ onClick={() =>
3996
+ toast.add({ description: 'Transfers settle in seconds.', title: 'Payment sent' })
3997
+ }
3998
+ size="small"
3999
+ variant="secondary"
4000
+ >
4001
+ Show toast
4002
+ </Button>
4003
+ )
4004
+ }
4005
+
4006
+ export function Demo() {
4007
+ return (
4008
+ <Toast.Provider>
4009
+ <Trigger />
4010
+ <Toast.Viewport />
4011
+ </Toast.Provider>
4012
+ )
4013
+ }
4014
+ ```
4015
+
4016
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Toast/Basic.tsx)
4017
+
4018
+ #### Intent
4019
+
4020
+ Pass `intent` to `toast.add` as `neutral` (default), `info`, `positive`, `warning`, or `negative`.
4021
+
4022
+ ```tsx
4023
+ import { Button, style, Toast } from '@tempoxyz/ds'
4024
+
4025
+ const intents = ['neutral', 'info', 'positive', 'warning', 'negative'] as const
4026
+
4027
+ function Triggers() {
4028
+ const toast = Toast.useToast()
4029
+
4030
+ return (
4031
+ <div {...styles.row()}>
4032
+ {intents.map((intent) => (
4033
+ <Button
4034
+ key={intent}
4035
+ onClick={() =>
4036
+ toast.add({
4037
+ description: 'Transfers settle in seconds.',
4038
+ intent,
4039
+ title: `${intent} toast`,
4040
+ })
4041
+ }
4042
+ size="small"
4043
+ variant="secondary"
4044
+ >
4045
+ {intent}
4046
+ </Button>
4047
+ ))}
4048
+ </div>
4049
+ )
4050
+ }
4051
+
4052
+ export function Demo() {
4053
+ return (
4054
+ <Toast.Provider>
4055
+ <Triggers />
4056
+ <Toast.Viewport />
4057
+ </Toast.Provider>
4058
+ )
4059
+ }
4060
+
4061
+ namespace styles {
4062
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '12' })
4063
+ }
4064
+ ```
4065
+
4066
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Toast/Intent.tsx)
4067
+
4068
+ #### Action
4069
+
4070
+ Pass an `action` with a `label` to add a button. Set `timeout: 0` to keep the toast open until dismissed.
4071
+
4072
+ ```tsx
4073
+ import { Button, Toast } from '@tempoxyz/ds'
4074
+
4075
+ function Trigger() {
4076
+ const toast = Toast.useToast()
4077
+
4078
+ return (
4079
+ <Button
4080
+ onClick={() =>
4081
+ toast.add({
4082
+ action: { label: 'Undo' },
4083
+ intent: 'positive',
4084
+ timeout: 0,
4085
+ title: 'Archived',
4086
+ })
4087
+ }
4088
+ size="small"
4089
+ variant="secondary"
4090
+ >
4091
+ With action
4092
+ </Button>
4093
+ )
4094
+ }
4095
+
4096
+ export function Demo() {
4097
+ return (
4098
+ <Toast.Provider>
4099
+ <Trigger />
4100
+ <Toast.Viewport />
4101
+ </Toast.Provider>
4102
+ )
4103
+ }
4104
+ ```
4105
+
4106
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Toast/Action.tsx)
4107
+
4108
+ #### Item
4109
+
4110
+ `Toast.Viewport` renders a `Toast.Item` for each queued toast. Render an item yourself only in a custom viewport under `Toast.Provider`, and pass it a toast object, whose `type` sets the intent.
4111
+
4112
+ ```tsx
4113
+ import { style, Toast } from '@tempoxyz/ds'
4114
+
4115
+ export function Demo() {
4116
+ return (
4117
+ <Toast.Provider>
4118
+ <div {...styles.frame()}>
4119
+ <Toast.Item
4120
+ toast={{
4121
+ description: 'Sent 25.00 USDC to Alice',
4122
+ id: 'sent',
4123
+ title: 'Payment sent',
4124
+ type: 'positive',
4125
+ }}
4126
+ />
4127
+ </div>
4128
+ </Toast.Provider>
4129
+ )
4130
+ }
4131
+
4132
+ namespace styles {
4133
+ // The item sits at the bottom of its containing block, as the viewport places it.
4134
+ export const frame = style({ height: '72', position: 'relative', width: '320' })
4135
+ }
4136
+ ```
4137
+
4138
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Toast/Item.tsx)