Svelte

@devigner-ui/icons-svelte: every icon as a Svelte component, for Svelte 4 and Svelte 5. The artwork is rendered from the React package at build time, so the two cannot drift.

Install

Terminal
npm install @devigner-ui/icons-svelte

svelte 4 or 5 is a peer dependency. It works in SvelteKit as an ordinary import.

Use

HTML
<script>
  import { IconAdd, IconShoppingCart } from "@devigner-ui/icons-svelte";
</script>

<IconAdd class="size-6" />
<IconShoppingCart variant="bulk" class="size-6 text-violet-600" />

The package ships .svelte source files that your own toolchain compiles, the usual shape for a Svelte library, so there is nothing to configure. Every icon is its own file, so a bundler keeps only what you import.

Props

Prop Type Default What it does
variant "outline" | "twotone" | "bold" | "bulk" | "broken" "outline" Which drawing to render
strokeWidth string | number 1.5 Line weight of outline, twotone and broken

Styles are lowercase here, as they are in the metadata and the CLI. Everything else (class, style, id, event handlers, data-*, the aria attributes) falls through to the <svg>.

Icons paint with currentColor, so size and colour come from CSS:

HTML
<IconAdd class="size-5 text-slate-500" />

Accessibility

An icon renders aria-hidden="true" by default, because an icon beside its own label would be read out twice. Name it and it becomes an image:

HTML
<IconAdd aria-label="Add item" />

Documentation

Browse all 12,480 icons