Icon
Icons are abstract visual representations of objects or functions.
Also known as: glyph, pictogram, symbol
<bolt-icon
name="checkmark-circle"
></bolt-icon>
Size
Permalink to "Size"FYI: Fluid sizing is the default as of Bolt 7.
Fluid sizing
Permalink to "Fluid sizing"Fluid icons are vertically aligned with adjacent text, and their height is based on inherited typography styles.
In combination with responsive typography, this allows icons to grow and shrink consistently with other responsive elements.
<bolt-icon
name="checkmark-circle"
size="sm"
></bolt-icon>
Fluid icon - sm
<br />
<bolt-icon
name="checkmark-circle"
></bolt-icon>
Fluid icon - md (default)
Fluid icon with responsive heading
<p class="bolt-body-copy-md">
<bolt-icon
name="checkmark-circle"
></bolt-icon>
Fluid icon with responsive body copy
</p>
<h3 class="bolt-heading-md">
<bolt-icon
name="checkmark-circle"
></bolt-icon>
Fluid icon with responsive heading
</h3>
Fixed sizing
Permalink to "Fixed sizing"Fixed icons remain a constant size and are unaffected by surrounding typography.
<bolt-icon
fixed
name="checkmark-circle"
size="sm"
></bolt-icon>
Fixed icon - sm
<br />
<bolt-icon
fixed
name="checkmark-circle"
></bolt-icon>
Fixed icon - md (default)
Color
Permalink to "Color"Icons can be forced to override their default color with one of the available color options.
<bolt-icon
color="darkMint"
name="checkmark-circle-filled"
></bolt-icon>
darkMint
WARNING: Modifying the height, width, and/or vertical-align CSS properties of a <bolt-icon> element may result in unexpected behavior.
Icons are displayed using the <bolt-icon> custom element.
Attributes
Permalink to "Attributes"The <bolt-icon> custom element supports the following attributes:
-
name(required): name of the icon to display- See the Iconography reference for supported icons.
-
title(optional): title to be applied to the icon's SVG- Defaults to the value given for
name. - See the Accessibility best practices for more information.
- Defaults to the value given for
-
color(optional): changes the icon's fill color- Please make sure to meet the minimum color-contrast ratio.
- Available colors:
white,charcoal,vibrantBlue,lightBlue,mediumBlue,darkBlue,cherryRed,sunburstOrange,lemonYellow,mustard,lavender,deepPurple,mint,darkMint,seaBlue,darkSeaBlue,ultralightGray,paleGray,darkGray,fossil,darkFossil,theme-error,theme-success,theme-info,theme-warning.
-
Sizing attributes:
fixedorfluid(optional, but recommended)- Applies fixed sizing or fluid sizing (default)
size(optional): applies a curated icon size- For fixed icons:
mdis 24x24 px (default)smis 16x16 px
- For fluid icons:
mdis 1.0x1.0 lh (default)smis 1.0x1.0 em
- See Icon sizing for more info.
- For fixed icons:
-
decorative(optional)- When present, indicates that the icon is used strictly for decoration has no semantic meaning, which removes the underlying SVG's
title,role, and relevant ARIA attributes.
- When present, indicates that the icon is used strictly for decoration has no semantic meaning, which removes the underlying SVG's
Icon sizing
Permalink to "Icon sizing"Use either the [fixed] or [fluid] attribute, not both.
TIP: If you are unsure which strategy to implement, start with fluid sizing.
There are two strategies available for configuring icon sizing behavior.
- Fluid sizing
- best used when an icon needs to scale relative to adjacent responsive typography
- ideal for inline layout scenarios (icon behaves more like a
<span>)
- Fixed sizing
- best used when an icon needs to retain a specific dimension that is unrelated to adjacent typography
- ideal for block layout scenarios (icon behaves more like a
<div>)
Fluid icon sizing
Permalink to "Fluid icon sizing"Fluid icon sizing (a.k.a., "responsive" icons) is a strategy for configuring icon sizing that takes advantage of modern CSS features. As of Bolt 7, fluid icon sizing is the default.
- Fluid icons are ideal for inline scenarios where the icon size should scale relative to adjacent responsive typography.
- If large enough, fluid icons may vertically overflow the line height, but it should never cause the CSS line box to grow beyond its natural height.
<bolt-icon
fluid
name="checkmark-circle"
size="sm"
></bolt-icon>
sm fluid icon
<br />
<bolt-icon
fluid
name="checkmark-circle"
></bolt-icon>
md fluid icon (default)
<br />
<bolt-icon
fluid
name="checkmark-circle"
style="--size: 2em;"
></bolt-icon>
custom fluid icon (2x2 em)
Do
- Use a fluid icon if its size needs to scale relative to adjacent, responsive typography.
- Apply a curated icon size via the
[size]attribute documented above. - Apply a custom icon size via the
--sizeCSS custom property of a fluid icon, using a relative CSS unit likeem,lh, etc.
Don't
- Don't use a fluid icon if its size is expected to remain constant.
- Don't use a fixed CSS unit (e.g.
px) for custom fluid icon sizing.
Fixed icon sizing
Permalink to "Fixed icon sizing"Fixed icons are not recommended for inline use.
As of Bolt 7, fixed icon sizing is no longer the default. It is an older strategy with several limitations.
- Fixed icons are ideal for block layout scenarios and in places where an icon needs to retain a constant size.
- Fixed icons are vertically aligned to the baseline
- This causes problems when applied to inline contexts (e.g., within paragraphs, lists, and other multi-line copy).
- Icons larger than the contextual line-height may cause extra white space or uneven gaps between lines of text.
- If the baseline cannot be determined within a parent element, the icon will likely sit higher than expected.
- Fixed icons have a constant
pxsize that does not scale responsively.- Its size will not change between responsive breakpoints.
- Its size does not change based on contextual typographic styles.
<bolt-icon
fixed
name="checkmark-circle"
size="sm"
></bolt-icon>
sm fixed icon
<br />
<bolt-icon
fixed
name="checkmark-circle"
></bolt-icon>
md fixed icon (default)
<br />
<bolt-icon
fixed
name="checkmark-circle"
style="--size: 32px;"
></bolt-icon>
custom fixed icon (32x32 px)
Do
- Use a fixed icon if its size is expected to remain constant.
- Apply a curated icon size via the
[size]attribute documented above. - Apply a custom icon size via the
--sizeCSS custom property of a fixed icon, using a fixed CSS unit likepx.
Don't
- Don't use a fixed icon if its size needs to scale relative to adjacent, responsive typography.
- Don't use a relative CSS unit (e.g.
em) for custom fixed icon sizing.
See also: Iconography principles for guidance on using icons effectively.
General guidelines
Permalink to "General guidelines"- An Icon is a symbol that is universally recognized that represents something else.
- Icons should be easily recognizable and contextually sensible.
- Their use should follow spacing rules for consistent sizing.
- Combine Icons with text labels for better comprehension. Only use Icons when it's absolutely necessary to make it easier for users to locate important screen components.
- Icons should comply with brand guidelines.
- Icons should not use third-party artwork.
Utility Icons
Permalink to "Utility Icons"- These are icons are universally recognized symbols (e.g. a printer to represent printing or an x-mark to represent closing something).
- These icons visually indicate functionality (e.g. the “opens in a new window” (external-link) icon.)
- INCLUDED with Bolt.
Brand Icons
Permalink to "Brand Icons"- Reflecting Nationwide's visual brand, these icons represent an abstract visualization of our company's products and services. (e.g. a car to represent auto insurance or a paw to represent pet insurance).
- Are used less frequently.
- Are used to visually enrich content.
- These typically do not imply an action that a user must perform.
- NOT INCLUDED with Bolt
Fluid Icons
Permalink to "Fluid Icons"- Ideal for inline scenarios where the Icon size should scale relative to adjacent responsive typography.
- May vertically overflow a text’s line height, but it should never cause the CSS line box to grow beyond its natural height.
Fixed Icons
Permalink to "Fixed Icons"- Ideal for block layout scenarios and in places where an Icon needs to retain a constant size.
- Are vertically aligned to the baseline.
- Have a constant px size that does not scale responsively.
- Its size will not change between responsive breakpoints.
- Its size does not change based on contextual typographic styles.
When to use
Permalink to "When to use"- When communicating simple actions and easily understood concepts.
- When making navigation easier for common actions.
- When notifying a user about status or important messages.
- When space needs to be conserved for more complex concepts.
When not to use
Permalink to "When not to use"- When an icon's meaning isn't immediately clear.
- When the text it supports is too abstract to be supported by visual representation.
- When it adds only decoration to a screen.
- When it is the direct child of a Link, except when that Icon is the external-link Icon.
Do
- Use Icons with meaningful text labels.
- Couple Icons tightly with text labels.
- Use a single Icon for clarity.
- Keep Icon size relative to the text size.
Don't
- Don't use Icons too far removed or unrelated to the text label.
- Don’t use too many Icons, which create visual noise.
- Don't use inconsistent Icon sizes.
- Don’t use for decoration only.
- Don’t use if the Icon's meaning is unclear, ambiguous, or not immediately recognizable.
- Don’t use third-party icons.
Content guidelines
Permalink to "Content guidelines"- Text labels for utility Icons should use sentence case.
Accessibility compliance
Permalink to "Accessibility compliance"-
WCAG 2.2 Compliant
-
JAWS 2025 Tested
-
NVDA 2025 Tested
-
VoiceOver Tested
-
Keyboard Tested
-
aXe Tested
Best practices
Permalink to "Best practices"- When
titleattribute is added to convey information, must provide a meaningful description.titleattribute can not be empty. - Avoid self-referential words like "icon", "graphic", or "image" in the
title. - Don't use special characters in the
title. - The
decorativeattribute should be added when the icon doesn't have semantic meaning.
All Bolt components have gone through accessibility testing, but please keep our accessibility guidelines in mind.