๐Ÿงฉ @rustkas/svelte-heroicons

Minimal, modern and fully typed Heroicons integration for SvelteKit.
Tree-shakable, CLI-powered, and zero dependencies.


โœจ Features

  • โšก Tree-shakable ES module exports per style & size
  • ๐Ÿ“ฆ Auto-generated from official Heroicons SVGs
  • ๐Ÿง  Type-safe with full TypeScript support
  • ๐Ÿ›  CLI generator with --only, --style, --icon, --dry-run
  • ๐ŸŽ› Import only what you need: import { XMarkIcon } from '@rustkas/svelte-heroicons/solid-24'
  • ๐Ÿงช Includes npm run validate sandbox test

๐Ÿš€ Quick Start

npm install @rustkas/svelte-heroicons
<script lang="ts">
  import { AcademicCapIcon } from '@rustkas/svelte-heroicons/outline-24';
</script>

<AcademicCapIcon class="w-6 h-6 text-blue-500" />

๐ŸŽ› CLI Usage (for maintainers)

npm run generate -- --only=24 --style=outline
npm run generate -- --icon=academic-cap,x-mark
npm run generate -- --dry-run

๐Ÿงช Validation

npm run validate

This will:

  • Run generation
  • Build with svelte-package
  • Pack .tgz
  • Install into temporary validate-playground/
  • Test import and remove test project

๐Ÿ“ Exports

Available submodules:

@rustkas/svelte-heroicons/outline-24
@rustkas/svelte-heroicons/solid-20
@rustkas/svelte-heroicons/solid-16
...

๐Ÿงฐ Credits


๐Ÿ†“ License

MIT

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes