Skip to content

Commit 7b4c73e

Browse files
honey-changtycupwemmyoamritadesmet
authored
updated-icon-foundation (#6824)
Co-authored-by: Tymon Rybak <tymon.rybak@jpmorgan.com> Co-authored-by: David Oyedeji <40142093+wemmyo@users.noreply.github.com> Co-authored-by: Amrita Desmet <176904642+amritadesmet@users.noreply.github.com>
1 parent 5663ad4 commit 7b4c73e

22 files changed

Lines changed: 184 additions & 2 deletions

site/docs/foundations/assets/index.mdx

Lines changed: 184 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ Icons come in two variant types: **Outline** and **Solid**. Please note that all
1717

1818
**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.
1919

20-
<Image
20+
<Diagram
2121
src="/img/foundations/iconography-icon-variants.png"
22+
srcDark="/img/foundations/iconography-icon-variants.png"
2223
alt="Example of solid and outline icons"
24+
border
25+
background="secondary"
2326
/>
2427

2528
## All icons
@@ -30,9 +33,14 @@ Icons come in two variant types: **Outline** and **Solid**. Please note that all
3033

3134
Icon size will vary based on use case and system requirements. Standard sizing ensures components maintain a consistent spatial relationship with surrounding elements.
3235

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.
37+
38+
<Diagram
3439
src="/img/foundations/iconography-icon-size.png"
40+
srcDark="/img/foundations/iconography-icon-size-dark.png"
3541
alt="Example of an icon in three scaled sizes"
42+
border
43+
background="secondary"
3644
/>
3745

3846
| 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
4351
| | x4 | 40 | 48 | 56 | 64 |
4452

4553
\* 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.
62+
63+
<Diagram
64+
src="/img/foundations/iconography-icon-heading-size.png"
65+
srcDark="/img/foundations/iconography-icon-heading-size-dark.png"
66+
alt="Icon aligned with Display1 text, with spacing measurements"
67+
border
68+
background="secondary"
69+
caption="The diagram shown is based on medium density values. Always use design tokens
70+
for icon sizing and spacing."
71+
/>
72+
73+
## Spacing between icon and text
74+
75+
Spacing between an icon and its paired text varies by context. The sub-sections below cover key scenarios.
76+
77+
### When to use spacing-50
78+
79+
Apply `--salt-spacing-50` — the icon is used within small, primitive components to describe the interaction or label. This applies to:
80+
81+
- [Button](/salt/components/button)
82+
- [Toggle button](/salt/components/toggle-button)
83+
- [Pill](/salt/components/pill)
84+
- [Tag](/salt/components/tag)
85+
86+
<ImageSwitcher
87+
images={[
88+
{
89+
src: "/img/foundations/iconography-icon-spacing-50.png",
90+
alt: "Spacing 50 examples for icon and text.",
91+
},
92+
{
93+
src: "/img/foundations/iconography-icon-spacing-50-spacer.png",
94+
alt: "Spacing 50 examples for icon and text with annotation.",
95+
},
96+
]}
97+
darkImages={[
98+
{
99+
src: "/img/foundations/iconography-icon-spacing-50-dark.png",
100+
alt: "Spacing 50 examples for icon and text.",
101+
},
102+
{
103+
src: "/img/foundations/iconography-icon-spacing-50-spacer-dark.png",
104+
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
119+
- [Link](/salt/components/link)
120+
121+
<ImageSwitcher
122+
images={[
123+
{
124+
src: "/img/foundations/iconography-icon-spacing-75.png",
125+
alt: "Spacing 75 examples for icon and text.",
126+
},
127+
{
128+
src: "/img/foundations/iconography-icon-spacing-75-spacer.png",
129+
alt: "Spacing 75 examples for icon and text with annotation.",
130+
},
131+
]}
132+
darkImages={[
133+
{
134+
src: "/img/foundations/iconography-icon-spacing-75-dark.png",
135+
alt: "Spacing 75 examples for icon and text.",
136+
},
137+
{
138+
src: "/img/foundations/iconography-icon-spacing-75-spacer-dark.png",
139+
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:
148+
149+
- [Accordion](/salt/components/accordion)
150+
- [Vertical navigation](/salt/components/vertical-navigation)
151+
- [Tabs](/salt/components/tabs)
152+
- [Tree](/salt/components/tree)
153+
- [List box](/salt/components/list-box)
154+
- [Menu items](/salt/components/menu)
155+
- [Checkbox](/salt/components/checkbox)
156+
- [Radio button](/salt/components/radio-button)
157+
158+
<ImageSwitcher
159+
images={[
160+
{
161+
src: "/img/foundations/iconography-icon-spacing-100.png",
162+
alt: "Spacing 100 examples for icon and text.",
163+
},
164+
{
165+
src: "/img/foundations/iconography-icon-spacing-100-spacer.png",
166+
alt: "Spacing 100 examples for icon and text with annotation.",
167+
},
168+
]}
169+
darkImages={[
170+
{
171+
src: "/img/foundations/iconography-icon-spacing-100-dark.png",
172+
alt: "Spacing 100 examples for icon and text.",
173+
},
174+
{
175+
src: "/img/foundations/iconography-icon-spacing-100-spacer-dark.png",
176+
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+
<Callout status="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 |
197+
| -------------------- | --------------------------- |
198+
| Display1, Display2 | `--salt-spacing-300` |
199+
| Display3, Display4 | `--salt-spacing-250` |
200+
| H1, H2 | `--salt-spacing-150` |
201+
| H3, H4 | `--salt-spacing-100` |
202+
203+
<ImageSwitcher
204+
images={[
205+
{
206+
src: "/img/foundations/iconography-icon-spacing-heading.png",
207+
alt: "Icon spacing examples for Display and Heading text sizes.",
208+
},
209+
{
210+
src: "/img/foundations/iconography-icon-spacing-heading-spacer.png",
211+
alt: "Icon spacing examples for Display and Heading text size with annotation.",
212+
},
213+
]}
214+
darkImages={[
215+
{
216+
src: "/img/foundations/iconography-icon-spacing-heading-dark.png",
217+
alt: "Icon spacing examples for Display and Heading text sizes.",
218+
},
219+
{
220+
src: "/img/foundations/iconography-icon-spacing-heading-spacer-dark.png",
221+
alt: "Icon spacing examples for Display and Heading text size with annotation.",
222+
},
223+
]}
224+
label="Show spacing"
225+
/>
226+
227+
:fragment{src="./../fragments/feedback.mdx"}
58.5 KB
Loading
59.2 KB
Loading
6.11 KB
Loading
-11.6 KB
Loading
35.4 KB
Loading
36.5 KB
Loading
34.7 KB
Loading
33.6 KB
Loading
21 KB
Loading

0 commit comments

Comments
 (0)