Vue
jiggicons-vue: components for Vue 3.
npm install jiggicons-vueNotifications.vue
<script setup>
import { Bell } from 'jiggicons-vue';
</script>
<template>
<button class="notifications">
<Bell variant="solid" sound />
3 new
</button>
</template>Props
| Prop | Default | |
|---|---|---|
variant | 'outline' | outline, solid, duotone or glass. Styles |
size | 24 | Width and height in pixels (or any CSS length as a string) |
animate | 'hover' | What plays it: hover (also keyboard focus), click, mount or none. When icons play |
sound | false | Play the icon’s spatial sound with its motion. Sound |
volume | 1 | Sound volume from 0 to 1 |
title | — | Accessible name. Leave it out when the icon sits next to a visible label. Accessibility |
The component emits play each time it plays. A template ref exposes play() and stop():
<script setup>
import { ref } from 'vue';
import { Gift } from 'jiggicons-vue';
const gift = ref();
</script>
<template>
<Gift ref="gift" animate="none" :size="40" />
<button @click="gift.play()">Open</button>
</template>Icons from the full set
In a Vue project, npx jiggicons add shopping-bag writes a component made with createJiggicon fromjiggicons-vue. It takes the same props. To pick an icon at run time, use <Jiggicon :icon="bell" />.
For Nuxt, see Nuxt.