@kaspernowak/allergen-icons-vue

Vue 3 allergen icon components generated from @kaspernowak/allergen-icons core assets.
867
Install
npm install @kaspernowak/allergen-icons-vue
Latest Version:0.1.0
Vue:3
License:MIT
Last Updated:Mar 17, 2026
Links: GitHub  ·  npm
Maintainer: kaspernowak

@kaspernowak/allergen-icons-vue

Vue 3 allergen icon components generated from the @kaspernowak/allergen-icons core package.

Installation

pnpm add @kaspernowak/allergen-icons-vue vue

Usage

<script setup lang="ts">
import { FishIcon, MilkIcon, PeanutIcon } from '@kaspernowak/allergen-icons-vue'
import { FishIcon as ErudusFishIcon } from '@kaspernowak/allergen-icons-vue/collections/erudus'
</script>

<template>
  <div class="flex items-center gap-2 text-slate-700">
    <FishIcon class="size-5" aria-label="Contains fish" />
    <MilkIcon class="size-5 text-blue-700" aria-label="Contains milk" />
    <PeanutIcon class="size-5 text-amber-700" aria-label="Contains peanuts" />
    <ErudusFishIcon class="size-5 text-slate-500" aria-label="Erudus fish icon" />
  </div>
</template>

Collections

The default exports are the default react-allergens icons. Additional families are available from collection subpaths:

import { FishIcon } from '@kaspernowak/allergen-icons-vue'
import { FishIcon as ErudusFishIcon } from '@kaspernowak/allergen-icons-vue/collections/erudus'

The @kaspernowak/allergen-icons-vue/collections entrypoint also exposes collection namespaces without export collisions:

import { erudus, reactAllergens } from '@kaspernowak/allergen-icons-vue/collections'

Props

Prop Type Default Description
size number | string '1em' Width and height of the icon
color string 'currentColor' Primary color
secondaryColor string icon-specific default Optional detail color for duotone icons
title string undefined Accessible title text

All standard SVG attributes and event listeners are passed through to the underlying svg element.

Accessibility

Icons default to aria-hidden="true" unless you provide title or aria-label.

Styling

Icons use currentColor by default for their primary channel, so they inherit the text color from CSS:

<PeanutIcon class="size-6 text-amber-700" />
<MilkIcon color="#1d4ed8" :size="28" />
<MustardIcon color="#ca8a04" secondaryColor="#ffffff" />

The default react-allergens set is duotone in nature, so secondaryColor controls the inner symbol/details when you want to override them explicitly.

Monochrome collections such as many Erudus icons simply do not consume the detail channel. In those cases, color is the only paint channel that affects the rendered paths.

Tree shaking

Only the icons you import are included in the bundle.

import { MilkIcon } from '@kaspernowak/allergen-icons-vue'
import FishIcon from '@kaspernowak/allergen-icons-vue/icons/FishIcon'
import { FishIcon as ErudusFishIcon } from '@kaspernowak/allergen-icons-vue/collections/erudus'

Related Packages

@kaspernowak/allergen-icons

Framework-neutral allergen icon assets, metadata, and raw SVGs.

943 0
@qlik/sprout-icons

Comprehensive icon library for the Sprout Design System, available as React and...

578,832
ant-design-icons

Ant Design Icons 是一套提取自 Ant Design 的高质量图标,你可以自由地在 React、Vue...

5,284 53
@paratus-medical/paratus-icons

PARATUS SVG icon library

4,125
@scarlab-icons/vue

A set of free MIT-licensed Vue components with SVG icons.

949 17

Version History

Version Released Vue License
0.1.0 >=3.4 <4 MIT