---
title: Quasar Icon Sets
related:
  - title: Installing Icon Libraries
    path: installing-icon-libraries.md
  - title: Icon
    path: ../vue-components/icon.md
---
Quasar components have their own icons. Rather than forcing you into using one icon library in particular (so that they can display correctly), Quasar lets you choose **which icons it should use for its components**. This is called a `Quasar Icon Set`.

You can install multiple icon libraries, but you must choose only one to use on Quasar's components.

Quasar currently supports: [Material Icons](https://fonts.google.com/icons?icon.set=Material+Icons), [Material Symbols](https://fonts.google.com/icons?icon.set=Material+Symbols), [Font Awesome](https://fontawesome.com/icons), [Ionicons](https://ionic.io/ionicons/), [MDI](https://pictogrammers.com/library/mdi/), [Eva Icons](https://akveo.github.io/eva-icons), [Themify Icons](https://themify.me/themify-icons), [Line Awesome](https://icons8.com/line-awesome) and [Bootstrap Icons](https://icons.getbootstrap.com/).

It is also possible to use your own icon files (SVG or any image format) with any Quasar component, see [QIcon | Image icons](../vue-components/icon.md#image-icons) page for more details.

You can also provide an icon mapping function to add support for any other icon library or re-map some existing ones to your liking, see [QIcon | Custom mapping](../vue-components/icon.md#custom-mapping) for more details. You can use this to re-map long image file paths to short and understandable names, if using image icons, for example.

> [!NOTE]
> Related pages: [Installing Icon Libraries](installing-icon-libraries.md) and [QIcon component](../vue-components/icon.md).

## IconSet API

Not inlined here: call the `get_api` tool with `name: "IconSet"` for its definition, or add `part` (`props`, `methods`, `injection`) for one of them.

## Configuring the default Icon Set

**There are two types of Quasar Icon Sets: webfont-based and svg-based.**

Unless configured otherwise, Quasar uses Material Icons webfont as the icon set for its components. You can however tell Quasar to use some other Icon Set, but if it's a webfont-based one then be sure to include its icon library in your website/app (see [Installing Icon Libraries](installing-icon-libraries.md)).

### Hardcoded

If the default Quasar Icon Set is not dynamically determined (does not depends on cookies for example), then you can:

#### Quasar CLI Way

We edit the `/quasar.config` file again:

```js
framework: {
  // webfont-based example
  iconSet: 'mdi-v7'
}
```

```js
framework: {
  // svg-based example
  iconSet: 'svg-mdi-v7'
}
```

For all available options, visit the [GitHub](https://github.com/quasarframework/quasar/tree/dev/ui/icon-set) repository.

Full example of including MDI & Fontawesome and telling Quasar to use Fontawesome for its components.

```js
extras: [
  'mdi-v7',
  'fontawesome-v7'
],
framework: {
  iconSet: 'fontawesome-v7'
}
```

This will enable you to use both MDI & Fontawesome webfonts in your app, and all Quasar components will display Fontawesome icons.

#### Quasar UMD Way

Include the Quasar Icon Set tag for your Quasar version and also tell Quasar to use it. Example:

```html
<!-- include this after Quasar JS tag -->
<script src="https://cdn.jsdelivr.net/npm/quasar@v2/dist/icon-set/fontawesome-v7.umd.prod.js"></script>
<script>
  Quasar.IconSet.set(Quasar.IconSet.fontawesomeV6)
</script>
```

Check what tags you need to include in your HTML files on [UMD / Standalone](../start/umd.md) page.

#### Quasar Vite Plugin Way

We edit your `main.js`:

Example "/main.js":

```js
// ...
import { Quasar } from 'quasar'
// ...
import iconSet from 'quasar/icon-set/fontawesome-v7'
import '@quasar/extras/fontawesome-v7/fontawesome-v7.css'
// ...
app.use(Quasar, {
  // ...,
  iconSet: iconSet
})
```

### Dynamic (on non-SSR/SSG)

Quasar CLI: If your desired Quasar Icon Set must be dynamically selected (example: depends on a cookie), then you need to create a boot file: `quasar new boot quasar-icon-set [--format ts]`. This will create `/src/boot/quasar-icon-set.js` file. Edit it to:

Example "/src/boot/quasar-icon-set.js":

```js
import { defineBoot } from '#q-app'
import { IconSet } from 'quasar'

// relative path to your node_modules/quasar/..
// change to YOUR path
const iconSetList = import.meta.glob('../../node_modules/quasar/icon-set/*.js')
// or just a select few (example below with only mdi-v7 and fontawesome-v7):
// import.meta.glob('../../node_modules/quasar/icon-set/{mdi-v7,fontawesome-v7}.js')

export default defineBoot(async () => {
  const iconSetName = 'mdi-v7' // ... some logic to determine it (use Cookies Plugin?)

  try {
    iconSetList[`../../node_modules/quasar/icon-set/${iconSetName}.js`]().then(
      setDefinition => {
        IconSet.set(setDefinition.default)
      }
    )
  } catch (err) {
    console.error(err)
    // Requested Quasar Icon Set does not exist,
    // let's not break the app, so catching error
  }
})
```

Then register this boot file into the `/quasar.config` file:

```js
boot: ['quasar-icon-set']
```

### Dynamic (on SSR/SSG)

When dealing with SSR/SSG, we can't use singleton objects because that would pollute sessions. As a result, as opposed to the dynamical example above (read it first!), you must also specify the `ssrContext` from your boot file:

Example "/src/boot/quasar-icon-set.js":

```js
import { defineBoot } from '#q-app'
import { IconSet } from 'quasar'

// relative path to your node_modules/quasar/..
// change to YOUR path
const iconSetList = import.meta.glob('../../node_modules/quasar/icon-set/*.js')
// or just a select few (example below with only mdi-v7 and fontawesome-v7):
// import.meta.glob('../../node_modules/quasar/icon-set/{mdi-v7,fontawesome-v7}.js')

// ! NOTICE ssrContext param:
export default defineBoot(async ({ ssrContext }) => {
  const iconSetName = 'mdi-v7' // ... some logic to determine it (use Cookies Plugin?)

  try {
    iconSetList[`../../node_modules/quasar/icon-set/${iconSetName}.js`]().then(
      setDefinition => {
        IconSet.set(setDefinition.default, ssrContext)
      }
    )
  } catch (err) {
    console.error(err)
    // Requested Quasar Icon Set does not exist,
    // let's not break the app, so catching error
  }
})
```

## Change Quasar Icon Set at Runtime

### Changing Icon Set

Quasar Icon Set is reactive, so all components will update properly if you change the $q.iconSet object. Here is an example:

```js
import { useQuasar } from 'quasar'
import mdiIconSet from 'quasar/icon-set/mdi-v7.js'

setup () {
  const $q = useQuasar()

  function changeIconSetToMdiIconSet () {
    $q.iconSet.set(mdiIconSet)
  }

  return {
    changeIconSetToMdiIconSet
  }
}
```

If you want to do this outside of a .vue file (and you are NOT on SSR/SSG mode) then you can

Example "/src/boot/some-boot-file.js":

```js
import { defineBoot } from '#q-app'
import { IconSet } from 'quasar'
import mdiIconSet from 'quasar/icon-set/mdi-v7.js'

export default defineBoot(() {
  IconSet.set(mdiIconSet)
})
```

### Changing a Specific Icon

If you want to change a specific icon to another, you can. Here is an example:

```js
import { useQuasar } from 'quasar'

setup () {
  const $q = useQuasar()

  function changeQEditorHeaderIcon () {
    $q.iconSet.editor.header1 = 'fas fa-font'
  }

  return { changeQEditorHeaderIcon }
}
```

If you want to do this outside of a .vue file (and you are NOT on SSR/SSG mode) then you can

Example "/src/boot/some-boot-file.js":

```js
import { IconSet } from 'quasar'

export default () {
  IconSet.props.editor.header1 = 'fas fa-font'
}
```
