@tempoxyz/ds 0.3.10 → 0.3.13

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 (210) hide show
  1. package/README.md +7 -6
  2. package/dist/docs/AGENTS.md +12 -0
  3. package/dist/docs/index.md +145 -0
  4. package/dist/docs/marketing/introduction/getting-started.md +241 -0
  5. package/dist/docs/product/components/accordion.md +489 -0
  6. package/dist/docs/product/components/address-card.md +147 -0
  7. package/dist/docs/product/components/agent-logo.md +194 -0
  8. package/dist/docs/product/components/alert-dialog.md +631 -0
  9. package/dist/docs/product/components/alert.md +448 -0
  10. package/dist/docs/product/components/amount-input.md +305 -0
  11. package/dist/docs/product/components/amount.md +794 -0
  12. package/dist/docs/product/components/app-shell.md +559 -0
  13. package/dist/docs/product/components/asset-chip.md +294 -0
  14. package/dist/docs/product/components/autocomplete.md +620 -0
  15. package/dist/docs/product/components/avatar.md +321 -0
  16. package/dist/docs/product/components/badge.md +339 -0
  17. package/dist/docs/product/components/badged-logo.md +116 -0
  18. package/dist/docs/product/components/banner.md +379 -0
  19. package/dist/docs/product/components/bar-chart.md +208 -0
  20. package/dist/docs/product/components/breadcrumbs.md +380 -0
  21. package/dist/docs/product/components/button-group.md +286 -0
  22. package/dist/docs/product/components/button.md +650 -0
  23. package/dist/docs/product/components/calendar.md +375 -0
  24. package/dist/docs/product/components/callout.md +96 -0
  25. package/dist/docs/product/components/checkbox-group.md +521 -0
  26. package/dist/docs/product/components/checkbox.md +467 -0
  27. package/dist/docs/product/components/choice-group.md +516 -0
  28. package/dist/docs/product/components/choicebox.md +641 -0
  29. package/dist/docs/product/components/code.md +100 -0
  30. package/dist/docs/product/components/combobox.md +939 -0
  31. package/dist/docs/product/components/container.md +257 -0
  32. package/dist/docs/product/components/copy-button.md +642 -0
  33. package/dist/docs/product/components/date-picker.md +514 -0
  34. package/dist/docs/product/components/dialog.md +1332 -0
  35. package/dist/docs/product/components/drawer.md +966 -0
  36. package/dist/docs/product/components/empty.md +340 -0
  37. package/dist/docs/product/components/field.md +570 -0
  38. package/dist/docs/product/components/fieldset.md +398 -0
  39. package/dist/docs/product/components/frame.md +434 -0
  40. package/dist/docs/product/components/gauge.md +299 -0
  41. package/dist/docs/product/components/get-started-visual.md +117 -0
  42. package/dist/docs/product/components/grid.md +288 -0
  43. package/dist/docs/product/components/hero-visual.md +155 -0
  44. package/dist/docs/product/components/hex.md +487 -0
  45. package/dist/docs/product/components/icon-tile.md +292 -0
  46. package/dist/docs/product/components/identicon.md +371 -0
  47. package/dist/docs/product/components/inline.md +233 -0
  48. package/dist/docs/product/components/inset.md +225 -0
  49. package/dist/docs/product/components/kbd.md +423 -0
  50. package/dist/docs/product/components/list-group.md +981 -0
  51. package/dist/docs/product/components/loading-dots.md +237 -0
  52. package/dist/docs/product/components/menu.md +934 -0
  53. package/dist/docs/product/components/native-select.md +204 -0
  54. package/dist/docs/product/components/network-logo.md +248 -0
  55. package/dist/docs/product/components/number-field.md +543 -0
  56. package/dist/docs/product/components/otp-field.md +616 -0
  57. package/dist/docs/product/components/pagination.md +516 -0
  58. package/dist/docs/product/components/popover.md +544 -0
  59. package/dist/docs/product/components/progress.md +388 -0
  60. package/dist/docs/product/components/qr.md +314 -0
  61. package/dist/docs/product/components/radio-group.md +528 -0
  62. package/dist/docs/product/components/secret-value.md +406 -0
  63. package/dist/docs/product/components/select.md +751 -0
  64. package/dist/docs/product/components/separator.md +379 -0
  65. package/dist/docs/product/components/sidebar-menu.md +922 -0
  66. package/dist/docs/product/components/skeleton.md +517 -0
  67. package/dist/docs/product/components/slider.md +539 -0
  68. package/dist/docs/product/components/snippet.md +424 -0
  69. package/dist/docs/product/components/spinner.md +216 -0
  70. package/dist/docs/product/components/split-bar.md +139 -0
  71. package/dist/docs/product/components/split-button.md +464 -0
  72. package/dist/docs/product/components/stack.md +299 -0
  73. package/dist/docs/product/components/status-chip.md +226 -0
  74. package/dist/docs/product/components/status-indicator.md +119 -0
  75. package/dist/docs/product/components/status-row.md +174 -0
  76. package/dist/docs/product/components/stepper.md +451 -0
  77. package/dist/docs/product/components/success-hero.md +157 -0
  78. package/dist/docs/product/components/surface.md +639 -0
  79. package/dist/docs/product/components/switch.md +472 -0
  80. package/dist/docs/product/components/table.md +967 -0
  81. package/dist/docs/product/components/tabs.md +627 -0
  82. package/dist/docs/product/components/tempo-logo.md +185 -0
  83. package/dist/docs/product/components/text-input.md +624 -0
  84. package/dist/docs/product/components/textarea.md +352 -0
  85. package/dist/docs/product/components/toast.md +535 -0
  86. package/dist/docs/product/components/token-logo.md +371 -0
  87. package/dist/docs/product/components/token.md +247 -0
  88. package/dist/docs/product/components/tooltip.md +490 -0
  89. package/dist/docs/product/components/verification-code.md +116 -0
  90. package/dist/docs/product/components/visual.md +249 -0
  91. package/dist/docs/product/components.md +203 -0
  92. package/dist/docs/product/foundations/accessibility.md +377 -0
  93. package/dist/docs/product/foundations/agents.md +150 -0
  94. package/dist/docs/product/foundations/color.md +522 -0
  95. package/dist/docs/product/foundations/content/tone.md +194 -0
  96. package/dist/docs/product/foundations/content/voice.md +194 -0
  97. package/dist/docs/product/foundations/content/writing-style.md +406 -0
  98. package/dist/docs/product/foundations/iconography.md +282 -0
  99. package/dist/docs/product/foundations/intent.md +360 -0
  100. package/dist/docs/product/foundations/layout.md +508 -0
  101. package/dist/docs/product/foundations/linter.md +496 -0
  102. package/dist/docs/product/foundations/motion.md +151 -0
  103. package/dist/docs/product/foundations/radius-and-padding.md +86 -0
  104. package/dist/docs/product/foundations/typography.md +266 -0
  105. package/dist/docs/product/introduction/faq.md +133 -0
  106. package/dist/docs/product/introduction/getting-started.md +377 -0
  107. package/dist/docs/product/patterns/blockchain-values.md +709 -0
  108. package/dist/docs/product/patterns/dashboards.md +638 -0
  109. package/dist/docs/product/patterns/destructive-actions.md +626 -0
  110. package/dist/docs/product/patterns/empty-states.md +612 -0
  111. package/dist/docs/product/patterns/errors-and-validation.md +808 -0
  112. package/dist/docs/product/patterns/feedback-and-status.md +518 -0
  113. package/dist/docs/product/patterns/forms.md +679 -0
  114. package/dist/docs/product/patterns/loading.md +630 -0
  115. package/dist/docs/product/patterns/navigation.md +397 -0
  116. package/dist/docs/product/patterns/payments.md +765 -0
  117. package/dist/docs/product/patterns/responsive-layout.md +997 -0
  118. package/dist/docs/product/patterns/tables-and-lists.md +964 -0
  119. package/dist/docs/product/products/tempo-console.md +671 -0
  120. package/dist/docs/product/products/tempo-performance.md +437 -0
  121. package/dist/docs/product/products/tempo-wallet.md +438 -0
  122. package/dist/marketing/index.d.ts +4 -0
  123. package/dist/marketing/index.d.ts.map +1 -0
  124. package/dist/marketing/index.js +4 -0
  125. package/dist/marketing/index.js.map +1 -0
  126. package/dist/marketing/index.js.zyzz.json +1 -0
  127. package/dist/marketing/vars.d.ts +907 -0
  128. package/dist/marketing/vars.d.ts.map +1 -0
  129. package/dist/marketing/vars.js +15 -0
  130. package/dist/marketing/vars.js.map +1 -0
  131. package/dist/marketing/vars.js.zyzz.json +1 -0
  132. package/dist/marketing/zyzz.config.d.ts +4512 -0
  133. package/dist/marketing/zyzz.config.d.ts.map +1 -0
  134. package/dist/marketing/zyzz.config.js +63 -0
  135. package/dist/marketing/zyzz.config.js.map +1 -0
  136. package/dist/marketing/zyzz.config.js.zyzz.json +1 -0
  137. package/dist/oxlint/index.d.ts +12 -1
  138. package/dist/oxlint/index.d.ts.map +1 -1
  139. package/dist/oxlint/index.js +39 -1
  140. package/dist/oxlint/index.js.map +1 -1
  141. package/dist/oxlint/internal/Docs.d.ts +9 -0
  142. package/dist/oxlint/internal/Docs.d.ts.map +1 -0
  143. package/dist/oxlint/internal/Docs.js +15 -0
  144. package/dist/oxlint/internal/Docs.js.map +1 -0
  145. package/dist/oxlint/internal/Imports.d.ts +1 -1
  146. package/dist/oxlint/internal/Imports.d.ts.map +1 -1
  147. package/dist/oxlint/internal/Imports.js +2 -0
  148. package/dist/oxlint/internal/Imports.js.map +1 -1
  149. package/dist/oxlint/internal/Styles.d.ts +40 -0
  150. package/dist/oxlint/internal/Styles.d.ts.map +1 -0
  151. package/dist/oxlint/internal/Styles.js +194 -0
  152. package/dist/oxlint/internal/Styles.js.map +1 -0
  153. package/dist/oxlint/internal/Tokens.d.ts +16 -0
  154. package/dist/oxlint/internal/Tokens.d.ts.map +1 -0
  155. package/dist/oxlint/internal/Tokens.js +39 -0
  156. package/dist/oxlint/internal/Tokens.js.map +1 -0
  157. package/dist/oxlint/rules/NoCrossSurface.d.ts +2 -2
  158. package/dist/oxlint/rules/NoCrossSurface.js +3 -3
  159. package/dist/oxlint/rules/NoCrossSurface.js.map +1 -1
  160. package/dist/oxlint/rules/NoCustomValues.d.ts +11 -0
  161. package/dist/oxlint/rules/NoCustomValues.d.ts.map +1 -0
  162. package/dist/oxlint/rules/NoCustomValues.js +150 -0
  163. package/dist/oxlint/rules/NoCustomValues.js.map +1 -0
  164. package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts +11 -0
  165. package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts.map +1 -0
  166. package/dist/oxlint/rules/NoSingleKeyShortcuts.js +158 -0
  167. package/dist/oxlint/rules/NoSingleKeyShortcuts.js.map +1 -0
  168. package/dist/oxlint/rules/PreferComponent.d.ts +3 -2
  169. package/dist/oxlint/rules/PreferComponent.d.ts.map +1 -1
  170. package/dist/oxlint/rules/PreferComponent.js +11 -4
  171. package/dist/oxlint/rules/PreferComponent.js.map +1 -1
  172. package/dist/oxlint/rules/PreferLayout.d.ts +9 -0
  173. package/dist/oxlint/rules/PreferLayout.d.ts.map +1 -0
  174. package/dist/oxlint/rules/PreferLayout.js +90 -0
  175. package/dist/oxlint/rules/PreferLayout.js.map +1 -0
  176. package/dist/oxlint/rules/PreferProgress.d.ts +9 -0
  177. package/dist/oxlint/rules/PreferProgress.d.ts.map +1 -0
  178. package/dist/oxlint/rules/PreferProgress.js +43 -0
  179. package/dist/oxlint/rules/PreferProgress.js.map +1 -0
  180. package/dist/oxlint/rules/PreferSurface.d.ts +9 -0
  181. package/dist/oxlint/rules/PreferSurface.d.ts.map +1 -0
  182. package/dist/oxlint/rules/PreferSurface.js +55 -0
  183. package/dist/oxlint/rules/PreferSurface.js.map +1 -0
  184. package/dist/oxlint/rules/RequireAccessibleName.d.ts.map +1 -1
  185. package/dist/oxlint/rules/RequireAccessibleName.js +3 -1
  186. package/dist/oxlint/rules/RequireAccessibleName.js.map +1 -1
  187. package/dist/oxlint/rules/RequireScrollRegion.d.ts +11 -0
  188. package/dist/oxlint/rules/RequireScrollRegion.d.ts.map +1 -0
  189. package/dist/oxlint/rules/RequireScrollRegion.js +71 -0
  190. package/dist/oxlint/rules/RequireScrollRegion.js.map +1 -0
  191. package/dist/web/icons/index.js.zyzz.json +1 -0
  192. package/package.json +6 -1
  193. package/src/marketing/README.md +21 -0
  194. package/src/marketing/index.ts +3 -0
  195. package/src/marketing/vars.ts +751 -0
  196. package/src/marketing/zyzz.config.ts +376 -0
  197. package/src/oxlint/index.ts +40 -1
  198. package/src/oxlint/internal/Docs.ts +18 -0
  199. package/src/oxlint/internal/Imports.ts +2 -1
  200. package/src/oxlint/internal/Styles.ts +240 -0
  201. package/src/oxlint/internal/Tokens.ts +43 -0
  202. package/src/oxlint/rules/NoCrossSurface.ts +3 -3
  203. package/src/oxlint/rules/NoCustomValues.ts +170 -0
  204. package/src/oxlint/rules/NoSingleKeyShortcuts.ts +190 -0
  205. package/src/oxlint/rules/PreferComponent.ts +11 -4
  206. package/src/oxlint/rules/PreferLayout.ts +96 -0
  207. package/src/oxlint/rules/PreferProgress.ts +49 -0
  208. package/src/oxlint/rules/PreferSurface.ts +70 -0
  209. package/src/oxlint/rules/RequireAccessibleName.ts +3 -1
  210. package/src/oxlint/rules/RequireScrollRegion.ts +92 -0
