Skip to main content
🏠ComponentsIconVersion: 2.0.0-beta.6

Icon

Icons play a vital role in improving the readability of components by creating visual indicators and guiding users to better understand actions when used correctly.

Library

The Quantum icon component offers compatibility with both the Material icons and the Quantum Business Icons.

To use the icon component, make sure to import the necessary icon libraries

With Material Icons

By default, the component is set up to work with Material icons or lib="material".

<qtm-icon icon="account_circle"></qtm-icon>
<qtm-icon icon="account_circle" lib="material"></qtm-icon>

The Quantum icon component supports five styles of Material Icon: outlined, round, sharp, two-tone and filled, by providing variant property.

<qtm-icon icon="account_circle" variant="filled"></qtm-icon>
<qtm-icon icon="account_circle" variant="outlined"></qtm-icon>
<qtm-icon icon="account_circle" variant="sharp"></qtm-icon>
<qtm-icon icon="account_circle" variant="two-tone"></qtm-icon>
<qtm-icon icon="account_circle" variant="round"></qtm-icon>

With Business Icons

You want to use Quantum Business Icons by setting the "lib" property to "business".

<qtm-icon icon="aircraft" lib="business"></qtm-icon>

Sizes

You can change size of icon component by setting size property to xsmall, small, medium, large, xlarge or xxlarge. By default, Quantum icon size is medium

  • Class
    Properties
  • qtm-icon-xsmall

    --icon-size-value: var(--spacing-s);

    font-size: var(--icon-size-value);

    width: var(--icon-size-value);

    height: var(--icon-size-value);

  • qtm-icon-small

    --icon-size-value: var(--spacing-m);

    font-size: var(--icon-size-value);

    width: var(--icon-size-value);

    height: var(--icon-size-value);

  • qtm-icon-medium

    --icon-size-value: 1.25rem;

    font-size: var(--icon-size-value);

    width: var(--icon-size-value);

    height: var(--icon-size-value);

  • qtm-icon-large

    --icon-size-value: var(--spacing-l);

    font-size: var(--icon-size-value);

    width: var(--icon-size-value);

    height: var(--icon-size-value);

  • qtm-icon-xlarge

    --icon-size-value: var(--spacing-xl);

    font-size: var(--icon-size-value);

    width: var(--icon-size-value);

    height: var(--icon-size-value);

  • qtm-icon-xxlarge

    --icon-size-value: var(--spacing-3xl);

    font-size: var(--icon-size-value);

    width: var(--icon-size-value);

    height: var(--icon-size-value);

With Material Icons

xsmall
small
medium
large
xlarge
xxlarge
<qtm-icon icon="account_circle" size="xsmall"></qtm-icon>
<qtm-icon icon="account_circle" size="small"></qtm-icon>
<qtm-icon icon="account_circle" size="medium"></qtm-icon>
<qtm-icon icon="account_circle" size="large"></qtm-icon>
<qtm-icon icon="account_circle" size="xlarge"></qtm-icon>
<qtm-icon icon="account_circle" size="xxlarge"></qtm-icon>

With Business Icons

xsmall
small
medium
large
xlarge
xxlarge
<qtm-icon icon="aircraft" size="xsmall"></qtm-icon>
<qtm-icon icon="aircraft" size="small"></qtm-icon>
<qtm-icon icon="aircraft" size="medium"></qtm-icon>
<qtm-icon icon="aircraft" size="large"></qtm-icon>
<qtm-icon icon="aircraft" size="xlarge"></qtm-icon>
<qtm-icon icon="aircraft" size="xxlarge"></qtm-icon>

API

qtm-icon

PropertyTypeDefaultDescription
classesstringlist of classes to override or extend the styles applied to the component. You can use available utility classes by importing
iconstringicon name
lib"business" | "material"Choose between the Material icon or Quantum business icon library
size"large" | "medium" | "small" | "xlarge" | "xsmall" | "xxlarge"The size of the icon
variant"filled" | "outlined" | "round" | "sharp" | "two-tone"'filled'The variant of the icon used for the material icon library