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
| Key | Type | Default | Description |
|---|---|---|---|
icon | string | required | The icon to display. Accepts any icon from Material Design Icons. |
size | string | 1em | The 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