@tempoxyz/ds 0.3.11 → 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.
- package/README.md +7 -6
- package/dist/docs/AGENTS.md +8 -5
- package/dist/docs/index.md +143 -135
- package/dist/docs/marketing/introduction/getting-started.md +241 -0
- package/dist/docs/{components → product/components}/accordion.md +8 -8
- package/dist/docs/{components → product/components}/address-card.md +5 -5
- package/dist/docs/{components → product/components}/agent-logo.md +5 -5
- package/dist/docs/{components → product/components}/alert-dialog.md +11 -11
- package/dist/docs/{components → product/components}/alert.md +11 -11
- package/dist/docs/{components → product/components}/amount-input.md +13 -13
- package/dist/docs/{components → product/components}/amount.md +8 -8
- package/dist/docs/{components → product/components}/app-shell.md +13 -13
- package/dist/docs/{components → product/components}/asset-chip.md +11 -11
- package/dist/docs/{components → product/components}/autocomplete.md +10 -9
- package/dist/docs/{components → product/components}/avatar.md +8 -8
- package/dist/docs/{components → product/components}/badge.md +9 -9
- package/dist/docs/{components → product/components}/badged-logo.md +6 -6
- package/dist/docs/{components → product/components}/banner.md +8 -8
- package/dist/docs/{components → product/components}/bar-chart.md +7 -7
- package/dist/docs/{components → product/components}/breadcrumbs.md +8 -8
- package/dist/docs/{components → product/components}/button-group.md +8 -8
- package/dist/docs/{components → product/components}/button.md +17 -17
- package/dist/docs/{components → product/components}/calendar.md +8 -8
- package/dist/docs/{components → product/components}/callout.md +5 -5
- package/dist/docs/{components → product/components}/checkbox-group.md +13 -13
- package/dist/docs/{components → product/components}/checkbox.md +12 -12
- package/dist/docs/{components → product/components}/choice-group.md +14 -14
- package/dist/docs/{components → product/components}/choicebox.md +9 -9
- package/dist/docs/{components → product/components}/code.md +5 -5
- package/dist/docs/{components → product/components}/combobox.md +9 -9
- package/dist/docs/{components → product/components}/container.md +7 -7
- package/dist/docs/{components → product/components}/copy-button.md +13 -13
- package/dist/docs/{components → product/components}/date-picker.md +11 -11
- package/dist/docs/{components → product/components}/dialog.md +17 -17
- package/dist/docs/{components → product/components}/drawer.md +11 -11
- package/dist/docs/{components → product/components}/empty.md +9 -9
- package/dist/docs/{components → product/components}/field.md +14 -14
- package/dist/docs/{components → product/components}/fieldset.md +6 -6
- package/dist/docs/{components → product/components}/frame.md +9 -9
- package/dist/docs/{components → product/components}/gauge.md +7 -7
- package/dist/docs/{components → product/components}/get-started-visual.md +4 -4
- package/dist/docs/{components → product/components}/grid.md +7 -7
- package/dist/docs/{components → product/components}/hero-visual.md +4 -4
- package/dist/docs/{components → product/components}/hex.md +9 -9
- package/dist/docs/{components → product/components}/icon-tile.md +8 -8
- package/dist/docs/{components → product/components}/identicon.md +7 -7
- package/dist/docs/{components → product/components}/inline.md +7 -7
- package/dist/docs/{components → product/components}/inset.md +8 -8
- package/dist/docs/{components → product/components}/kbd.md +8 -8
- package/dist/docs/{components → product/components}/list-group.md +24 -24
- package/dist/docs/{components → product/components}/loading-dots.md +8 -8
- package/dist/docs/{components → product/components}/menu.md +14 -14
- package/dist/docs/{components → product/components}/native-select.md +7 -7
- package/dist/docs/{components → product/components}/network-logo.md +7 -7
- package/dist/docs/{components → product/components}/number-field.md +8 -8
- package/dist/docs/{components → product/components}/otp-field.md +9 -9
- package/dist/docs/{components → product/components}/pagination.md +8 -8
- package/dist/docs/{components → product/components}/popover.md +11 -11
- package/dist/docs/{components → product/components}/progress.md +10 -10
- package/dist/docs/{components → product/components}/qr.md +8 -8
- package/dist/docs/{components → product/components}/radio-group.md +10 -10
- package/dist/docs/{components → product/components}/secret-value.md +8 -8
- package/dist/docs/{components → product/components}/select.md +13 -13
- package/dist/docs/{components → product/components}/separator.md +7 -7
- package/dist/docs/{components → product/components}/sidebar-menu.md +11 -11
- package/dist/docs/{components → product/components}/skeleton.md +9 -9
- package/dist/docs/{components → product/components}/slider.md +8 -8
- package/dist/docs/{components → product/components}/snippet.md +10 -10
- package/dist/docs/{components → product/components}/spinner.md +12 -12
- package/dist/docs/{components → product/components}/split-bar.md +5 -5
- package/dist/docs/{components → product/components}/split-button.md +11 -11
- package/dist/docs/{components → product/components}/stack.md +8 -8
- package/dist/docs/{components → product/components}/status-chip.md +7 -7
- package/dist/docs/{components → product/components}/status-indicator.md +6 -6
- package/dist/docs/{components → product/components}/status-row.md +7 -7
- package/dist/docs/{components → product/components}/stepper.md +9 -9
- package/dist/docs/{components → product/components}/success-hero.md +5 -5
- package/dist/docs/{components → product/components}/surface.md +11 -11
- package/dist/docs/{components → product/components}/switch.md +11 -11
- package/dist/docs/{components → product/components}/table.md +16 -16
- package/dist/docs/{components → product/components}/tabs.md +11 -11
- package/dist/docs/{components → product/components}/tempo-logo.md +4 -4
- package/dist/docs/{components → product/components}/text-input.md +14 -14
- package/dist/docs/{components → product/components}/textarea.md +7 -7
- package/dist/docs/{components → product/components}/toast.md +11 -11
- package/dist/docs/{components → product/components}/token-logo.md +16 -16
- package/dist/docs/{components → product/components}/token.md +10 -10
- package/dist/docs/{components → product/components}/tooltip.md +11 -11
- package/dist/docs/{components → product/components}/verification-code.md +4 -4
- package/dist/docs/{components → product/components}/visual.md +5 -5
- package/dist/docs/product/components.md +203 -0
- package/dist/docs/{foundations → product/foundations}/accessibility.md +16 -16
- package/dist/docs/{foundations → product/foundations}/agents.md +17 -17
- package/dist/docs/{foundations → product/foundations}/color.md +7 -7
- package/dist/docs/{foundations → product/foundations}/content/tone.md +7 -7
- package/dist/docs/{foundations → product/foundations}/content/voice.md +2 -2
- package/dist/docs/{foundations → product/foundations}/content/writing-style.md +8 -8
- package/dist/docs/{foundations → product/foundations}/iconography.md +11 -11
- package/dist/docs/{foundations → product/foundations}/intent.md +28 -28
- package/dist/docs/{foundations → product/foundations}/layout.md +22 -22
- package/dist/docs/product/foundations/linter.md +496 -0
- package/dist/docs/{foundations → product/foundations}/motion.md +7 -7
- package/dist/docs/{foundations → product/foundations}/radius-and-padding.md +3 -3
- package/dist/docs/{foundations → product/foundations}/typography.md +4 -4
- package/dist/docs/{introduction → product/introduction}/faq.md +22 -21
- package/dist/docs/{introduction → product/introduction}/getting-started.md +4 -4
- package/dist/docs/{patterns → product/patterns}/blockchain-values.md +20 -20
- package/dist/docs/{patterns → product/patterns}/dashboards.md +28 -28
- package/dist/docs/{patterns → product/patterns}/destructive-actions.md +16 -16
- package/dist/docs/{patterns → product/patterns}/empty-states.md +14 -14
- package/dist/docs/{patterns → product/patterns}/errors-and-validation.md +23 -23
- package/dist/docs/{patterns → product/patterns}/feedback-and-status.md +31 -31
- package/dist/docs/{patterns → product/patterns}/forms.md +24 -24
- package/dist/docs/{patterns → product/patterns}/loading.md +19 -19
- package/dist/docs/{patterns → product/patterns}/navigation.md +23 -23
- package/dist/docs/{patterns → product/patterns}/payments.md +20 -20
- package/dist/docs/{patterns → product/patterns}/responsive-layout.md +23 -23
- package/dist/docs/{patterns → product/patterns}/tables-and-lists.md +19 -19
- package/dist/docs/{products → product/products}/tempo-console.md +12 -12
- package/dist/docs/{products → product/products}/tempo-performance.md +11 -11
- package/dist/docs/{products → product/products}/tempo-wallet.md +12 -12
- package/dist/marketing/index.d.ts +4 -0
- package/dist/marketing/index.d.ts.map +1 -0
- package/dist/marketing/index.js +4 -0
- package/dist/marketing/index.js.map +1 -0
- package/dist/marketing/index.js.zyzz.json +1 -0
- package/dist/marketing/vars.d.ts +907 -0
- package/dist/marketing/vars.d.ts.map +1 -0
- package/dist/marketing/vars.js +15 -0
- package/dist/marketing/vars.js.map +1 -0
- package/dist/marketing/vars.js.zyzz.json +1 -0
- package/dist/marketing/zyzz.config.d.ts +4512 -0
- package/dist/marketing/zyzz.config.d.ts.map +1 -0
- package/dist/marketing/zyzz.config.js +63 -0
- package/dist/marketing/zyzz.config.js.map +1 -0
- package/dist/marketing/zyzz.config.js.zyzz.json +1 -0
- package/dist/oxlint/index.d.ts +12 -1
- package/dist/oxlint/index.d.ts.map +1 -1
- package/dist/oxlint/index.js +39 -1
- package/dist/oxlint/index.js.map +1 -1
- package/dist/oxlint/internal/Docs.d.ts +9 -0
- package/dist/oxlint/internal/Docs.d.ts.map +1 -0
- package/dist/oxlint/internal/Docs.js +15 -0
- package/dist/oxlint/internal/Docs.js.map +1 -0
- package/dist/oxlint/internal/Imports.d.ts +1 -1
- package/dist/oxlint/internal/Imports.d.ts.map +1 -1
- package/dist/oxlint/internal/Imports.js +2 -0
- package/dist/oxlint/internal/Imports.js.map +1 -1
- package/dist/oxlint/internal/Styles.d.ts +40 -0
- package/dist/oxlint/internal/Styles.d.ts.map +1 -0
- package/dist/oxlint/internal/Styles.js +194 -0
- package/dist/oxlint/internal/Styles.js.map +1 -0
- package/dist/oxlint/internal/Tokens.d.ts +16 -0
- package/dist/oxlint/internal/Tokens.d.ts.map +1 -0
- package/dist/oxlint/internal/Tokens.js +39 -0
- package/dist/oxlint/internal/Tokens.js.map +1 -0
- package/dist/oxlint/rules/NoCrossSurface.d.ts +2 -2
- package/dist/oxlint/rules/NoCrossSurface.js +3 -3
- package/dist/oxlint/rules/NoCrossSurface.js.map +1 -1
- package/dist/oxlint/rules/NoCustomValues.d.ts +11 -0
- package/dist/oxlint/rules/NoCustomValues.d.ts.map +1 -0
- package/dist/oxlint/rules/NoCustomValues.js +150 -0
- package/dist/oxlint/rules/NoCustomValues.js.map +1 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts +11 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts.map +1 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.js +158 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.js.map +1 -0
- package/dist/oxlint/rules/PreferComponent.d.ts +3 -2
- package/dist/oxlint/rules/PreferComponent.d.ts.map +1 -1
- package/dist/oxlint/rules/PreferComponent.js +11 -4
- package/dist/oxlint/rules/PreferComponent.js.map +1 -1
- package/dist/oxlint/rules/PreferLayout.d.ts +9 -0
- package/dist/oxlint/rules/PreferLayout.d.ts.map +1 -0
- package/dist/oxlint/rules/PreferLayout.js +90 -0
- package/dist/oxlint/rules/PreferLayout.js.map +1 -0
- package/dist/oxlint/rules/PreferProgress.d.ts +9 -0
- package/dist/oxlint/rules/PreferProgress.d.ts.map +1 -0
- package/dist/oxlint/rules/PreferProgress.js +43 -0
- package/dist/oxlint/rules/PreferProgress.js.map +1 -0
- package/dist/oxlint/rules/PreferSurface.d.ts +9 -0
- package/dist/oxlint/rules/PreferSurface.d.ts.map +1 -0
- package/dist/oxlint/rules/PreferSurface.js +55 -0
- package/dist/oxlint/rules/PreferSurface.js.map +1 -0
- package/dist/oxlint/rules/RequireAccessibleName.d.ts.map +1 -1
- package/dist/oxlint/rules/RequireAccessibleName.js +3 -1
- package/dist/oxlint/rules/RequireAccessibleName.js.map +1 -1
- package/dist/oxlint/rules/RequireScrollRegion.d.ts +11 -0
- package/dist/oxlint/rules/RequireScrollRegion.d.ts.map +1 -0
- package/dist/oxlint/rules/RequireScrollRegion.js +71 -0
- package/dist/oxlint/rules/RequireScrollRegion.js.map +1 -0
- package/dist/web/icons/index.js.zyzz.json +1 -0
- package/package.json +6 -1
- package/src/marketing/README.md +21 -0
- package/src/marketing/index.ts +3 -0
- package/src/marketing/vars.ts +751 -0
- package/src/marketing/zyzz.config.ts +376 -0
- package/src/oxlint/index.ts +40 -1
- package/src/oxlint/internal/Docs.ts +18 -0
- package/src/oxlint/internal/Imports.ts +2 -1
- package/src/oxlint/internal/Styles.ts +240 -0
- package/src/oxlint/internal/Tokens.ts +43 -0
- package/src/oxlint/rules/NoCrossSurface.ts +3 -3
- package/src/oxlint/rules/NoCustomValues.ts +170 -0
- package/src/oxlint/rules/NoSingleKeyShortcuts.ts +190 -0
- package/src/oxlint/rules/PreferComponent.ts +11 -4
- package/src/oxlint/rules/PreferLayout.ts +96 -0
- package/src/oxlint/rules/PreferProgress.ts +49 -0
- package/src/oxlint/rules/PreferSurface.ts +70 -0
- package/src/oxlint/rules/RequireAccessibleName.ts +3 -1
- package/src/oxlint/rules/RequireScrollRegion.ts +92 -0
- package/dist/docs/components.md +0 -203
- package/dist/docs/foundations/linter.md +0 -296
|
@@ -12,11 +12,11 @@ The rules on this page turn that guidance into requirements for generated UI, an
|
|
|
12
12
|
|
|
13
13
|
Give your agent one of these entry points.
|
|
14
14
|
|
|
15
|
-
* **Agent Prompt:** The [Getting Started](
|
|
15
|
+
* **Agent Prompt:** The [Getting Started](../introduction/getting-started.md#agent-prompt) prompt points your agent at the home page, which returns the page index.
|
|
16
16
|
* **Page Index (/llms.txt):** [The index](/llms.txt) lists every page in sidebar order, with its Markdown link and description.
|
|
17
17
|
* **Full Text (/llms-full.txt):** [One file](/llms-full.txt) holds every page's Markdown, each after a `---` line and a `Source:` URL.
|
|
18
18
|
* **Copy Page:** On wide screens, Copy page copies the page's Markdown, and View markdown opens it.
|
|
19
|
-
* **In the Package (dist/docs):** The package ships every page's Markdown for its version, with an
|
|
19
|
+
* **In the Package (dist/docs):** The package ships every page's Markdown for its version, with an agent guide and an index for each system.
|
|
20
20
|
|
|
21
21
|
### Markdown Twins
|
|
22
22
|
|
|
@@ -60,8 +60,8 @@ These rules are requirements, and so are the Guidelines, Content, and Accessibil
|
|
|
60
60
|
|
|
61
61
|
### Use Library Components First
|
|
62
62
|
|
|
63
|
-
* **Catalog First:** Check the [Components](
|
|
64
|
-
* **Intent First:** Choose each component by the job of its content, as [Building From Intent](
|
|
63
|
+
* **Catalog First:** Check the [Components](../components.md) overview, which compares similar ones, before you write markup.
|
|
64
|
+
* **Intent First:** Choose each component by the job of its content, as [Building From Intent](intent.md) describes, not by the old markup.
|
|
65
65
|
* **Public Entrypoints:** Import `@tempoxyz/ds` on Web and `@tempoxyz/ds/mobile` in React Native, with icons from `/icons`.
|
|
66
66
|
* **No Rebuilds:** Don't rebuild a library component or swap in a raw Base UI primitive or another library.
|
|
67
67
|
* **Named Parts:** Build larger components from their named parts, such as `Dialog.Root` and `Dialog.Title`.
|
|
@@ -77,27 +77,27 @@ These rules are requirements, and so are the Guidelines, Content, and Accessibil
|
|
|
77
77
|
### Use Only Documented APIs
|
|
78
78
|
|
|
79
79
|
* **Documented Props:** Use only the props, parts, and values that a component page or its TSDoc documents.
|
|
80
|
-
* **Missing Pieces:** Build a missing variant or token locally with `style`, and flag it for a [proposal](
|
|
80
|
+
* **Missing Pieces:** Build a missing variant or token locally with `style`, and flag it for a [proposal](../introduction/faq.md#how-do-i-request-a-component-variant-or-token).
|
|
81
81
|
* **Installed Package:** Don't patch the installed package or target the class names that it generates.
|
|
82
82
|
|
|
83
83
|
### Follow the Guidelines
|
|
84
84
|
|
|
85
85
|
* **Whole Pages:** Read a component's whole page before you use it, not only its Examples section.
|
|
86
|
-
* **Patterns:** Apply the foundations and patterns that fit, such as [Payments](
|
|
87
|
-
* **Native Semantics:** Keep native semantics, and meet every item on the [Accessibility](
|
|
86
|
+
* **Patterns:** Apply the foundations and patterns that fit, such as [Payments](../patterns/payments.md) and [Blockchain Values](../patterns/blockchain-values.md).
|
|
87
|
+
* **Native Semantics:** Keep native semantics, and meet every item on the [Accessibility](accessibility.md#checklist) checklist.
|
|
88
88
|
|
|
89
89
|
### Write Copy to the Content Guidelines
|
|
90
90
|
|
|
91
|
-
* **Labels and Terms:** Use sentence case and verb-first button labels, as [Writing Style](
|
|
92
|
-
* **Amounts and Addresses:** Format amounts with [Amount](
|
|
93
|
-
* **Errors:** Write error messages that state the fix, as [Writing Style](
|
|
91
|
+
* **Labels and Terms:** Use sentence case and verb-first button labels, as [Writing Style](content/writing-style.md#write-labels) describes.
|
|
92
|
+
* **Amounts and Addresses:** Format amounts with [Amount](../components/amount.md) and a `currency` or `symbol`, and addresses and hashes with [Hex](../components/hex.md).
|
|
93
|
+
* **Errors:** Write error messages that state the fix, as [Writing Style](content/writing-style.md#write-messages) describes.
|
|
94
94
|
|
|
95
95
|
## Checks
|
|
96
96
|
|
|
97
97
|
If a tool can check a rule, run it as a check.
|
|
98
98
|
|
|
99
99
|
* **Types (tsc):** Token names are typed, so an unknown token fails to compile.
|
|
100
|
-
* **Lint (@tempoxyz/ds/oxlint):** Checks styles, imports,
|
|
100
|
+
* **Lint (@tempoxyz/ds/oxlint):** Checks styles, imports, accessible names, and hand-built components, as [Linter](linter.md) lists.
|
|
101
101
|
|
|
102
102
|
## Add Rules to Your Project
|
|
103
103
|
|
|
@@ -125,26 +125,26 @@ Keep documentation readable for both audiences.
|
|
|
125
125
|
|
|
126
126
|
## Related
|
|
127
127
|
|
|
128
|
-
[Getting Started](
|
|
128
|
+
[Getting Started](../introduction/getting-started.md)
|
|
129
129
|
|
|
130
130
|
Covers setup and the agent prompt.
|
|
131
131
|
|
|
132
|
-
[FAQ](
|
|
132
|
+
[FAQ](../introduction/faq.md)
|
|
133
133
|
|
|
134
134
|
Covers common questions.
|
|
135
135
|
|
|
136
|
-
[Components](
|
|
136
|
+
[Components](../components.md)
|
|
137
137
|
|
|
138
138
|
Covers the component catalog.
|
|
139
139
|
|
|
140
|
-
[Building From Intent](
|
|
140
|
+
[Building From Intent](intent.md)
|
|
141
141
|
|
|
142
142
|
Covers choosing a component by the job of its content.
|
|
143
143
|
|
|
144
|
-
[Linter](
|
|
144
|
+
[Linter](linter.md)
|
|
145
145
|
|
|
146
146
|
Covers the lint rules that check library use.
|
|
147
147
|
|
|
148
|
-
[Voice](
|
|
148
|
+
[Voice](content/voice.md)
|
|
149
149
|
|
|
150
150
|
Covers how Tempo UI copy sounds.
|
|
@@ -156,7 +156,7 @@ Materials are translucent layers in five strengths, and scrims dim the page behi
|
|
|
156
156
|
|
|
157
157
|
## Intents
|
|
158
158
|
|
|
159
|
-
Components that report status take an intent, not a hue, so a status looks the same everywhere. Choose the intent by the message. An [Alert](
|
|
159
|
+
Components that report status take an intent, not a hue, so a status looks the same everywhere. Choose the intent by the message. An [Alert](../components/alert.md) tints its container and colors its indicator by intent.
|
|
160
160
|
|
|
161
161
|
* **Neutral (content.subtle):** Default states and features, such as a payment that is still pending.
|
|
162
162
|
* **Positive (content.positive):** Success, completion, and incoming funds, such as a confirmed payment.
|
|
@@ -497,26 +497,26 @@ Lines measure below 3:1, so they divide content but never identify a control alo
|
|
|
497
497
|
|
|
498
498
|
## Related
|
|
499
499
|
|
|
500
|
-
[Typography](
|
|
500
|
+
[Typography](typography.md)
|
|
501
501
|
|
|
502
502
|
Covers text sizes that change contrast thresholds.
|
|
503
503
|
|
|
504
|
-
[Accessibility](
|
|
504
|
+
[Accessibility](accessibility.md)
|
|
505
505
|
|
|
506
506
|
Covers the full WCAG 2.2 AA checklist.
|
|
507
507
|
|
|
508
|
-
[Feedback and Status](
|
|
508
|
+
[Feedback and Status](../patterns/feedback-and-status.md)
|
|
509
509
|
|
|
510
510
|
Covers choosing an intent.
|
|
511
511
|
|
|
512
|
-
[Banner](
|
|
512
|
+
[Banner](../components/banner.md)
|
|
513
513
|
|
|
514
514
|
Use for status text on a status fill.
|
|
515
515
|
|
|
516
|
-
[Alert](
|
|
516
|
+
[Alert](../components/alert.md)
|
|
517
517
|
|
|
518
518
|
Use for intent colors in context.
|
|
519
519
|
|
|
520
|
-
[Banner](
|
|
520
|
+
[Banner](../components/banner.md)
|
|
521
521
|
|
|
522
522
|
Use for intent colors in context.
|
|
@@ -4,7 +4,7 @@ How Tempo's voice adjusts to the reader, from a first visit to an error.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
[Voice](
|
|
7
|
+
[Voice](voice.md) stays the same everywhere. Tone shifts with what the reader is doing and how they feel, and grows plainer and more specific as more money or access is at stake.
|
|
8
8
|
|
|
9
9
|
## Situations
|
|
10
10
|
|
|
@@ -41,7 +41,7 @@ Welcome a new reader, and explain each new term once, in one sentence.
|
|
|
41
41
|
|
|
42
42
|
### Success
|
|
43
43
|
|
|
44
|
-
State what finished in a positive [Toast](
|
|
44
|
+
State what finished in a positive [Toast](../../components/toast.md) when nothing is left to do, then stop.
|
|
45
45
|
|
|
46
46
|
* **Name the Result:** Use a noun and a past-tense verb.
|
|
47
47
|
* **Add the Detail:** Add the amount or recipient as confirmation.
|
|
@@ -132,15 +132,15 @@ namespace styles {
|
|
|
132
132
|
}
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
* **Local Risk (Alert):** Use a warning [Alert](
|
|
136
|
-
* **Product-Wide Condition (Banner):** Use a warning [Banner](
|
|
135
|
+
* **Local Risk (Alert):** Use a warning [Alert](../../components/alert.md) for a field or section.
|
|
136
|
+
* **Product-Wide Condition (Banner):** Use a warning [Banner](../../components/banner.md) for the whole product.
|
|
137
137
|
|
|
138
138
|
### Errors
|
|
139
139
|
|
|
140
|
-
Stay neutral and direct, and follow the [error message structure](
|
|
140
|
+
Stay neutral and direct, and follow the [error message structure](writing-style.md#structure-error-messages).
|
|
141
141
|
|
|
142
142
|
* **Lead With the Fix:** Add the cause only if it helps the reader act.
|
|
143
|
-
* **Show It Inline:** Show a blocking error inline, not in a [Toast](
|
|
143
|
+
* **Show It Inline:** Show a blocking error inline, not in a [Toast](../../components/toast.md).
|
|
144
144
|
* **Keep the TextInput:** Keep the input, and state what to change.
|
|
145
145
|
* **Skip Blame and Jokes:** Don't apologize at length, blame, or joke.
|
|
146
146
|
|
|
@@ -188,7 +188,7 @@ Repeat the exact amount, recipient, and fee on every step.
|
|
|
188
188
|
|
|
189
189
|
### Irreversible Actions
|
|
190
190
|
|
|
191
|
-
Use a serious, explicit tone, as [Destructive Actions](
|
|
191
|
+
Use a serious, explicit tone, as [Destructive Actions](../../patterns/destructive-actions.md) shows.
|
|
192
192
|
|
|
193
193
|
* **Name the Consequence:** Name exactly what the action removes or ends.
|
|
194
194
|
* **Confirm Payments on Review:** On review, state once that payments are final.
|
|
@@ -4,7 +4,7 @@ Tempo's personality in words, consistent across every product.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Voice is how Tempo sounds in every product: a knowledgeable colleague who explains plainly and wastes no time, as on [tempo.xyz](https://tempo.xyz) and in the [developer docs](https://tempo.xyz/developers). [Tone](
|
|
7
|
+
Voice is how Tempo sounds in every product: a knowledgeable colleague who explains plainly and wastes no time, as on [tempo.xyz](https://tempo.xyz) and in the [developer docs](https://tempo.xyz/developers). [Tone](tone.md) adapts it to each situation, such as a first visit or a failed payment.
|
|
8
8
|
|
|
9
9
|
## How Tempo Writes
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ Each trait names the line it must not cross.
|
|
|
21
21
|
### Clear, Not Simplistic
|
|
22
22
|
|
|
23
23
|
**Do:** Describe a payment in everyday money words, and format each value with
|
|
24
|
-
[Amount](
|
|
24
|
+
[Amount](../../components/amount.md) or [Hex](../../components/hex.md).
|
|
25
25
|
|
|
26
26
|
```tsx
|
|
27
27
|
/**
|
|
@@ -197,17 +197,17 @@ namespace styles {
|
|
|
197
197
|
### Links
|
|
198
198
|
|
|
199
199
|
* **Name the Destination:** Name where the link goes.
|
|
200
|
-
* **No Typed Arrows:** Leave out →, and let [ListGroup](
|
|
200
|
+
* **No Typed Arrows:** Leave out →, and let [ListGroup](../../components/list-group.md) draw a chevron.
|
|
201
201
|
|
|
202
202
|
### Tooltips
|
|
203
203
|
|
|
204
|
-
* **A Few Words:** Name or clarify the trigger of a [Tooltip](
|
|
204
|
+
* **A Few Words:** Name or clarify the trigger of a [Tooltip](../../components/tooltip.md).
|
|
205
205
|
* **Definitions:** A definition can be one full sentence.
|
|
206
206
|
* **Nothing Essential:** Keep actions and essential details on the page.
|
|
207
207
|
|
|
208
208
|
### Status Labels
|
|
209
209
|
|
|
210
|
-
* **Short Status:** Use one or two words in a [Badge](
|
|
210
|
+
* **Short Status:** Use one or two words in a [Badge](../../components/badge.md) or status column.
|
|
211
211
|
* **One Name per Status:** Keep one name for each status on every screen.
|
|
212
212
|
|
|
213
213
|
## Write Messages
|
|
@@ -284,11 +284,11 @@ namespace styles {
|
|
|
284
284
|
### Empty States
|
|
285
285
|
|
|
286
286
|
* **Why It's Empty:** Say why the area has nothing to show.
|
|
287
|
-
* **What to Do Next:** Offer the next step, as [Empty States](
|
|
287
|
+
* **What to Do Next:** Offer the next step, as [Empty States](../../patterns/empty-states.md) shows.
|
|
288
288
|
|
|
289
289
|
### Confirmations
|
|
290
290
|
|
|
291
|
-
* **Two to Four Words:** Title a [Toast](
|
|
291
|
+
* **Two to Four Words:** Title a [Toast](../../components/toast.md) with the outcome.
|
|
292
292
|
* **Needed Detail Only:** Describe only needed detail, such as the amount.
|
|
293
293
|
* **Shortcut Actions:** Make each toast action reachable elsewhere too.
|
|
294
294
|
|
|
@@ -393,14 +393,14 @@ Write for a reader new to crypto.
|
|
|
393
393
|
|
|
394
394
|
## Related
|
|
395
395
|
|
|
396
|
-
[Button](
|
|
396
|
+
[Button](../../components/button.md)
|
|
397
397
|
|
|
398
398
|
Use for button labels.
|
|
399
399
|
|
|
400
|
-
[Field](
|
|
400
|
+
[Field](../../components/field.md)
|
|
401
401
|
|
|
402
402
|
Use for labels, descriptions, and errors.
|
|
403
403
|
|
|
404
|
-
[Errors and Validation](
|
|
404
|
+
[Errors and Validation](../../patterns/errors-and-validation.md)
|
|
405
405
|
|
|
406
406
|
Covers when and where to show errors.
|
|
@@ -28,15 +28,15 @@ export function SendButton() {
|
|
|
28
28
|
|
|
29
29
|
## Size and Color
|
|
30
30
|
|
|
31
|
-
Components size and color their own icons, so inside a [Button](
|
|
31
|
+
Components size and color their own icons, so inside a [Button](../components/button.md) you add only the icon as a child.
|
|
32
32
|
|
|
33
33
|
### Size
|
|
34
34
|
|
|
35
35
|
* **Beside Text (1em):** The default in buttons, links, and running text.
|
|
36
36
|
* **Beside Titles (20px):** A larger icon beside a section or card title.
|
|
37
|
-
* **Status Icons (20px):** A status icon beside a message, as in a [Toast](
|
|
38
|
-
* **Alert Indicator (16px):** An [Alert](
|
|
39
|
-
* **Modal Icons (24px):** An [IconTile](
|
|
37
|
+
* **Status Icons (20px):** A status icon beside a message, as in a [Toast](../components/toast.md).
|
|
38
|
+
* **Alert Indicator (16px):** An [Alert](../components/alert.md) marks its tone with a square in a 16px box.
|
|
39
|
+
* **Modal Icons (24px):** An [IconTile](../components/icon-tile.md) frames the icon above a modal title.
|
|
40
40
|
* **Standalone Icons (fontSize):** Set its font size, not its width and height.
|
|
41
41
|
|
|
42
42
|
### Color
|
|
@@ -235,15 +235,15 @@ namespace styles {
|
|
|
235
235
|
}
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
-
* **Token Logos (TokenLogo):** Render token and network logos with [TokenLogo](
|
|
239
|
-
* **Account Images (Identicon):** Render accounts with [Avatar](
|
|
238
|
+
* **Token Logos (TokenLogo):** Render token and network logos with [TokenLogo](../components/token-logo.md).
|
|
239
|
+
* **Account Images (Identicon):** Render accounts with [Avatar](../components/avatar.md) or [Identicon](../components/identicon.md).
|
|
240
240
|
|
|
241
241
|
## Accessibility
|
|
242
242
|
|
|
243
243
|
* **Decorative by Default (aria-hidden):** An icon without `aria-label` or `aria-labelledby` is hidden, so screen readers skip it.
|
|
244
244
|
* **Meaningful Icons (role=img):** Add `aria-label` only if no nearby text states its meaning, such as a lone status icon.
|
|
245
245
|
* **Icon-Only Buttons (aria-label):** Label the button, not the icon. Name the action, such as Close dialog rather than X.
|
|
246
|
-
* **Tooltips (Tooltip):** Pair an icon-only button with a [Tooltip](
|
|
246
|
+
* **Tooltips (Tooltip):** Pair an icon-only button with a [Tooltip](../components/tooltip.md) that repeats its label for sighted mouse users.
|
|
247
247
|
* **Contrast (3:1):** Applies to meaningful icons. Both `content.primary` and `content.secondary` pass.
|
|
248
248
|
* **Forced Colors (currentColor):** Icons follow the system text color in forced colors mode, with no extra styles.
|
|
249
249
|
|
|
@@ -265,18 +265,18 @@ import copyUrl from '@tempoxyz/ds/icons/Copy.svg'
|
|
|
265
265
|
|
|
266
266
|
## Related
|
|
267
267
|
|
|
268
|
-
[Button](
|
|
268
|
+
[Button](../components/button.md)
|
|
269
269
|
|
|
270
270
|
Use for icon buttons and icons beside labels.
|
|
271
271
|
|
|
272
|
-
[IconTile](
|
|
272
|
+
[IconTile](../components/icon-tile.md)
|
|
273
273
|
|
|
274
274
|
Use for framed icons in headers and lists.
|
|
275
275
|
|
|
276
|
-
[Tooltip](
|
|
276
|
+
[Tooltip](../components/tooltip.md)
|
|
277
277
|
|
|
278
278
|
Use for labelling icon buttons.
|
|
279
279
|
|
|
280
|
-
[Color](
|
|
280
|
+
[Color](color.md)
|
|
281
281
|
|
|
282
282
|
Covers icon colors.
|
|
@@ -14,7 +14,7 @@ Name the job of each part before you open the catalog: records, details, status,
|
|
|
14
14
|
|
|
15
15
|
### Choose by Documented Job
|
|
16
16
|
|
|
17
|
-
Find the job in [Common Intents](#common-intents) or the comparisons on [Components](
|
|
17
|
+
Find the job in [Common Intents](#common-intents) or the comparisons on [Components](../components.md#choosing-a-component). Then read the When to Use section of the component page.
|
|
18
18
|
|
|
19
19
|
### Check When Not to Use
|
|
20
20
|
|
|
@@ -22,11 +22,11 @@ Read the When Not to Use section of the same page. If it names your case, use th
|
|
|
22
22
|
|
|
23
23
|
### Write the Labels
|
|
24
24
|
|
|
25
|
-
Write every label from the [Writing Style](
|
|
25
|
+
Write every label from the [Writing Style](content/writing-style.md) rules. Map a raw API value, such as `payment_failed`, to a word, such as Failed.
|
|
26
26
|
|
|
27
27
|
### Check the Fit
|
|
28
28
|
|
|
29
|
-
Render the result at the narrowest width that its column or container reaches, and confirm that nothing overlaps or clips. In a table, follow [Keep Multi-Line Rows Readable](
|
|
29
|
+
Render the result at the narrowest width that its column or container reaches, and confirm that nothing overlaps or clips. In a table, follow [Keep Multi-Line Rows Readable](../patterns/tables-and-lists.md#keep-multi-line-rows-readable).
|
|
30
30
|
|
|
31
31
|
## Common Intents
|
|
32
32
|
|
|
@@ -34,26 +34,26 @@ Each tile names a job, the component for it, and the question that tells it apar
|
|
|
34
34
|
|
|
35
35
|
### Data
|
|
36
36
|
|
|
37
|
-
* **Records (Table):** Do people compare many records across the same fields? Use a [Table](
|
|
38
|
-
* **One Record (ListGroup):** Does the view show the fields of one record? Use [ListGroup](
|
|
39
|
-
* **Identifier (Hex):** Is it an address or a hash outside a table? Use [Hex](
|
|
40
|
-
* **Amount (Amount):** Is it money or a token balance? Use [Amount](
|
|
41
|
-
* **Metric (Surface):** Is it a headline number on a dashboard? Use a small [Surface](
|
|
37
|
+
* **Records (Table):** Do people compare many records across the same fields? Use a [Table](../components/table.md), one row per record.
|
|
38
|
+
* **One Record (ListGroup):** Does the view show the fields of one record? Use [ListGroup](../components/list-group.md) rows with `ListGroup.Label`.
|
|
39
|
+
* **Identifier (Hex):** Is it an address or a hash outside a table? Use [Hex](../components/hex.md) with `copy`. A table column uses a `mono` cell.
|
|
40
|
+
* **Amount (Amount):** Is it money or a token balance? Use [Amount](../components/amount.md) with a `currency` or a `symbol`.
|
|
41
|
+
* **Metric (Surface):** Is it a headline number on a dashboard? Use a small [Surface](../components/surface.md) tile, as [Dashboards](../patterns/dashboards.md) shows.
|
|
42
42
|
|
|
43
43
|
### Status
|
|
44
44
|
|
|
45
|
-
* **Status in a Table (status):** Does the status sit in a table row? Set `status` on its [Table](
|
|
46
|
-
* **Status of a Payment (StatusChip):** Does a payment, an authorization, or a network have a status outside a table? Use a [StatusChip](
|
|
47
|
-
* **Live System Status (StatusIndicator):** Does a service or a connection report its live state? Use a [StatusIndicator](
|
|
48
|
-
* **Running Task (StatusRow):** Does a person wait on one task that finishes within minutes? Follow it with a [StatusRow](
|
|
49
|
-
* **Attribute (Badge):** Does a word name a category or an attribute, such as Testnet? Use a [Badge](
|
|
45
|
+
* **Status in a Table (status):** Does the status sit in a table row? Set `status` on its [Table](../components/table.md) cell, and keep the status word beside the color.
|
|
46
|
+
* **Status of a Payment (StatusChip):** Does a payment, an authorization, or a network have a status outside a table? Use a [StatusChip](../components/status-chip.md).
|
|
47
|
+
* **Live System Status (StatusIndicator):** Does a service or a connection report its live state? Use a [StatusIndicator](../components/status-indicator.md).
|
|
48
|
+
* **Running Task (StatusRow):** Does a person wait on one task that finishes within minutes? Follow it with a [StatusRow](../components/status-row.md).
|
|
49
|
+
* **Attribute (Badge):** Does a word name a category or an attribute, such as Testnet? Use a [Badge](../components/badge.md) beside the title.
|
|
50
50
|
|
|
51
51
|
### Interaction
|
|
52
52
|
|
|
53
|
-
* **Message (Alert):** Does a sentence explain a condition? Use an [Alert](
|
|
54
|
-
* **Action (Button):** Does it start something in the current view? Use a [Button](
|
|
55
|
-
* **Choice (RadioGroup):** Does a person pick one option? Compare [RadioGroup](
|
|
56
|
-
* **Navigation (SidebarMenu):** Does it open another page? Use a link, or a [SidebarMenu](
|
|
53
|
+
* **Message (Alert):** Does a sentence explain a condition? Use an [Alert](../components/alert.md) for a section and a [Banner](../components/banner.md) for the page.
|
|
54
|
+
* **Action (Button):** Does it start something in the current view? Use a [Button](../components/button.md) with a verb label, such as Send payment.
|
|
55
|
+
* **Choice (RadioGroup):** Does a person pick one option? Compare [RadioGroup](../components/radio-group.md) and the others on [Components](../components.md#choosing-one-option).
|
|
56
|
+
* **Navigation (SidebarMenu):** Does it open another page? Use a link, or a [SidebarMenu](../components/sidebar-menu.md) for the main destinations of an app.
|
|
57
57
|
|
|
58
58
|
## Porting an Existing Interface
|
|
59
59
|
|
|
@@ -61,7 +61,7 @@ A port replaces old markup with library components. Map the job of each part ins
|
|
|
61
61
|
|
|
62
62
|
### Show Records as Rows
|
|
63
63
|
|
|
64
|
-
**Do:** Show records that share fields as the rows of a [Table](
|
|
64
|
+
**Do:** Show records that share fields as the rows of a [Table](../components/table.md).
|
|
65
65
|
|
|
66
66
|
```tsx
|
|
67
67
|
/**
|
|
@@ -102,7 +102,7 @@ export function Demo() {
|
|
|
102
102
|
}
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
**Don't:** Wrap each record in a [Surface](
|
|
105
|
+
**Don't:** Wrap each record in a [Surface](../components/surface.md) card because the old screen drew
|
|
106
106
|
cards.
|
|
107
107
|
|
|
108
108
|
```tsx
|
|
@@ -149,7 +149,7 @@ namespace styles {
|
|
|
149
149
|
|
|
150
150
|
### Write Status Words, Not API Values
|
|
151
151
|
|
|
152
|
-
**Do:** Color a status word in sentence case with the `status` of its [Table](
|
|
152
|
+
**Do:** Color a status word in sentence case with the `status` of its [Table](../components/table.md)
|
|
153
153
|
cell.
|
|
154
154
|
|
|
155
155
|
```tsx
|
|
@@ -189,7 +189,7 @@ export function Demo() {
|
|
|
189
189
|
}
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
**Don't:** Copy a grey pill into a [Badge](
|
|
192
|
+
**Don't:** Copy a grey pill into a [Badge](../components/badge.md) with the raw value from the API.
|
|
193
193
|
|
|
194
194
|
```tsx
|
|
195
195
|
/**
|
|
@@ -236,7 +236,7 @@ export function Demo() {
|
|
|
236
236
|
|
|
237
237
|
### Fit Identifiers to Their Column
|
|
238
238
|
|
|
239
|
-
[Hex](
|
|
239
|
+
[Hex](../components/hex.md) truncates to its container, down to the prefix, one character on each side, and its copy button. A narrower column lets it overflow into the next cell.
|
|
240
240
|
|
|
241
241
|
**Do:** Set `mono` on the cell and shorten the value with `formatHex` from `@tempoxyz/ds`, which keeps
|
|
242
242
|
four characters on each side. Show the full value with `copy` on the details view.
|
|
@@ -279,7 +279,7 @@ export function Demo() {
|
|
|
279
279
|
}
|
|
280
280
|
```
|
|
281
281
|
|
|
282
|
-
**Don't:** Place a [Hex](
|
|
282
|
+
**Don't:** Place a [Hex](../components/hex.md) with `copy` in a column narrower than its minimum
|
|
283
283
|
width.
|
|
284
284
|
|
|
285
285
|
```tsx
|
|
@@ -339,22 +339,22 @@ Before you ship a screen, confirm each item.
|
|
|
339
339
|
|
|
340
340
|
## Related
|
|
341
341
|
|
|
342
|
-
[Components](
|
|
342
|
+
[Components](../components.md)
|
|
343
343
|
|
|
344
344
|
Covers the catalog and the comparisons between similar components.
|
|
345
345
|
|
|
346
|
-
[Agents](
|
|
346
|
+
[Agents](agents.md)
|
|
347
347
|
|
|
348
348
|
Covers the rules that coding agents follow.
|
|
349
349
|
|
|
350
|
-
[Tables and Lists](
|
|
350
|
+
[Tables and Lists](../patterns/tables-and-lists.md)
|
|
351
351
|
|
|
352
352
|
Covers tables, lists, and the details of one record.
|
|
353
353
|
|
|
354
|
-
[Feedback and Status](
|
|
354
|
+
[Feedback and Status](../patterns/feedback-and-status.md)
|
|
355
355
|
|
|
356
356
|
Covers status words and the channel for each message.
|
|
357
357
|
|
|
358
|
-
[Writing Style](
|
|
358
|
+
[Writing Style](content/writing-style.md)
|
|
359
359
|
|
|
360
360
|
Covers labels, status words, and sentence case.
|
|
@@ -8,11 +8,11 @@ Tempo pages are calm and orderly. Flat cards sit on a tinted page, line up on a
|
|
|
8
8
|
|
|
9
9
|
Space follows relationships. Elements sit close within a group, further apart between groups, and furthest apart between sections. As the screen widens, the margins grow and the sidebar opens, while the content keeps a comfortable width.
|
|
10
10
|
|
|
11
|
-
For page frames and width changes, see [Responsive Layout](
|
|
11
|
+
For page frames and width changes, see [Responsive Layout](../patterns/responsive-layout.md).
|
|
12
12
|
|
|
13
13
|
## Page Structure
|
|
14
14
|
|
|
15
|
-
Every page shares one frame, which [App Shell](
|
|
15
|
+
Every page shares one frame, which [App Shell](../components/app-shell.md) provides.
|
|
16
16
|
|
|
17
17
|
* **Sidebar:** Navigation on the start edge, which moves into a drawer on small screens.
|
|
18
18
|
* **Top Bar:** The page title and its main action, in one bar above the content.
|
|
@@ -20,7 +20,7 @@ Every page shares one frame, which [App Shell](/docs/components/app-shell) provi
|
|
|
20
20
|
|
|
21
21
|
## Grid
|
|
22
22
|
|
|
23
|
-
Wide pages divide into twelve columns. Each card, chart, and table takes a share of them, and every row keeps the same gutters. [Grid](
|
|
23
|
+
Wide pages divide into twelve columns. Each card, chart, and table takes a share of them, and every row keeps the same gutters. [Grid](../components/grid.md) lays out the columns.
|
|
24
24
|
|
|
25
25
|
* **Summary Cards (3 of 12):** Key figures in a row of equal cards.
|
|
26
26
|
* **Chart and Panel (8 and 4):** A wide chart beside a narrow panel.
|
|
@@ -38,7 +38,7 @@ Spacing comes from one scale of steps. Pick a step by how closely the elements r
|
|
|
38
38
|
|
|
39
39
|
## Radius
|
|
40
40
|
|
|
41
|
-
Larger elements get rounder corners, from fields at 12px to modals at 32px. [Radius and Padding](
|
|
41
|
+
Larger elements get rounder corners, from fields at 12px to modals at 32px. [Radius and Padding](radius-and-padding.md) covers each role and its padding.
|
|
42
42
|
|
|
43
43
|
* `none`: `0rem`
|
|
44
44
|
* `3xs`: `calc(0.25rem * var(--tds-corner-scale, 1))`
|
|
@@ -62,7 +62,7 @@ Shadows mark layers that float above the page, and most surfaces need none. In d
|
|
|
62
62
|
|
|
63
63
|
## Widths
|
|
64
64
|
|
|
65
|
-
[Container](
|
|
65
|
+
[Container](../components/container.md) centers content at a maximum width, with side gutters that grow on larger screens. Pick its size by the content, not by the screen.
|
|
66
66
|
|
|
67
67
|
* **Narrow (48rem):** Forms, settings, and single-task flows.
|
|
68
68
|
* **Medium (64rem):** Detail pages, such as a transaction or an API key.
|
|
@@ -95,12 +95,12 @@ namespace styles {
|
|
|
95
95
|
|
|
96
96
|
Primitives arrange content without adding meaning. When a region needs meaning, render the primitive as a semantic element, such as a list or the main landmark.
|
|
97
97
|
|
|
98
|
-
* **Stack (gap 16):** [Stack](
|
|
99
|
-
* **Inline (gap 8):** [Inline](
|
|
100
|
-
* **Grid (gap 24):** [Grid](
|
|
101
|
-
* **Container (size):** [Container](
|
|
102
|
-
* **Inset (space):** [Inset](
|
|
103
|
-
* **Surface (size):** [Surface](
|
|
98
|
+
* **Stack (gap 16):** [Stack](../components/stack.md) spaces a vertical run, such as fields in a form.
|
|
99
|
+
* **Inline (gap 8):** [Inline](../components/inline.md) spaces a horizontal run, such as actions or badges.
|
|
100
|
+
* **Grid (gap 24):** [Grid](../components/grid.md) arranges similar items, such as metric tiles.
|
|
101
|
+
* **Container (size):** [Container](../components/container.md) sets the page width and side gutters.
|
|
102
|
+
* **Inset (space):** [Inset](../components/inset.md) pads a region without drawing a container.
|
|
103
|
+
* **Surface (size):** [Surface](../components/surface.md) is a visible card that groups related content.
|
|
104
104
|
|
|
105
105
|
## Guidelines
|
|
106
106
|
|
|
@@ -274,7 +274,7 @@ namespace styles {
|
|
|
274
274
|
|
|
275
275
|
### Keep Cards Flat
|
|
276
276
|
|
|
277
|
-
Separate a [Surface](
|
|
277
|
+
Separate a [Surface](../components/surface.md) from the page with its lighter background, not a shadow. Keep shadows for content that floats over other content.
|
|
278
278
|
|
|
279
279
|
**Do:** Keep cards flat, and add a shadow only to the layer above them.
|
|
280
280
|
|
|
@@ -316,7 +316,7 @@ Separate a [Surface](/docs/components/surface) from the page with its lighter ba
|
|
|
316
316
|
|
|
317
317
|
### Size Containers by Content
|
|
318
318
|
|
|
319
|
-
Pick the narrowest [Container](
|
|
319
|
+
Pick the narrowest [Container](../components/container.md) that fits the content.
|
|
320
320
|
|
|
321
321
|
**Do:** Keep a form in a narrow container, so each field is as wide as its content needs.
|
|
322
322
|
|
|
@@ -471,38 +471,38 @@ namespace styles {
|
|
|
471
471
|
|
|
472
472
|
## Related
|
|
473
473
|
|
|
474
|
-
[Responsive Layout](
|
|
474
|
+
[Responsive Layout](../patterns/responsive-layout.md)
|
|
475
475
|
|
|
476
476
|
Covers page frames and width changes.
|
|
477
477
|
|
|
478
|
-
[Stack](
|
|
478
|
+
[Stack](../components/stack.md)
|
|
479
479
|
|
|
480
480
|
Use for arranging content.
|
|
481
481
|
|
|
482
|
-
[Inline](
|
|
482
|
+
[Inline](../components/inline.md)
|
|
483
483
|
|
|
484
484
|
Use for arranging content.
|
|
485
485
|
|
|
486
|
-
[Grid](
|
|
486
|
+
[Grid](../components/grid.md)
|
|
487
487
|
|
|
488
488
|
Use for arranging content.
|
|
489
489
|
|
|
490
|
-
[Container](
|
|
490
|
+
[Container](../components/container.md)
|
|
491
491
|
|
|
492
492
|
Use for width and padding.
|
|
493
493
|
|
|
494
|
-
[Inset](
|
|
494
|
+
[Inset](../components/inset.md)
|
|
495
495
|
|
|
496
496
|
Use for width and padding.
|
|
497
497
|
|
|
498
|
-
[Surface](
|
|
498
|
+
[Surface](../components/surface.md)
|
|
499
499
|
|
|
500
500
|
Use for cards.
|
|
501
501
|
|
|
502
|
-
[App Shell](
|
|
502
|
+
[App Shell](../components/app-shell.md)
|
|
503
503
|
|
|
504
504
|
Use for the application frame.
|
|
505
505
|
|
|
506
|
-
[Radius and Padding](
|
|
506
|
+
[Radius and Padding](radius-and-padding.md)
|
|
507
507
|
|
|
508
508
|
Covers how padding pairs with each radius.
|