vue-open-icon
v0.1.9
Published
Vue component package for rendering Open Icon assets with shared icon lookup helpers.
Readme
vue-open-icon
vue-open-icon exposes Vue icon components together with the shared Icons lookup object from the Open Icon catalog.
Install
npm install vue-open-icon vueUse the client component
import { createApp } from 'vue';
import App from './App.vue';
createApp(App).mount('#app');<script setup lang="ts">
import { Icon, Icons } from 'vue-open-icon';
</script>
<template>
<Icon :name="Icons.UI_SEARCH_M" />
<Icon :name="Icons.WAYFINDING_CHECK_IN" title="Check in" class="app-icon" />
</template>Icon uses the lazy open-icon/runtime entrypoint and resolves the SVG for the icon you ask for.
Use the static component
<script setup lang="ts">
import { StaticIcon, Icons } from 'vue-open-icon/static';
</script>
<template>
<StaticIcon :name="Icons.UI_SEARCH_M" />
</template>Use vue-open-icon/static when you want fully synchronous output for static generation or SSR without relying on server prefetch hooks.
Exports
Iconand default export for the lazy client/runtime pathStaticIconfromvue-open-icon/staticfor synchronous SSR/static outputIcons- the shared
open-icon/runtimehelpers from the root entrypoint - the shared
open-icon/statichelpers fromvue-open-icon/static
