@si-components/vue
Vue 3 component for simple-icons
Installation
npm install @si-components/vue simple-icons
simple-icons
must be installed as a peer dependency.
Usage
<template>
<!-- pass icon into component -->
<SIIcon :icon="vueIcon" />
<!-- extra attributes are passed to svg -->
<SIIcon :icon="vueIcon" width="100" height="100" :color="'#' + vueIcon.hex" />
</template>
<script>
import SIIcon from '@si-components/vue'
// import icon from simple-icons
import { siVuedotjs } from 'simple-icons/icons'
export default {
name: 'Component',
components: {
SIIcon,
},
data() {
return {
siVuedotjs,
}
},
}
</script>