Skip to main content

Icon

The icon component renders graphic symbols to visually communicate actions, status, and navigation throughout the interface. Use icon to reinforce button actions, indicate status states, or provide wayfinding cues that help users understand available functionality.

Icon components support multiple sizes, semantic tones, and integration with components like button, badge, and chip. For recognized payment brand marks, use payment icon instead.

Support
Targets (29)

Configure the following properties on the icon component.

Configure the following properties on the icon component.

string

A unique identifier for the element. Use this to reference the element in JavaScript, link labels to form controls, or target specific elements for styling or scripting.

'small' | 'large' | 'base' | 'small-200' | 'small-100' | 'large-100'
Default: 'base'

The size of the icon.

  • 'base': Default size that works well for most use cases.
  • 'small': Small icon for inline use within text or compact UI elements.
  • 'small-200': Extra small icon for the most compact contexts.
  • 'small-100': Small icon suitable for tight or dense layouts.
  • 'large': Large icon for emphasis or prominent display.
  • 'large-100': Extra large icon for maximum visual impact.
'custom' | 'success' | 'info' | 'auto' | 'neutral' | 'warning' | 'critical'
Default: 'auto'

The semantic meaning and color treatment of the icon.

  • 'info': Informational content or helpful tips.
  • 'auto': Automatically determined based on context.
  • 'neutral': General information without specific intent.
  • 'success': Positive outcomes or successful states.
  • 'warning': Important warnings about potential issues.
  • 'critical': Urgent problems or destructive actions.
  • 'custom': Inherits a custom color from its parent element's CSS.
'' |

The type of icon that will be displayed. You can specify an icon name from the available icon set, or use an empty string to show no icon.


Add visual cues to help buyers identify checkout actions. This example displays common icons for cart, delivery, store, and settings using the type property.

Display icons

A rendered example of the icon component

html

<s-stack direction="inline" gap="base">
<s-icon type="cart"></s-icon>
<s-icon type="delivery"></s-icon>
<s-icon type="store"></s-icon>
<s-icon type="settings"></s-icon>
</s-stack>

Anchor to Pair an icon with a text labelPair an icon with a text label

Add an icon beside text to reinforce a message visually. This example renders a store icon inline with a pickup availability label using an s-stack with direction="inline".

html

<s-stack direction="inline" gap="base" alignItems="center">
<s-icon type="store" size="base"></s-icon>
<s-text>Available for in-store pickup</s-text>
</s-stack>

Anchor to Apply semantic tonesApply semantic tones

Communicate status through color-coded icons. This example displays icons with warning, success, info, and critical tones to convey different states at a glance.

html

<s-stack direction="inline" gap="base">
<s-icon type="alert-circle" tone="warning"></s-icon>
<s-icon type="check-circle" tone="success"></s-icon>
<s-icon type="info" tone="info"></s-icon>
<s-icon type="alert-triangle" tone="critical"></s-icon>
</s-stack>

Anchor to De-emphasize an iconDe-emphasize an icon

Lower the visual prominence of an icon for secondary content. This example displays a help icon with tone="neutral" so it doesn't compete with primary actions.

html

<s-icon type="question-circle" tone="neutral"></s-icon>

Reinforce button actions with visual cues. This example places icons inside buttons for add-to-cart and remove actions with appropriate tones.

html

<s-stack direction="inline" gap="base">
<s-button><s-icon type="cart"></s-icon> Add to cart</s-button>
<s-button tone="critical"><s-icon type="delete"></s-icon> Remove</s-button>
</s-stack>

Enhance status badges with visual indicators. This example pairs badges with icons to show fulfilled and action-required order states.

html

<s-stack direction="inline" gap="base">
<s-badge tone="neutral" icon="check-circle">Fulfilled</s-badge>
<s-badge tone="critical" icon="alert-triangle">Action required</s-badge>
</s-stack>

  • Use meaningful icons to support actions and status, not decorate: Icons should clarify what an action does or indicate state. Use icons with well-established meanings such as a trash icon for delete actions, a checkmark for completed status, or a warning icon for errors. Avoid adding icons purely for visual interest.
  • Use tones consistently to communicate semantic meaning: Apply info for neutral guidance,success for confirmations, warning for issues that need attention, and critical sparingly for problems that must be resolved immediately.
  • Pair with text labels: Don't rely on icons alone to communicate meaning. Always pair icons with visible text for clarity and accessibility.
  • Maintain consistency across your interface: Always use the same icon for the same action or concept throughout your extension. If you use a pencil for edit in one place, use it everywhere. Inconsistent icon usage confuses buyers.
  • Size appropriately: Use base for standard inline icons, small for compact layouts, and large when extra emphasis is needed. Avoid mixing sizes in the same row. Inconsistent sizing creates uneven vertical alignment and makes the UI feel unpolished.

Was this page helpful?