@tempoxyz/ds 0.3.10 → 0.3.11

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 (120) hide show
  1. package/dist/docs/AGENTS.md +9 -0
  2. package/dist/docs/components/accordion.md +489 -0
  3. package/dist/docs/components/address-card.md +147 -0
  4. package/dist/docs/components/agent-logo.md +194 -0
  5. package/dist/docs/components/alert-dialog.md +631 -0
  6. package/dist/docs/components/alert.md +448 -0
  7. package/dist/docs/components/amount-input.md +305 -0
  8. package/dist/docs/components/amount.md +794 -0
  9. package/dist/docs/components/app-shell.md +559 -0
  10. package/dist/docs/components/asset-chip.md +294 -0
  11. package/dist/docs/components/autocomplete.md +619 -0
  12. package/dist/docs/components/avatar.md +321 -0
  13. package/dist/docs/components/badge.md +339 -0
  14. package/dist/docs/components/badged-logo.md +116 -0
  15. package/dist/docs/components/banner.md +379 -0
  16. package/dist/docs/components/bar-chart.md +208 -0
  17. package/dist/docs/components/breadcrumbs.md +380 -0
  18. package/dist/docs/components/button-group.md +286 -0
  19. package/dist/docs/components/button.md +650 -0
  20. package/dist/docs/components/calendar.md +375 -0
  21. package/dist/docs/components/callout.md +96 -0
  22. package/dist/docs/components/checkbox-group.md +521 -0
  23. package/dist/docs/components/checkbox.md +467 -0
  24. package/dist/docs/components/choice-group.md +516 -0
  25. package/dist/docs/components/choicebox.md +641 -0
  26. package/dist/docs/components/code.md +100 -0
  27. package/dist/docs/components/combobox.md +939 -0
  28. package/dist/docs/components/container.md +257 -0
  29. package/dist/docs/components/copy-button.md +642 -0
  30. package/dist/docs/components/date-picker.md +514 -0
  31. package/dist/docs/components/dialog.md +1332 -0
  32. package/dist/docs/components/drawer.md +966 -0
  33. package/dist/docs/components/empty.md +340 -0
  34. package/dist/docs/components/field.md +570 -0
  35. package/dist/docs/components/fieldset.md +398 -0
  36. package/dist/docs/components/frame.md +434 -0
  37. package/dist/docs/components/gauge.md +299 -0
  38. package/dist/docs/components/get-started-visual.md +117 -0
  39. package/dist/docs/components/grid.md +288 -0
  40. package/dist/docs/components/hero-visual.md +155 -0
  41. package/dist/docs/components/hex.md +487 -0
  42. package/dist/docs/components/icon-tile.md +292 -0
  43. package/dist/docs/components/identicon.md +371 -0
  44. package/dist/docs/components/inline.md +233 -0
  45. package/dist/docs/components/inset.md +225 -0
  46. package/dist/docs/components/kbd.md +423 -0
  47. package/dist/docs/components/list-group.md +981 -0
  48. package/dist/docs/components/loading-dots.md +237 -0
  49. package/dist/docs/components/menu.md +934 -0
  50. package/dist/docs/components/native-select.md +204 -0
  51. package/dist/docs/components/network-logo.md +248 -0
  52. package/dist/docs/components/number-field.md +543 -0
  53. package/dist/docs/components/otp-field.md +616 -0
  54. package/dist/docs/components/pagination.md +516 -0
  55. package/dist/docs/components/popover.md +544 -0
  56. package/dist/docs/components/progress.md +388 -0
  57. package/dist/docs/components/qr.md +314 -0
  58. package/dist/docs/components/radio-group.md +528 -0
  59. package/dist/docs/components/secret-value.md +406 -0
  60. package/dist/docs/components/select.md +751 -0
  61. package/dist/docs/components/separator.md +379 -0
  62. package/dist/docs/components/sidebar-menu.md +922 -0
  63. package/dist/docs/components/skeleton.md +517 -0
  64. package/dist/docs/components/slider.md +539 -0
  65. package/dist/docs/components/snippet.md +424 -0
  66. package/dist/docs/components/spinner.md +216 -0
  67. package/dist/docs/components/split-bar.md +139 -0
  68. package/dist/docs/components/split-button.md +464 -0
  69. package/dist/docs/components/stack.md +299 -0
  70. package/dist/docs/components/status-chip.md +226 -0
  71. package/dist/docs/components/status-indicator.md +119 -0
  72. package/dist/docs/components/status-row.md +174 -0
  73. package/dist/docs/components/stepper.md +451 -0
  74. package/dist/docs/components/success-hero.md +157 -0
  75. package/dist/docs/components/surface.md +639 -0
  76. package/dist/docs/components/switch.md +472 -0
  77. package/dist/docs/components/table.md +967 -0
  78. package/dist/docs/components/tabs.md +627 -0
  79. package/dist/docs/components/tempo-logo.md +185 -0
  80. package/dist/docs/components/text-input.md +624 -0
  81. package/dist/docs/components/textarea.md +352 -0
  82. package/dist/docs/components/toast.md +535 -0
  83. package/dist/docs/components/token-logo.md +371 -0
  84. package/dist/docs/components/token.md +247 -0
  85. package/dist/docs/components/tooltip.md +490 -0
  86. package/dist/docs/components/verification-code.md +116 -0
  87. package/dist/docs/components/visual.md +249 -0
  88. package/dist/docs/components.md +203 -0
  89. package/dist/docs/foundations/accessibility.md +377 -0
  90. package/dist/docs/foundations/agents.md +150 -0
  91. package/dist/docs/foundations/color.md +522 -0
  92. package/dist/docs/foundations/content/tone.md +194 -0
  93. package/dist/docs/foundations/content/voice.md +194 -0
  94. package/dist/docs/foundations/content/writing-style.md +406 -0
  95. package/dist/docs/foundations/iconography.md +282 -0
  96. package/dist/docs/foundations/intent.md +360 -0
  97. package/dist/docs/foundations/layout.md +508 -0
  98. package/dist/docs/foundations/linter.md +296 -0
  99. package/dist/docs/foundations/motion.md +151 -0
  100. package/dist/docs/foundations/radius-and-padding.md +86 -0
  101. package/dist/docs/foundations/typography.md +266 -0
  102. package/dist/docs/index.md +137 -0
  103. package/dist/docs/introduction/faq.md +132 -0
  104. package/dist/docs/introduction/getting-started.md +377 -0
  105. package/dist/docs/patterns/blockchain-values.md +709 -0
  106. package/dist/docs/patterns/dashboards.md +638 -0
  107. package/dist/docs/patterns/destructive-actions.md +626 -0
  108. package/dist/docs/patterns/empty-states.md +612 -0
  109. package/dist/docs/patterns/errors-and-validation.md +808 -0
  110. package/dist/docs/patterns/feedback-and-status.md +518 -0
  111. package/dist/docs/patterns/forms.md +679 -0
  112. package/dist/docs/patterns/loading.md +630 -0
  113. package/dist/docs/patterns/navigation.md +397 -0
  114. package/dist/docs/patterns/payments.md +765 -0
  115. package/dist/docs/patterns/responsive-layout.md +997 -0
  116. package/dist/docs/patterns/tables-and-lists.md +964 -0
  117. package/dist/docs/products/tempo-console.md +671 -0
  118. package/dist/docs/products/tempo-performance.md +437 -0
  119. package/dist/docs/products/tempo-wallet.md +438 -0
  120. package/package.json +1 -1
