@mal-icons/vue
v0.7.11
Published
Vue 3 components for mal-icons.
Maintainers
Readme
@mal-icons/vue
Vue 3 adapter for mal-icons — a
high-performance, tree-shakeable icon SDK. Each icon is a pre-generated Vue
component that renders plain SVG, with no runtime parsing and no v-html.
Highlights
- Tree-shakeable — every icon is its own module.
- Tiny — strict per-icon size budget.
- Themeable —
provide/injecttheming viaprovideIconContext, with per-icon overrides. - Pure-CSS animations —
spin,pulse,beat,bounce,ping,shake,wiggle,float,heartbeat,flip,rotate,zoom,fade,slide,glow,swing,tada, with aprefers-reduced-motionguard. - Accessible — correct
role/aria-hiddenand optional<title>.
Installation
bun add @mal-icons/vue
# or
npm install @mal-icons/vueRequires Vue 3.3 or newer (peer dependency).
Use with AI agents
AI coding agents can add and theme these icons for you via the
mal-icons agent skill. Install it with the
skills CLI:
npx skills add mal-icons/mal-iconsThen ask your agent to "add a trash icon" and it searches the catalog and writes
the correct @mal-icons/vue import. See the
Vue setup guide.
Quick start
<script setup lang="ts">
import { FiActivity } from "@mal-icons/vue/fi";
</script>
<template>
<FiActivity :size="24" title="Status" />
</template>App-wide theming
Call provideIconContext in a parent component's setup — all descendant
icons inherit the values, and per-icon props override them:
<script setup lang="ts">
import { provideIconContext } from "@mal-icons/vue";
provideIconContext({ size: 20, color: "#3366ff" });
</script>Props
| Prop | Type | Description |
| ---------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------- |
| size | number \| string | Width and height (defaults to 1em) |
| color | string | Overrides currentColor |
| multicolor | boolean | Keep the icon's own colors (omits the currentColor stroke/fill defaults) |
| weight | "thin" \| "light" \| "regular" \| "bold" | Stroke weight for stroke-based sets |
| animate | IconAnimation ("spin", "pulse", "bounce", "shake", "heartbeat", …) | CSS animation preset |
| secondaryColor | string | Multi-tone color, exposed as --mal-icons-secondary |
| title | string | Accessible label |
| class | string | Additional class names |
Animations
<script setup lang="ts">
import { ICON_ANIMATIONS_CSS } from "@mal-icons/core";
import { FiLoader } from "@mal-icons/vue/fi";
</script>
<template>
<component is="style">{{ ICON_ANIMATIONS_CSS }}</component>
<FiLoader animate="spin" />
</template>API
import {
IconBase,
createIcon,
provideIconContext,
IconContextKey,
DefaultIconContext,
} from "@mal-icons/vue";Icons
The bundled icon sets, their upstream licenses, pinned versions, and counts:
| Icon Library | License | Version | Count | | ---------------------------------------- | --------------------------------------------------------------------------------- | ------- | ----: | | Ant Design Icons | MIT license | 4.0.0 | 420 | | Circum Icons | MPL-2.0 license | 2.0.2 | 288 | | Codicons | CC BY 4.0 license | 0.0.46 | 604 | | css.gg | MIT license | 2.1.1 | 704 | | Devicons | MIT license | 2.0.1 | 1725 | | Feather | MIT license | 4.29.0 | 287 | | Flat Color Icons | CC BY 4.0 license | 1.0.2 | 312 | | Font Awesome Free | CC BY 4.0 license | 6.7.2 | 1402 | | Font Awesome Free Brands | CC BY 4.0 license | 6.7.2 | 495 | | Font Awesome Free Regular | CC BY 4.0 license | 6.7.2 | 163 | | Grommet | Apache 2.0 license | 4.14.0 | 637 | | Heroicons | MIT license | 2.2.0 | 324 | | Ionicons | MIT license | 8.0.13 | 1357 | | Lucide | ISC license | 1.19.0 | 1727 | | Octicons | MIT license | 19.28.1 | 733 | | Radix Icons | MIT license | 0.0.17 | 318 | | Simple Line Icons | MIT license | 2.5.5 | 189 | | Themify | SIL OFL 1.1 license | 9600186 | 352 | | Typicons | CC BY-SA 4.0 license | 2.1.2 | 336 | | Weather Icons | SIL OFL 1.1 license | 2.0.12 | 219 |
Subpath exports
| Import | Contents |
| ------------------------------ | --------------------------------- |
| @mal-icons/vue | Adapter and theming helpers |
| @mal-icons/vue/ad | All Ant Design icons (named exports) |
| @mal-icons/vue/ci | All Circum icons (named exports) |
| @mal-icons/vue/dev | All Devicons icons (named exports) |
| @mal-icons/vue/ad/AdHome | A single Ant Design icon module |
| @mal-icons/vue/ci/CiHeart | A single Circum icon module |
| @mal-icons/vue/dev/DevDreamhost | A single Devicons icon module |
| @mal-icons/vue/fa | All Font Awesome icons (named exports) |
| @mal-icons/vue/fab | All Font Awesome Brands icons (named exports) |
| @mal-icons/vue/far | All Font Awesome Regular icons (named exports) |
| @mal-icons/vue/fc | All Flat Color icons (named exports) |
| @mal-icons/vue/fi | All Feather icons (named exports) |
| @mal-icons/vue/gr | All Grommet icons (named exports) |
| @mal-icons/vue/fa/FaHeart | A single icon module |
| @mal-icons/vue/fab/FabGithub | A single icon module |
| @mal-icons/vue/far/FarHeart | A single icon module |
| @mal-icons/vue/fc/FcAbout | A single icon module |
| @mal-icons/vue/fi/FiActivity | A single icon module |
| @mal-icons/vue/gr/GrHome | A single icon module |
| @mal-icons/vue/io | All Ionicons (named exports) |
| @mal-icons/vue/lu | All Lucide (named exports) |
| @mal-icons/vue/oc | All Octicons (named exports) |
| @mal-icons/vue/io/IoHeart | A single Ionicons icon module |
| @mal-icons/vue/lu/LuHeart | A single Lucide icon module |
| @mal-icons/vue/oc/OcHeart16 | A single Octicons icon module |
| @mal-icons/vue/ti | All Typicons (named exports) |
| @mal-icons/vue/wi | All Weather Icons (named exports) |
| @mal-icons/vue/ti/TiHeart | A single Typicons icon module |
| @mal-icons/vue/wi/WiDaySunny | A single Weather Icons icon module |
| @mal-icons/vue/hi | All Heroicons icons (named exports) |
| @mal-icons/vue/hi/HiAcademicCap | A single Heroicons icon module |
| @mal-icons/vue/sl | All Simple Line Icons icons (named exports) |
| @mal-icons/vue/sl/SlActionRedo | A single Simple Line Icons icon module |
| @mal-icons/vue/cg | All css.gg icons (named exports) |
| @mal-icons/vue/cg/CgAbstract | A single css.gg icon module |
| @mal-icons/vue/vsc | All Codicons icons (named exports) |
| @mal-icons/vue/vsc/VscAccount | A single Codicons icon module |
| @mal-icons/vue/tf | All Themify icons (named exports) |
| @mal-icons/vue/tf/TfAgenda | A single Themify icon module |
| @mal-icons/vue/rx | All Radix Icons icons (named exports) |
| @mal-icons/vue/rx/RxAccessibility | A single Radix Icons icon module |
Example
A Vite + Vue 3.5 gallery lives in
examples/vue,
and a Nuxt 3 (SSR) demo in
examples/nuxt.
Repository
https://github.com/mal-icons/mal-icons · package directory
packages/vue.
License
MIT © MALDevs
