# mdi-es

> Material Design Icons exported as ES modules

Latest version **6.5.98** (published 2021-12-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install mdi-es
pnpm add mdi-es
yarn add mdi-es
bun add mdi-es
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.5.98 |
| Published | 2021-12-13 |
| First published | 2021-04-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Yihao Gao |
| Maintainers | komatsu |
| Keywords | material-design, material, mdi, icons |

## Links

- npm: https://www.npmjs.com/package/mdi-es
- Repository: https://github.com/Yihao-G/mdi-es
- Homepage: https://github.com/Yihao-G/mdi-es#readme
- Issues: https://github.com/Yihao-G/mdi-es/issues
- npm.io page: https://npm.io/package/mdi-es

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 6.5.98 (latest) — 2021-12-13
- 6.5.97 — 2021-12-10
- 6.5.96 — 2021-11-17
- 6.5.95 — 2021-11-14
- 6.4.95 — 2021-10-26
- 6.3.96 — 2021-10-23
- 6.3.95 — 2021-10-22
- 6.1.96 — 2021-09-11
- 6.1.95 — 2021-09-08
- 5.9.61 — 2021-08-26
- 5.9.60 — 2021-07-01
- 5.9.59 — 2021-06-17
- 5.9.58 — 2021-06-17
- 5.9.57 — 2021-05-26
- 5.9.56 — 2021-04-11

## README

# Material Design Icons - ES Module Build

[![Node.js Package](https://github.com/Yihao-G/mdi-es/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/Yihao-G/mdi-es/actions/workflows/npm-publish.yml)
[![npm version](https://badge.fury.io/js/mdi-es.svg)](https://badge.fury.io/js/mdi-es)

A custom ES modularised build of [Material Design Icons](https://materialdesignicons.com). This module contains all the
SVG path data for all icons. Each icon is contained in an individual module.

```commandline
npm install mdi-es
```

## ⚠ Note: This documentation assumes your Node.js supports [custom package exports](https://github.com/jkrems/proposal-pkg-exports/)

This package uses `"exports"` in `package.json`, which remaps `dist/*.js` folder to `/`. Therefore, when importing
like `import mdiAccount from 'mdi-es/mdiAccount'`, Node actual imports from `mdi-es/dist/mdiAccount.js`.

If the Node you are using doesn't have custom package exports enabled, please import
like `import mdiAccount from 'mdi-es/dist/mdiAccount.js'`.

### TypeScript

Your TypeScript may complain `TS2307: Cannot find module 'mdi-es/mdiAccount' or its corresponding type declarations.`.
This is due to the known issue of https://github.com/microsoft/TypeScript/issues/33079 and is expected to be implemented
in 4.3.

## Usage

### Import

You can load icons by importing either through the main file (`index.js`) or each individual module.

#### Through the main file

Other icons will be tree-shaken if used with a JavaScript module bundler, such as [webpack](https://webpack.js.org)
or [rollup.js](https://rollupjs.org).

```js
import { mdiAccount } from 'mdi-es'

console.log(mdiAccount) // "M...Z"
```

#### Import individual module

This is useful if you are not using a JavaScript module bundler or using dynamic import, because not all icons are
imported.

```js
import mdiAccount from 'mdi-es/mdiAccount'

console.log(mdiAccount) // "M...Z"
```

### Show icon path

The imported value is a string of SVG path. It can be displayed by passing the value to the `d` attribute of `<path>`
element in an `<svg>` element.

```html
<svg viewBox="0 0 24 24">
    <path d="mdiAccount string goes here" />
</svg>
```

Here is an example of Vue component `<template>`:

```vue
<template>
    <svg viewBox="0 0 24 24" class="fill-current" :style="{ width: sizeString, height: sizeString }">
        <path :d="iconPath" />
    </svg>
</template>
```

## Related Packages

[NPM @MDI Organization](https://npmjs.com/org/mdi)

- React: [MaterialDesign-React](https://github.com/Templarian/MaterialDesign-React)
- SVG: [MaterialDesign-SVG](https://github.com/Templarian/MaterialDesign-SVG)
- Webfont: [MaterialDesign-Webfont](https://github.com/Templarian/MaterialDesign-Webfont)
- Font-Build: [MaterialDesign-Font-Build](https://github.com/Templarian/MaterialDesign-Font-Build)
- Desktop Font: [MaterialDesign-Font](https://github.com/Templarian/MaterialDesign-Font)

## Learn More

- [MaterialDesignIcons.com](https://materialdesignicons.com)
- https://github.com/Templarian/MaterialDesign

---
_Source: https://npm.io/package/mdi-es · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
