Soracom

Design System
  1. Home
  2. Design system
  3. Elements
  4. Icon

Icon

Icon is for embedding an icon inside html content

Options

Components such as Text, Heading, Input, Select, Button, Tag and Notice - do not require use of ds-icon, and have specific classes for applying icons.

Basic usage

For a full list of published icon classes, refer to the examples on the Icons page.

html
Copy

Component color

All Icon options support component color classes.

html
Copy

Visual states

Icon adheres to the 4x preset visual states - alert, warning, success and info.

html
Copy

Indent

Icon supports a subset to ds-indents

html
Copy

Size

When using ds-icon inside ds-text or ds-heading if you don’t specify a specific size, the icon will automatically be scaled to suit the ds-text or ds-heading parent element.

Components such as Text, Heading, Input, Select, Button, Tag and Notice - do not require use of ds-icon, and have specific classes for applying icons.

You can specify a specific icon size using the following classes:

html
Copy

Styles

Round

html
Copy

Square

html
Copy

Rounded

html
Copy

Animation

Animation states for icons should only be used sparingly to indicate temporary states (such as sending/receiving data or waiting for a server side process to complete).

--spin

html
Copy

--pulse

html
Copy

--glow

html
Copy

--blink

html
Copy

--spin and --pulse

html
Copy

Tests

Inline vs class

This test checks that the icon specified as an inline ds-icon presents the same as an element if an icon class.

html
Copy

Sizing

The following tests check that a ds-icon without a specific size class inside various html elements/components assume the correct default sizing for that element.

Inline html elements

html
Copy

Inline ds-text

html
Copy

Inline ds-heading

html
Copy

Column alignment

Default

html
Copy

Middle

html
Copy

Legacy

html
Copy