You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/docs/foundations/assets/index.mdx
+184-2Lines changed: 184 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,12 @@ Icons come in two variant types: **Outline** and **Solid**. Please note that all
17
17
18
18
**Outline icons** place less emphasis on non-imperative items and are more recognizable when they have wider inner spacing. They’re also better to use when you need to make subtle design cues more noticeable.
@@ -30,9 +33,14 @@ Icons come in two variant types: **Outline** and **Solid**. Please note that all
30
33
31
34
Icon size will vary based on use case and system requirements. Standard sizing ensures components maintain a consistent spatial relationship with surrounding elements.
32
35
33
-
<Image
36
+
We recommend using a size multiplier for icons when its purpose needs to be emphasized; typically standalone and not paired with text.
| Size token | Multiplier | High Density (HD) | Medium Density (MD) | Low Density (LD) | Touch Density (TD) |
@@ -43,3 +51,177 @@ Icon size will vary based on use case and system requirements. Standard sizing e
43
51
|| x4 | 40 | 48 | 56 | 64 |
44
52
45
53
\* Icons have a minimum size set at 12px and should not be displayed any smaller. For high density this means the default size of an icon is 12px, but the rest of the scale grows based on small base dimension.
54
+
55
+
### Icon sizing when paired with display and heading text
56
+
57
+
- Match the icon container height to the text line-height.
58
+
- Match the icon glyph size to the text font-size.
59
+
60
+
When an icon is paired with **display** or **heading** text styles, the icon size (i.e., the glyph) is aligned with the text size, and the icon’s container is aligned with text line height.
61
+
This approach ensures the icon and text remain visually balanced and that the icon stays perfectly aligned with the text block, even in multi-line layouts.
alt: "Spacing 50 examples for icon and text with annotation.",
105
+
},
106
+
]}
107
+
label="Show spacing"
108
+
/>
109
+
110
+
### When to use spacing-75
111
+
112
+
Apply `--salt-spacing-75` — the icon describes a heading or statement; often used within ‘messaging’ type components or where the icon is part of a sentence; it isn’t constrained within a small component. This applies to:
113
+
114
+
-[Banner](/salt/components/banner)
115
+
-[Toast](/salt/components/toast)
116
+
-[Dialog](/salt/components/dialog)
117
+
-[Tooltip](/salt/components/tooltip)
118
+
-[Form field](/salt/components/form-field) - Validation status
alt: "Spacing 75 examples for icon and text with annotation.",
140
+
},
141
+
]}
142
+
label="Show spacing"
143
+
/>
144
+
145
+
### When to use spacing-100
146
+
147
+
Apply `--salt-spacing-100` — the icon describes the title or label of ‘stackable’ (i.e., those with a slightly larger height, designed to accommodated nested controls, such as buttons) or repeated elements (where clean vertical alignment is required); also applies to radio/checkbox controls. This applies to:
alt: "Spacing 100 examples for icon and text with annotation.",
177
+
},
178
+
]}
179
+
label="Show spacing"
180
+
/>
181
+
182
+
### Spacing between icon and heading/display text
183
+
184
+
<Calloutstatus="info">
185
+
This spacing update is experimental. We welcome your feedback to help us
186
+
refine and optimize this guideline. The goal is to apply these updated rules
187
+
to existing components, including Dialog (currently using --spacing-75, see
188
+
above). Please [reach out to the team](/salt/support-and-contributions/index)
189
+
with any thoughts or suggestions on this new spacing rule.
190
+
</Callout>
191
+
192
+
To ensure visual balance and readability, spacing between icons and Heading/Display text is tailored according to the size of the text. This approach helps maintain a harmonious and comfortable layout across different heading and display levels.
193
+
194
+
This is the recommended spacing in editorial/marketing layouts and where headings are used within components.
195
+
196
+
| Heading/Display text | Spacing between Icon & Text |
0 commit comments