boxicons icon indicating copy to clipboard operation
boxicons copied to clipboard

How use in vue components?

Open atach opened this issue 3 years ago • 2 comments

Tell me how I can use icons in a project with a vue3 Снимок экрана 2022-01-05 в 11 39 18 ?

atach avatar Jan 05 '22 08:01 atach

First, install boxicons via npm, not cdn.

npm install boxicons --save

Then import Boxicons in the script section of your App.vue.

import 'boxicons';

Done. It should be now accessible everywhere in your Vue App like this.

<template>
    <box-icon name="save"></box-icon>
</template>

sourabh99967780 avatar Jan 12 '22 15:01 sourabh99967780

I see the following warning in the console

[Vue warn]: Failed to resolve component: box-icon
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

using Vue 3 + TS

shershen08 avatar Sep 14 '22 08:09 shershen08

I see the following warning in the console

[Vue warn]: Failed to resolve component: box-icon
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

using Vue 3 + TS

You can solve the problem by following this answer: https://stackoverflow.com/a/71602929

swpfY avatar Mar 27 '23 07:03 swpfY