@@ -0,0 +1,544 @@
1
+ # Popover
2
+
3
+ Opens a non-modal popup anchored to a trigger.
4
+
5
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Popover.tsx)
6
+
7
+ ## Overview
8
+
9
+ Popover renders a non-modal dialog anchored to a trigger, opened on click, for interactive or longer content.
10
+
11
+ ## Examples
12
+
13
+ ### Basic
14
+
15
+ ```tsx
16
+ import { Button, Popover, style } from '@tempoxyz/ds'
17
+
18
+ export function Demo() {
19
+ return (
20
+ <Popover.Root>
21
+ <Popover.Trigger render={<Button variant="secondary" />}>Network fee</Popover.Trigger>
22
+ <Popover.Popup>
23
+ <Popover.Title>Network fee</Popover.Title>
24
+ <Popover.Description>Paid in the token you send.</Popover.Description>
25
+ <div {...styles.actions()}>
26
+ <Popover.Close render={<Button size="small" variant="secondary" />}>Got it</Popover.Close>
27
+ </div>
28
+ </Popover.Popup>
29
+ </Popover.Root>
30
+ )
31
+ }
32
+
33
+ namespace styles {
34
+ export const actions = style({ marginTop: '16' })
35
+ }
36
+ ```
37
+
38
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Popover/Basic.tsx)
39
+
40
+ ### Side
41
+
42
+ Set `side` on `Popover.Popup` to `top`, `right`, `bottom` (default), or `left`. Add `Popover.Arrow` to point toward the trigger.
43
+
44
+ ```tsx
45
+ import { Button, Popover } from '@tempoxyz/ds'
46
+
47
+ export function Demo() {
48
+ return (
49
+ <Popover.Root>
50
+ <Popover.Trigger render={<Button variant="secondary" />}>With arrow</Popover.Trigger>
51
+ <Popover.Popup side="right">
52
+ <Popover.Arrow />
53
+ <Popover.Title>Estimated arrival</Popover.Title>
54
+ <Popover.Description>About one minute.</Popover.Description>
55
+ </Popover.Popup>
56
+ </Popover.Root>
57
+ )
58
+ }
59
+ ```
60
+
61
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Popover/Side.tsx)
62
+
63
+ ## Anatomy
64
+
65
+ Import the component and assemble its parts.
66
+
67
+ ```tsx
68
+ import { Popover } from '@tempoxyz/ds'
69
+
70
+ <Popover.Root>
71
+ <Popover.Trigger />
72
+ <Popover.Popup>
73
+ <Popover.Arrow />
74
+ <Popover.Title />
75
+ <Popover.Description />
76
+ <Popover.Close />
77
+ </Popover.Popup>
78
+ </Popover.Root>
79
+ ```
80
+
81
+ ## Guidelines
82
+
83
+ ### When to Use
84
+
85
+ * Explain a value with a sentence and a link, such as the methodology behind a throughput tile.
86
+ * Show details on demand, such as the breakdown of a network fee.
87
+ * Edit one setting in place, such as the label of a saved address.
88
+
89
+ ### When Not to Use
90
+
91
+ * Use a [Tooltip](/docs/components/tooltip) for a short label on an icon button.
92
+ * Use a [Menu](/docs/components/menu) for a list of actions.
93
+ * Use [Select](/docs/components/select), [Combobox](/docs/components/combobox), or [DatePicker](/docs/components/date-picker) to choose a value.
94
+ * Use a [Dialog](/docs/components/dialog) for a task with several fields or full attention.
95
+ * Use a [Drawer](/docs/components/drawer) for long content.
96
+ * Use visible text for information everyone needs, such as an error or a required step.
97
+
98
+ ### Keep Content Small
99
+
100
+ A popover holds a title, a sentence or two, and at most two controls. `Popover.Popup` grows up to the available width, so give text popovers a `maxWidth`, such as 20rem.
101
+
102
+ **Do:** Explain a metric with a title, one sentence, and a link.
103
+
104
+ ```tsx
105
+ /**
106
+ * Do example for "Keep Content Small" on the Popover page.
107
+ * Explain a metric with a title, one sentence, and a link.
108
+ * @module
109
+ */
110
+ import { Button, style } from '@tempoxyz/ds'
111
+ import { InfoCircle } from '@tempoxyz/ds/icons'
112
+
113
+ /** Renders the static preview, which the guideline card shows inert. */
114
+ export function Demo() {
115
+ return (
116
+ <div {...styles.stack()}>
117
+ <div {...styles.header()}>
118
+ <span {...styles.label()}>Throughput</span>
119
+ <Button aria-label="About throughput" shape="icon" size="small" variant="tertiary">
120
+ <InfoCircle />
121
+ </Button>
122
+ </div>
123
+ <div {...styles.popup()}>
124
+ <span {...styles.title()}>Throughput</span>
125
+ <p {...styles.description()}>Transactions per second, averaged over each block.</p>
126
+ <span {...styles.link()}>View methodology</span>
127
+ </div>
128
+ </div>
129
+ )
130
+ }
131
+
132
+ namespace styles {
133
+ export const description = style({
134
+ color: 'content.secondary',
135
+ margin: '0 !custom',
136
+ typography: 'body.b2',
137
+ })
138
+
139
+ export const header = style({ alignItems: 'center', columnGap: '4', display: 'flex' })
140
+
141
+ export const label = style({ color: 'content.primary', typography: 'body.b2Strong' })
142
+
143
+ export const link = style({
144
+ color: 'content.primary',
145
+ textDecorationLine: 'underline !custom',
146
+ typography: 'body.b2Strong',
147
+ })
148
+
149
+ export const popup = style({
150
+ backgroundColor: 'background.elevated',
151
+ borderRadius: 'sm',
152
+ boxShadow: 'regular',
153
+ boxSizing: 'border-box',
154
+ display: 'flex',
155
+ flexDirection: 'column',
156
+ padding: '20',
157
+ rowGap: '8',
158
+ width: '15rem !custom',
159
+ })
160
+
161
+ export const stack = style({
162
+ alignItems: 'flex-start',
163
+ display: 'flex',
164
+ flexDirection: 'column',
165
+ rowGap: '8',
166
+ })
167
+
168
+ export const title = style({ color: 'content.primary', typography: 'body.b1Strong' })
169
+ }
170
+ ```
171
+
172
+ **Don't:** Build a multi-field form in a popover. Use a [Dialog](/docs/components/dialog).
173
+
174
+ ```tsx
175
+ /**
176
+ * Don't example for "Keep Content Small" on the Popover page.
177
+ * Don't build a multi-field form in a popover. Use a Dialog.
178
+ * @module
179
+ */
180
+ import { Button, style, TextInput } from '@tempoxyz/ds'
181
+
182
+ /** Renders the static preview, which the guideline card shows inert. */
183
+ export function Demo() {
184
+ return (
185
+ <div {...styles.popup()}>
186
+ <span {...styles.title()}>New webhook</span>
187
+ <TextInput.Group>
188
+ <TextInput.Control aria-label="Endpoint URL" placeholder="Endpoint URL" />
189
+ </TextInput.Group>
190
+ <TextInput.Group>
191
+ <TextInput.Control aria-label="Events" placeholder="Events" />
192
+ </TextInput.Group>
193
+ <TextInput.Group>
194
+ <TextInput.Control aria-label="Signing secret" placeholder="Signing secret" />
195
+ </TextInput.Group>
196
+ <div {...styles.actions()}>
197
+ <Button size="small" variant="secondary">
198
+ Cancel
199
+ </Button>
200
+ <Button size="small">Create webhook</Button>
201
+ </div>
202
+ </div>
203
+ )
204
+ }
205
+
206
+ namespace styles {
207
+ export const actions = style({
208
+ columnGap: '8',
209
+ display: 'flex',
210
+ justifyContent: 'flex-end',
211
+ marginTop: '4',
212
+ })
213
+
214
+ export const popup = style({
215
+ backgroundColor: 'background.elevated',
216
+ borderRadius: 'sm',
217
+ boxShadow: 'regular',
218
+ boxSizing: 'border-box',
219
+ display: 'flex',
220
+ flexDirection: 'column',
221
+ padding: '20',
222
+ rowGap: '8',
223
+ width: '16rem !custom',
224
+ })
225
+
226
+ export const title = style({ color: 'content.primary', typography: 'body.b1Strong' })
227
+ }
228
+ ```
229
+
230
+ ### Add Hover Without Replacing Click
231
+
232
+ * **Click (default):** `Popover.Trigger` toggles on click, which covers a mouse, a tap, and Enter or Space.
233
+ * **Hover and Click (openOnHover):** For info icons on dashboards. Opens after 300ms of hover, and click still works.
234
+
235
+ ### Offer a Close Action for Controls
236
+
237
+ Escape and an outside press close a popover. If it holds controls, add a `Popover.Close` button, such as Cancel or Done, for touch screens.
238
+
239
+ **Do:** Add a `Popover.Close` action beside the controls.
240
+
241
+ ```tsx
242
+ /**
243
+ * Do example for "Offer a Close Action for Controls" on the Popover page.
244
+ * Add a `Popover.Close` action beside the controls.
245
+ * @module
246
+ */
247
+ import { Button, style, TextInput } from '@tempoxyz/ds'
248
+
249
+ /** Renders the static preview, which the guideline card shows inert. */
250
+ export function Demo() {
251
+ return (
252
+ <div {...styles.popup()}>
253
+ <span {...styles.title()}>Address label</span>
254
+ <TextInput.Group>
255
+ <TextInput.Control aria-label="Label" defaultValue="Alex, main wallet" />
256
+ </TextInput.Group>
257
+ <div {...styles.actions()}>
258
+ <Button size="small" variant="secondary">
259
+ Cancel
260
+ </Button>
261
+ <Button size="small">Save label</Button>
262
+ </div>
263
+ </div>
264
+ )
265
+ }
266
+
267
+ namespace styles {
268
+ export const actions = style({
269
+ columnGap: '8',
270
+ display: 'flex',
271
+ justifyContent: 'flex-end',
272
+ marginTop: '4',
273
+ })
274
+
275
+ export const popup = style({
276
+ backgroundColor: 'background.elevated',
277
+ borderRadius: 'sm',
278
+ boxShadow: 'regular',
279
+ boxSizing: 'border-box',
280
+ display: 'flex',
281
+ flexDirection: 'column',
282
+ padding: '20',
283
+ rowGap: '8',
284
+ width: '16rem !custom',
285
+ })
286
+
287
+ export const title = style({ color: 'content.primary', typography: 'body.b1Strong' })
288
+ }
289
+ ```
290
+
291
+ **Don't:** Rely on Escape or an outside press to leave a popover with controls.
292
+
293
+ ```tsx
294
+ /**
295
+ * Don't example for "Offer a Close Action for Controls" on the Popover page.
296
+ * Don't rely on Escape or an outside press to leave a popover with controls.
297
+ * @module
298
+ */
299
+ import { style, TextInput } from '@tempoxyz/ds'
300
+
301
+ /** Renders the static preview, which the guideline card shows inert. */
302
+ export function Demo() {
303
+ return (
304
+ <div {...styles.popup()}>
305
+ <span {...styles.title()}>Address label</span>
306
+ <TextInput.Group>
307
+ <TextInput.Control aria-label="Label" defaultValue="Alex, main wallet" />
308
+ </TextInput.Group>
309
+ </div>
310
+ )
311
+ }
312
+
313
+ namespace styles {
314
+ export const popup = style({
315
+ backgroundColor: 'background.elevated',
316
+ borderRadius: 'sm',
317
+ boxShadow: 'regular',
318
+ boxSizing: 'border-box',
319
+ display: 'flex',
320
+ flexDirection: 'column',
321
+ padding: '20',
322
+ rowGap: '8',
323
+ width: '16rem !custom',
324
+ })
325
+
326
+ export const title = style({ color: 'content.primary', typography: 'body.b1Strong' })
327
+ }
328
+ ```
329
+
330
+ ### Point at Small Triggers
331
+
332
+ `Popover.Popup` opens 8px from its trigger. If the trigger is small, such as an info icon in a table header, add `Popover.Arrow`.
333
+
334
+ **Do:** Add `Popover.Arrow` to point at a small trigger.
335
+
336
+ ```tsx
337
+ /**
338
+ * Do example for "Point at Small Triggers" on the Popover page.
339
+ * Add `Popover.Arrow` to point at a small trigger.
340
+ * @module
341
+ */
342
+ import { Button, style } from '@tempoxyz/ds'
343
+ import { InfoCircle } from '@tempoxyz/ds/icons'
344
+
345
+ /** Renders the static preview, which the guideline card shows inert. */
346
+ export function Demo() {
347
+ return (
348
+ <div {...styles.stack()}>
349
+ <div {...styles.header()}>
350
+ <span {...styles.column()}>
351
+ Fee
352
+ <Button aria-label="About fee" shape="icon" size="small" variant="tertiary">
353
+ <InfoCircle />
354
+ </Button>
355
+ </span>
356
+ <span {...styles.column()}>
357
+ Throughput
358
+ <Button aria-label="About throughput" shape="icon" size="small" variant="tertiary">
359
+ <InfoCircle />
360
+ </Button>
361
+ </span>
362
+ </div>
363
+ <div {...styles.popup()}>
364
+ {/* Popover.Arrow needs an open popup, so this preview draws its shape in place. */}
365
+ <svg
366
+ aria-hidden="true"
367
+ fill="currentColor"
368
+ height="10"
369
+ viewBox="0 0 20 10"
370
+ width="20"
371
+ {...styles.arrow()}
372
+ >
373
+ <path d="M0 10C4 10 7 7 8.6 4.6a2 2 0 0 1 2.8 0C13 7 16 10 20 10Z" />
374
+ </svg>
375
+ <p {...styles.description()}>Paid in the token you send, about 0.01 USDC.</p>
376
+ </div>
377
+ </div>
378
+ )
379
+ }
380
+
381
+ namespace styles {
382
+ export const arrow = style({
383
+ color: 'background.elevated',
384
+ left: '4.25rem !custom',
385
+ position: 'absolute',
386
+ top: '-10px !custom',
387
+ })
388
+
389
+ export const column = style({
390
+ alignItems: 'center',
391
+ color: 'content.secondary',
392
+ columnGap: '2px !custom',
393
+ display: 'flex',
394
+ typography: 'body.b3',
395
+ })
396
+
397
+ export const description = style({
398
+ color: 'content.secondary',
399
+ margin: '0 !custom',
400
+ typography: 'body.b2',
401
+ })
402
+
403
+ export const header = style({ columnGap: '24', display: 'flex', paddingInlineStart: '24' })
404
+
405
+ export const popup = style({
406
+ backgroundColor: 'background.elevated',
407
+ borderRadius: 'sm',
408
+ boxShadow: 'regular',
409
+ boxSizing: 'border-box',
410
+ padding: '16',
411
+ position: 'relative',
412
+ width: '15rem !custom',
413
+ })
414
+
415
+ export const stack = style({ display: 'flex', flexDirection: 'column', rowGap: '8' })
416
+ }
417
+ ```
418
+
419
+ **Don't:** Leave the popup's trigger unclear among small icons.
420
+
421
+ ```tsx
422
+ /**
423
+ * Don't example for "Point at Small Triggers" on the Popover page.
424
+ * Don't leave the popup's trigger unclear among small icons.
425
+ * @module
426
+ */
427
+ import { Button, style } from '@tempoxyz/ds'
428
+ import { InfoCircle } from '@tempoxyz/ds/icons'
429
+
430
+ /** Renders the static preview, which the guideline card shows inert. */
431
+ export function Demo() {
432
+ return (
433
+ <div {...styles.stack()}>
434
+ <div {...styles.header()}>
435
+ <span {...styles.column()}>
436
+ Fee
437
+ <Button aria-label="About fee" shape="icon" size="small" variant="tertiary">
438
+ <InfoCircle />
439
+ </Button>
440
+ </span>
441
+ <span {...styles.column()}>
442
+ Throughput
443
+ <Button aria-label="About throughput" shape="icon" size="small" variant="tertiary">
444
+ <InfoCircle />
445
+ </Button>
446
+ </span>
447
+ </div>
448
+ <div {...styles.popup()}>
449
+ <p {...styles.description()}>Paid in the token you send, about 0.01 USDC.</p>
450
+ </div>
451
+ </div>
452
+ )
453
+ }
454
+
455
+ namespace styles {
456
+ export const column = style({
457
+ alignItems: 'center',
458
+ color: 'content.secondary',
459
+ columnGap: '2px !custom',
460
+ display: 'flex',
461
+ typography: 'body.b3',
462
+ })
463
+
464
+ export const description = style({
465
+ color: 'content.secondary',
466
+ margin: '0 !custom',
467
+ typography: 'body.b2',
468
+ })
469
+
470
+ export const header = style({ columnGap: '24', display: 'flex', paddingInlineStart: '24' })
471
+
472
+ export const popup = style({
473
+ backgroundColor: 'background.elevated',
474
+ borderRadius: 'sm',
475
+ boxShadow: 'regular',
476
+ boxSizing: 'border-box',
477
+ padding: '16',
478
+ width: '15rem !custom',
479
+ })
480
+
481
+ export const stack = style({ display: 'flex', flexDirection: 'column', rowGap: '8' })
482
+ }
483
+ ```
484
+
485
+ ## Content
486
+
487
+ ### Title With the Subject
488
+
489
+ Name the value or setting, such as Network fee, with no question. Put the explanation in `Popover.Description`.
490
+
491
+ ### Lead With the Answer
492
+
493
+ Start with the explanation, such as Transactions per second, averaged over each block. Keep it under about 25 words.
494
+
495
+ ## Accessibility
496
+
497
+ ### Semantics
498
+
499
+ * **Popover.Trigger (button):** Announces a dialog that click and keyboard open.
500
+ * **Popover.Popup (dialog):** A non-modal dialog, named by its title.
501
+ * **Popover.Title (h2):** Names the popup.
502
+ * **Popover.Description (p):** Describes the popup to screen readers.
503
+ * **Popover.Arrow (aria-hidden):** Decorative and hidden from assistive technology.
504
+
505
+ ### Keyboard
506
+
507
+ * **Open and Activate (Enter or Space):** Opens the popover from the trigger, and activates the focused control in it.
508
+ * **Move Through the Popup (Tab):** Moves through the controls in the popup. Past the last control, the popover closes.
509
+ * **Return to the Trigger (Shift+Tab):** From the first control, moves focus back to the trigger.
510
+ * **Close the Popover (Escape):** Closes the popover.
511
+
512
+ ### Focus
513
+
514
+ * **Opening (initialFocus):** Focus moves to the first control, or to the popup on touch. Pass `initialFocus` to change it.
515
+ * **Non-Modal (modal):** Focus is not trapped, and the page stays interactive unless you set `modal`.
516
+ * **Outside Press:** A press outside the popup closes it.
517
+ * **Closing (finalFocus):** Escape or an outside press returns focus to the trigger. If the trigger is gone, pass `finalFocus`.
518
+
519
+ ### Your Responsibilities
520
+
521
+ * **Render Popover.Title:** Always render a title, so the dialog has an accessible name.
522
+ * **Name Icon-Only Triggers (aria-label):** Name the trigger's subject, such as "About throughput".
523
+
524
+ ## Related
525
+
526
+ [Tooltip](/docs/components/tooltip)
527
+
528
+ Use for short labels on icon buttons.
529
+
530
+ [Dialog](/docs/components/dialog)
531
+
532
+ Use for focused tasks that block the page.
533
+
534
+ [Drawer](/docs/components/drawer)
535
+
536
+ Use for long content and bottom sheets.
537
+
538
+ [Menu](/docs/components/menu)
539
+
540
+ Use for lists of actions.
541
+
542
+ [Dashboards](/docs/patterns/dashboards)
543
+
544
+ Covers explaining metrics.