> Markdown version of [Icons](https://vaadin.com/docs/v14/flow/styling/lumo/icons). Section index: [llms.txt](https://vaadin.com/docs/v14/flow/llms.txt)

# Lumo Icons

Lumo comes with a set of icons that are designed to fit in with the default Lumo style.

## <a id="available-icons"></a>Available Icons

You can browse the icon set in the [latest documentation](/docs/components/icons/default-icons).

## <a id="icons-size"></a>Icons Size

Use the icon size custom properties to set consistent sizes for all icons across your application. The Lumo icons are drawn on a 24×24 pixel canvas – the \<b>M size\</b> fits that by default.

You need to import the style sheet for [Sizing and Spacing](https://vaadin.com/docs/v14/flow/styling/lumo/sizing-and-spacing.md) to use the sizing properties.

- - \--lumo-icon-size-s: `1.25em`
  - \--lumo-icon-size-m: `1.5em`
  - \--lumo-icon-size-l: `2.25em`

## <a id="examples"></a>Examples

### SVG sprites

The SVG sprites are used with the [`iron-icon`](https://www.webcomponents.org/element/PolymerElements/iron-icon) element.

```html
<script type="module">
  import '@vaadin/vaadin-lumo-styles/icons.js';
</script>
```

```html
<iron-icon icon="lumo:edit"></iron-icon>
<iron-icon icon="lumo:cog"></iron-icon>
<iron-icon icon="lumo:search"></iron-icon>
```

#### Advanced usage

If you need to be in control of when or how [`iron-icon`](https://www.webcomponents.org/element/PolymerElements/iron-icon) is imported, you may import `iconset.html` (instead of `icons.html`) to import only the icon definitions (`iron-iconset-svg`) without automatically importing the `iron-icon` element.

```html
<script type="module">
  import '@vaadin/vaadin-lumo-styles/iconset.js';
</script>
```

### Font icons

Note, that the use of SVG icons is preferable over font icons. There are [well documented caveats](https://cloudfour.com/thinks/seriously-dont-use-icon-fonts/) when using font icons.

```html
<script type="module">
  import '@vaadin/vaadin-lumo-styles/font-icons.js';
</script>
```

```html
<span class="font-icon edit"></span>
<span class="font-icon cog"></span>
<span class="font-icon search"></span>

<custom-style>
  <style>
    .font-icon {
      font-family: lumo-icons;
      font-size: var(--lumo-icon-size-m);
    }
    .font-icon.edit::before {
      content: var(--lumo-icons-edit);
    }
    .font-icon.cog::before {
      content: var(--lumo-icons-cog);
    }
    .font-icon.search::before {
      content: var(--lumo-icons-search);
    }
  </style>
</custom-style>
```

### <a id="icon-size"></a>Icon size

```html
<script type="module">
  import '@vaadin/vaadin-lumo-styles/sizing.js';
</script>
```

```html
<h5>SVG</h5>
<iron-icon icon="lumo:edit" class="size-s"></iron-icon>
<iron-icon icon="lumo:edit" class="size-m"></iron-icon>
<iron-icon icon="lumo:edit" class="size-l"></iron-icon>

<h5>Font icon</h5>
<span class="font-icon size-s"></span>
<span class="font-icon size-m"></span>
<span class="font-icon size-l"></span>

<custom-style>
  <style>
    .font-icon {
      font-family: lumo-icons;
      font-size: var(--lumo-icon-size-m);
      vertical-align: middle;
    }
    .font-icon::before {
      content: var(--lumo-icons-search);
    }
    /* Control iron-icons with width and height */
    iron-icon.size-s {
      width: var(--lumo-icon-size-s);
      height: var(--lumo-icon-size-s);
    }
    iron-icon.size-m {
      width: var(--lumo-icon-size-m);
      height: var(--lumo-icon-size-m);
    }
    iron-icon.size-l {
      width: var(--lumo-icon-size-l);
      height: var(--lumo-icon-size-l);
    }
    /* Control font icons with font-size */
    .font-icon.size-s {
      font-size: var(--lumo-icon-size-s);
    }
    .font-icon.size-m {
      font-size: var(--lumo-icon-size-m);
    }
    .font-icon.size-l {
      font-size: var(--lumo-icon-size-l);
    }
  </style>
</custom-style>
```

`33A80076-533B-4F02-AF46-8267A4971037`