@@ -0,0 +1,155 @@
1
+ # HeroVisual
2
+
3
+ Shows animated streaks and a title beside the steps of a setup flow.
4
+
5
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/HeroVisual.tsx)
6
+
7
+ Figma: [Content/Hero Visual](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-4030)
8
+
9
+ ## Overview
10
+
11
+ A hero visual renders a dark 520px card with the Tempo wordmark at the top and a title block at the bottom. `step` selects the streaks of the current step, and the next step slides new streaks in.
12
+
13
+ ## Examples
14
+
15
+ ### Basic
16
+
17
+ Compose a title and a description. The card stays dark in both color schemes.
18
+
19
+ ```tsx
20
+ /** Demonstrates HeroVisual in the documentation. @module */
21
+ import { HeroVisual, style } from '@tempoxyz/ds'
22
+
23
+ export function Demo() {
24
+ return (
25
+ <div {...styles.frame()}>
26
+ <HeroVisual step="connect">
27
+ <HeroVisual.Title>Your agent</HeroVisual.Title>
28
+ <HeroVisual.Description>One command, and it can pay its own way.</HeroVisual.Description>
29
+ </HeroVisual>
30
+ </div>
31
+ )
32
+ }
33
+
34
+ namespace styles {
35
+ export const frame = style({ maxWidth: '31.25rem !custom', width: '100% !custom' })
36
+ }
37
+ ```
38
+
39
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/HeroVisual/Basic.tsx)
40
+
41
+ ### Steps
42
+
43
+ Advance `step` with the flow. The title brightens on the steps that complete it.
44
+
45
+ ```tsx
46
+ /** Demonstrates HeroVisual in the documentation. @module */
47
+ import { Button, HeroVisual, style } from '@tempoxyz/ds'
48
+ import { useState } from 'react'
49
+
50
+ const steps = ['connect', 'approve', 'fund', 'funding', 'funded'] as const
51
+
52
+ export function Demo() {
53
+ const [index, setIndex] = useState(0)
54
+
55
+ return (
56
+ <div {...styles.frame()}>
57
+ <HeroVisual step={steps[index]}>
58
+ <HeroVisual.Caption>Claude</HeroVisual.Caption>
59
+ <HeroVisual.Title>Your agent</HeroVisual.Title>
60
+ <HeroVisual.Description>One command, and it can pay its own way.</HeroVisual.Description>
61
+ </HeroVisual>
62
+ <Button onClick={() => setIndex((index + 1) % steps.length)} variant="secondary">
63
+ Next step
64
+ </Button>
65
+ </div>
66
+ )
67
+ }
68
+
69
+ namespace styles {
70
+ export const frame = style({
71
+ display: 'grid',
72
+ gap: '16',
73
+ justifyItems: 'start',
74
+ maxWidth: '31.25rem !custom',
75
+ width: '100% !custom',
76
+ })
77
+ }
78
+ ```
79
+
80
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/HeroVisual/Steps.tsx)
81
+
82
+ ## Anatomy
83
+
84
+ Import the component and assemble its parts.
85
+
86
+ ```tsx
87
+ import { HeroVisual } from '@tempoxyz/ds'
88
+
89
+ <HeroVisual>
90
+ <HeroVisual.Caption />
91
+ <HeroVisual.Title />
92
+ <HeroVisual.Description />
93
+ </HeroVisual>
94
+ ```
95
+
96
+ ## Guidelines
97
+
98
+ ### When to Use
99
+
100
+ * Accompany the steps of an agent or wallet setup flow, beside the form of each step.
101
+
102
+ ### When Not to Use
103
+
104
+ * Use [SuccessHero](success-hero.md) once the flow finishes.
105
+ * Use [GetStartedVisual](get-started-visual.md) for the cards of a get started list.
106
+
107
+ ### Advance the Step With the Flow
108
+
109
+ * **Agent (connect to funded):** The agent flow runs connect, approve, fund, funding, and funded.
110
+ * **Wallet (wallet to secure):** The wallet flow runs wallet, wallet funding, wallet funded, and secure.
111
+
112
+ ### Keep the Title Short
113
+
114
+ The title sets at display size and fits about 12 characters on one line.
115
+
116
+ **Do:** Name the subject of the flow in two words.
117
+
118
+ ```tsx
119
+ <HeroVisual step="connect" style={{ minHeight: 240, width: 320 }}>
120
+ <HeroVisual.Title>Your agent</HeroVisual.Title>
121
+ </HeroVisual>
122
+ ```
123
+
124
+ **Don't:** Write a sentence in the title.
125
+
126
+ ```tsx
127
+ <HeroVisual step="connect" style={{ minHeight: 240, width: 320 }}>
128
+ <HeroVisual.Title>Set up your agent to pay for things</HeroVisual.Title>
129
+ </HeroVisual>
130
+ ```
131
+
132
+ ## Content
133
+
134
+ * **Caption:** Name the agent or wallet in one or two words.
135
+ * **Title:** Name the subject of the flow, such as Your agent.
136
+ * **Description:** Write one sentence that states what the flow enables.
137
+
138
+ ## Accessibility
139
+
140
+ The card renders a `<div>` with no role. Screen readers skip the artwork and the wordmark, and read the text in order.
141
+
142
+ * **Artwork (aria-hidden):** The streaks and the wordmark are decorative.
143
+ * **HeroVisual.Title (h2):** Announced as a second-level heading.
144
+ * **Reduced Motion (prefers-reduced-motion):** New streaks fade in without movement.
145
+ * **Announce Progress (Your task):** The steps of the flow announce progress, not the card.
146
+
147
+ ## Related
148
+
149
+ [SuccessHero](success-hero.md)
150
+
151
+ Use for the confirmation after the flow finishes.
152
+
153
+ [Stepper](stepper.md)
154
+
155
+ Use for the steps beside the card.
@@ -0,0 +1,487 @@
1
+ # Hex
2
+
3
+ Shows a hex string, such as an address, truncated to fit.
4
+
5
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Hex.tsx)
6
+
7
+ ## Overview
8
+
9
+ Hex shows a hex string, such as an address or hash, middle-truncated to fit its container. Both ends stay visible, and screen readers read the full value.
10
+
11
+ ## Examples
12
+
13
+ ### Basic
14
+
15
+ ```tsx
16
+ import { Hex, style } from '@tempoxyz/ds'
17
+
18
+ export function Demo() {
19
+ return (
20
+ <div {...styles.stack()}>
21
+ <Hex value="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" />
22
+ <Hex value="0x1234" />
23
+ <div {...styles.frame()}>
24
+ <Hex value="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" />
25
+ </div>
26
+ </div>
27
+ )
28
+ }
29
+
30
+ namespace styles {
31
+ export const frame = style({
32
+ borderColor: 'line.secondary',
33
+ borderRadius: '2xs',
34
+ borderStyle: 'dashed',
35
+ borderWidth: 'regular',
36
+ boxSizing: 'border-box',
37
+ maxWidth: '100% !custom',
38
+ padding: '8',
39
+ width: '6rem !custom',
40
+ })
41
+
42
+ export const stack = style({ display: 'grid', gap: '12', justifyItems: 'start' })
43
+ }
44
+ ```
45
+
46
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Hex/Basic.tsx)
47
+
48
+ ### Copy
49
+
50
+ Set `copy` to add a button that copies the full value.
51
+
52
+ ```tsx
53
+ import { CopyButton, Hex, style } from '@tempoxyz/ds'
54
+
55
+ const address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
56
+ const transaction = '0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060'
57
+
58
+ export function Demo() {
59
+ return (
60
+ <div {...styles.stack()}>
61
+ <Hex copy value={transaction} />
62
+ {(['32rem', '20rem', '12rem', '8rem'] as const).map((width) => (
63
+ <div key={width} {...styles.frame({ style: { width } })}>
64
+ <Hex copy value={transaction} />
65
+ </div>
66
+ ))}
67
+ <div {...styles.row()}>
68
+ <CopyButton value={address} />
69
+ <CopyButton value={address} variant="secondary" />
70
+ <CopyButton size="large" value={address} variant="primary" />
71
+ </div>
72
+ </div>
73
+ )
74
+ }
75
+
76
+ namespace styles {
77
+ export const frame = style({
78
+ borderColor: 'line.secondary',
79
+ borderRadius: '2xs',
80
+ borderStyle: 'dashed',
81
+ borderWidth: 'regular',
82
+ boxSizing: 'border-box',
83
+ maxWidth: '100% !custom',
84
+ padding: '8',
85
+ })
86
+
87
+ export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '12' })
88
+
89
+ export const stack = style({ display: 'grid', gap: '12', justifyItems: 'start' })
90
+ }
91
+ ```
92
+
93
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Hex/Copy.tsx)
94
+
95
+ ### Evm
96
+
97
+ Set `evm={false}` for values without a `0x` prefix.
98
+
99
+ ```tsx
100
+ import { Hex } from '@tempoxyz/ds'
101
+
102
+ export function Demo() {
103
+ return <Hex evm={false} value="a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718" />
104
+ }
105
+ ```
106
+
107
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Hex/Evm.tsx)
108
+
109
+ ### Variant
110
+
111
+ Set `variant` to `inline` (default) or `filled`.
112
+
113
+ ```tsx
114
+ import { Hex, style } from '@tempoxyz/ds'
115
+
116
+ const transaction = '0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060'
117
+
118
+ export function Demo() {
119
+ return (
120
+ <div {...styles.stack()}>
121
+ <Hex copy value={transaction} variant="inline" />
122
+ <div {...styles.resizable()}>
123
+ <Hex copy value={transaction} variant="filled" />
124
+ </div>
125
+ </div>
126
+ )
127
+ }
128
+
129
+ namespace styles {
130
+ export const resizable = style({
131
+ maxWidth: '100% !custom',
132
+ minWidth: 'min(10rem, 100%) !custom',
133
+ overflow: 'hidden',
134
+ resize: 'horizontal !custom',
135
+ width: '28rem !custom',
136
+ })
137
+
138
+ export const stack = style({ display: 'grid', gap: '12', justifyItems: 'start' })
139
+ }
140
+ ```
141
+
142
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Hex/Variant.tsx)
143
+
144
+ ### Size
145
+
146
+ Set `size` to `small`, `medium` (default), or `large`.
147
+
148
+ ```tsx
149
+ import { Hex, style } from '@tempoxyz/ds'
150
+
151
+ export function Demo() {
152
+ return (
153
+ <div {...styles.stack()}>
154
+ {(['small', 'medium', 'large'] as const).map((size) => (
155
+ <Hex
156
+ copy
157
+ key={size}
158
+ size={size}
159
+ value="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
160
+ variant="filled"
161
+ />
162
+ ))}
163
+ </div>
164
+ )
165
+ }
166
+
167
+ namespace styles {
168
+ export const stack = style({ display: 'grid', gap: '12', justifyItems: 'start' })
169
+ }
170
+ ```
171
+
172
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Hex/Size.tsx)
173
+
174
+ ## Anatomy
175
+
176
+ Import the component and assemble its parts.
177
+
178
+ ```tsx
179
+ import { Hex } from '@tempoxyz/ds'
180
+
181
+ <Hex />
182
+
183
+ <Hex.Root>
184
+ <Hex.Text />
185
+ <Hex.Copy />
186
+ </Hex.Root>
187
+ ```
188
+
189
+ ## Guidelines
190
+
191
+ ### When to Use
192
+
193
+ * Show an address or transaction hash in a row, table, or card where it may not fit.
194
+ * Show a receive address as a standalone field with `variant="filled"`. The whole row copies.
195
+
196
+ ### When Not to Use
197
+
198
+ * Use [SecretValue](secret-value.md) for private keys and other secrets. Hex shows its value in the clear.
199
+ * Use [Snippet](snippet.md) for URLs, commands, and other values that aren't hex.
200
+ * Use [CopyButton](copy-button.md) alone when the value isn't displayed.
201
+
202
+ ### Always Offer Copy
203
+
204
+ Set `copy` wherever people need the full value. To name the button, compose the parts and pass `aria-label` to `Hex.Copy`. Link a transaction hash to its block explorer page for verification.
205
+
206
+ ```tsx
207
+ <Hex.Root value={address}>
208
+ <Hex.Text />
209
+ <Hex.Copy aria-label="Copy address" />
210
+ </Hex.Root>
211
+ ```
212
+
213
+ **Do:** Add a copy button, named by what it copies.
214
+
215
+ ```tsx
216
+ /** Do example for "Always Offer Copy" on the Hex page: add a copy button, named by what it copies. @module */
217
+ import { Hex } from '@tempoxyz/ds'
218
+
219
+ /** Renders the static preview, which the guideline card shows inert. */
220
+ export function Demo() {
221
+ return (
222
+ <Hex.Root value="0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060">
223
+ <Hex.Text />
224
+ <Hex.Copy aria-label="Copy transaction hash" />
225
+ </Hex.Root>
226
+ )
227
+ }
228
+ ```
229
+
230
+ **Don't:** Show a truncated value without a way to copy it.
231
+
232
+ ```tsx
233
+ /**
234
+ * Don't example for "Always Offer Copy" on the Hex page.
235
+ * Don't show a truncated value without a way to copy it.
236
+ * @module
237
+ */
238
+ import { Hex } from '@tempoxyz/ds'
239
+
240
+ /** Renders the static preview, which the guideline card shows inert. */
241
+ export function Demo() {
242
+ return <Hex value="0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060" />
243
+ }
244
+ ```
245
+
246
+ ### Truncate in the Middle
247
+
248
+ People check an address by its first and last characters. For plain strings, such as a [Toast](toast.md) message, `formatHex` keeps both ends too.
249
+
250
+ **Do:** Keep both ends of the value visible.
251
+
252
+ ```tsx
253
+ /** Do example for "Truncate in the Middle" on the Hex page: keep both ends of the value visible. @module */
254
+ import { Hex, style } from '@tempoxyz/ds'
255
+
256
+ /** Renders the static preview, which the guideline card shows inert. */
257
+ export function Demo() {
258
+ return (
259
+ <div {...styles.frame()}>
260
+ <Hex copy value="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" />
261
+ </div>
262
+ )
263
+ }
264
+
265
+ namespace styles {
266
+ export const frame = style({ maxWidth: '100% !custom', width: '12rem !custom' })
267
+ }
268
+ ```
269
+
270
+ **Don't:** Truncate the end of an address with an ellipsis.
271
+
272
+ ```tsx
273
+ /**
274
+ * Don't example for "Truncate in the Middle" on the Hex page.
275
+ * Don't truncate the end of an address with an ellipsis.
276
+ * @module
277
+ */
278
+ import { style } from '@tempoxyz/ds'
279
+
280
+ /** Renders the static preview, which the guideline card shows inert. */
281
+ export function Demo() {
282
+ return <span {...styles.text()}>0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045</span>
283
+ }
284
+
285
+ namespace styles {
286
+ export const text = style({
287
+ color: 'content.primary',
288
+ display: 'block',
289
+ maxWidth: '100% !custom',
290
+ overflow: 'hidden',
291
+ textOverflow: 'ellipsis !custom',
292
+ typography: 'mono.m1',
293
+ whiteSpace: 'nowrap',
294
+ width: '12rem !custom',
295
+ })
296
+ }
297
+ ```
298
+
299
+ ### Show the Full Address Before Sending
300
+
301
+ Look-alike addresses can match the first and last four characters of a real one. Hex truncates only when its container is narrower than the value, so give it room on a payment review and ask people to check it against its source.
302
+
303
+ **Do:** Show every character of the recipient on review.
304
+
305
+ ```tsx
306
+ /**
307
+ * Do example for "Show the Full Address Before Sending" on the Hex page.
308
+ * Show every character of the recipient on review.
309
+ * @module
310
+ */
311
+ import { Hex, style } from '@tempoxyz/ds'
312
+
313
+ /** Renders the static preview, which the guideline card shows inert. */
314
+ export function Demo() {
315
+ return (
316
+ <div {...styles.field()}>
317
+ <span {...styles.label()}>Recipient</span>
318
+ <Hex copy value="0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc" variant="filled" />
319
+ </div>
320
+ )
321
+ }
322
+
323
+ namespace styles {
324
+ export const field = style({ display: 'grid', gap: '4', width: '100% !custom' })
325
+
326
+ export const label = style({ color: 'content.secondary', typography: 'body.b2' })
327
+ }
328
+ ```
329
+
330
+ **Don't:** Truncate the address people confirm a payment to.
331
+
332
+ ```tsx
333
+ /**
334
+ * Don't example for "Show the Full Address Before Sending" on the Hex page.
335
+ * Don't truncate the address people confirm a payment to.
336
+ * @module
337
+ */
338
+ import { Hex, style } from '@tempoxyz/ds'
339
+
340
+ /** Renders the static preview, which the guideline card shows inert. */
341
+ export function Demo() {
342
+ return (
343
+ <div {...styles.field()}>
344
+ <span {...styles.label()}>Recipient</span>
345
+ <Hex copy value="0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc" variant="filled" />
346
+ </div>
347
+ )
348
+ }
349
+
350
+ namespace styles {
351
+ export const field = style({
352
+ display: 'grid',
353
+ gap: '4',
354
+ maxWidth: '100% !custom',
355
+ width: '12rem !custom',
356
+ })
357
+
358
+ export const label = style({ color: 'content.secondary', typography: 'body.b2' })
359
+ }
360
+ ```
361
+
362
+ ### Label Every Value
363
+
364
+ **Do:** Put a label beside each value, such as Recipient or Transaction hash.
365
+
366
+ ```tsx
367
+ /**
368
+ * Do example for "Label Every Value" on the Hex page.
369
+ * Put a label beside each value, such as Recipient or Transaction hash.
370
+ * @module
371
+ */
372
+ import { Hex, style } from '@tempoxyz/ds'
373
+
374
+ /** Renders the static preview, which the guideline card shows inert. */
375
+ export function Demo() {
376
+ return (
377
+ <div {...styles.list()}>
378
+ <div {...styles.row()}>
379
+ <span {...styles.label()}>Recipient</span>
380
+ <Hex size="small" value="0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc" />
381
+ </div>
382
+ <div {...styles.row()}>
383
+ <span {...styles.label()}>Transaction hash</span>
384
+ <Hex
385
+ size="small"
386
+ value="0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
387
+ />
388
+ </div>
389
+ </div>
390
+ )
391
+ }
392
+
393
+ namespace styles {
394
+ export const label = style({
395
+ color: 'content.secondary',
396
+ flexShrink: '0 !custom',
397
+ typography: 'body.b2',
398
+ })
399
+
400
+ export const list = style({ display: 'grid', gap: '12', width: '100% !custom' })
401
+
402
+ export const row = style({
403
+ alignItems: 'baseline',
404
+ display: 'flex',
405
+ gap: '16',
406
+ justifyContent: 'space-between',
407
+ minWidth: '0',
408
+ })
409
+ }
410
+ ```
411
+
412
+ **Don't:** Show bare hex strings. They don't identify themselves.
413
+
414
+ ```tsx
415
+ /**
416
+ * Don't example for "Label Every Value" on the Hex page.
417
+ * Don't show bare hex strings. They don't identify themselves.
418
+ * @module
419
+ */
420
+ import { Hex, style } from '@tempoxyz/ds'
421
+
422
+ /** Renders the static preview, which the guideline card shows inert. */
423
+ export function Demo() {
424
+ return (
425
+ <div {...styles.list()}>
426
+ <Hex size="small" value="0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc" />
427
+ <Hex
428
+ size="small"
429
+ value="0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
430
+ />
431
+ </div>
432
+ )
433
+ }
434
+
435
+ namespace styles {
436
+ export const list = style({ display: 'grid', gap: '12', width: '100% !custom' })
437
+ }
438
+ ```
439
+
440
+ ### Pick a Variant
441
+
442
+ * **Inline (inline):** The default, for text, rows, and table cells.
443
+ * **Filled (filled):** A tinted field that copies on click, for standalone values.
444
+ * **No Prefix (evm={false}):** For hex values without a `0x` prefix.
445
+
446
+ ## Accessibility
447
+
448
+ Hex renders a `<span>` with the truncated value on screen and the full value for screen readers. With `copy`, the copy button follows the [WAI-ARIA Authoring Practices button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/).
449
+
450
+ ### Semantics
451
+
452
+ * **Truncated Text (aria-hidden):** Hidden. Screen readers read the full value from hidden text.
453
+ * **Short Values:** Values that fit render as plain text, with no hidden copy of the value.
454
+ * **Hex.Copy (button):** Named "Copy" and the value, or `aria-label`. A copy renames it "Copied" for two seconds and announces it.
455
+ * **Filled Variant (filled):** A click anywhere on the row copies. The button stays the keyboard path.
456
+
457
+ ### Keyboard
458
+
459
+ * **Move to Copy (Tab):** Moves focus to the copy button. The value takes no focus.
460
+ * **Copy the Value (Enter or Space):** Copies the full value. Focus stays on the button.
461
+
462
+ ### Your Responsibilities
463
+
464
+ * **Name the Copy Button (aria-label):** Name what it copies, such as "Copy address". The default name reads the full value.
465
+ * **Show a Name:** If a name or contact label exists, show it with the address. A raw hex string is hard to listen to.
466
+
467
+ ## Related
468
+
469
+ [CopyButton](copy-button.md)
470
+
471
+ Use for copying without a visible value.
472
+
473
+ [Identicon](identicon.md)
474
+
475
+ Use for an image beside an address.
476
+
477
+ [SecretValue](secret-value.md)
478
+
479
+ Use for secrets.
480
+
481
+ [Snippet](snippet.md)
482
+
483
+ Use for commands and URLs.
484
+
485
+ [Blockchain Values](../patterns/blockchain-values.md)
486
+
487
+ Covers addresses, hashes, and amounts.