Usage

The module will automatically make the MdiIcon component available to your app. You can use it like this:

index.vue

<MdiIcon icon="mdiAccount" />

Props

KeyTypeDefaultDescription
iconstringrequiredThe icon to display. Accepts any icon from Material Design Icons.
sizestring1emThe size of the icon. Accepts any CSS value for font-size, eg. 1em, 1px, 90%, inherit etc.

Configuration

You can configure this module by adding an mdi section to the nuxt.config.ts file.

export default defineNuxtConfig({
  // ...
  mdi: {
    cache: false,
    componentName: 'MdiIcon',
    defaultSize: '1em'
  }
})
Table of Contents