reicon-svelte
v1.0.105
Published
Svelte icon components for 2676+ icons in 2 weights (Outline & Filled). Tree-shakeable, TypeScript-ready.
Maintainers
Readme
Reicon Svelte is the official Svelte package for Reicon — a free, open-source SVG icon library featuring 2676+ handcrafted, grid-aligned icons. Every component is tree-shakeable, fully TypeScript-ready, and ships with zero dependencies.
| 🔗 Resource | Link | |---|---| | 🌐 Website & icon browser | reicon.dev | | 📖 Documentation | reicon.dev/docs | | 📦 Core package (vanilla JS) | reicon | | 🎨 Figma plugin | reicon.dev/docs/figma |
Install
npm i reicon-svelte
# or
bun add reicon-svelte
# or
yarn add reicon-svelte- Svelte ≥ 4.0 or Svelte 5 (runes mode)
- No other dependencies required.
Usage
Basic
<script>
import { Home, ShieldCheck, AltArrowDown } from 'reicon-svelte';
</script>
<Home />
<ShieldCheck size={32} color="#d97757" />
<AltArrowDown weight="Filled" />Weights
Every icon ships in two weights — Outline (default) and Filled:
<Home /> <!-- Outline (default) -->
<Home weight="Filled" /> <!-- Filled -->Sizing & coloring
<Home size={32} /> <!-- 32×32px -->
<Home size={48} color="#d97757" /> <!-- Custom size and color -->
<Home color="currentColor" /> <!-- Inherits parent text color -->Direct icon import (smallest bundle)
For the absolute minimum bundle size, import icons directly from the sub-path:
import Home from 'reicon-svelte/icons/Home.svelte';
import ShieldCheck from 'reicon-svelte/icons/ShieldCheck.svelte';All SVG attributes are supported
Pass any standard SVG attribute — class, style, on:click, aria-*, etc.:
<Home
size={48}
color="red"
class="my-icon"
style="margin-right: 8px"
on:click={() => console.log('clicked')}
aria-label="Home"
/>Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| size | number | string | 24 | Icon width & height (number = px) |
| color | string | — | Primary icon stroke/fill color. Leave unset to use CSS class. |
| weight | 'Outline' | 'Filled' | 'Outline' | Icon style variant |
| strokeWidth | number | string | — | Override the default stroke width |
| class | string | — | Additional CSS class on the <svg> element |
| style | string | — | Additional inline styles |
Any valid SVG attribute (e.g. id, aria-*) is forwarded to the underlying <svg> element.
Tree-shaking
Every icon is a standalone ES module. Modern bundlers — Vite, Webpack, Rollup, esbuild — automatically tree-shake unused icons, keeping only what you import.
// ✅ Only Home is included in your production bundle
import { Home } from 'reicon-svelte';
// ✅ Even smaller — direct path import skips the barrel file entirely
import Home from 'reicon-svelte/icons/Home.svelte';The package is marked "sideEffects": false for optimal dead-code elimination.
Icon Names
Icons use PascalCase, derived from their original kebab-case file names:
| Original name | PascalCase import |
|---------------|-------------------|
| home | Home |
| shield-check | ShieldCheck |
| alt-arrow-down | AltArrowDown |
| shopping-cart | ShoppingCart |
| user-circle | UserCircle |
Browse and search all 2676+ icons at reicon.dev.
TypeScript
Full type declarations ship with the package — no separate @types/ installation needed.
import { Home, type IconProps, type IconWeight } from 'reicon-svelte';
const weight: IconWeight = 'Filled';
const props: IconProps = { size: 32, color: '#d97757', weight };Exported types
| Type | Description |
|------|-------------|
| IconProps | Combined icon props + Svelte SVG attributes |
| IconWeight | 'Outline' | 'Filled' |
Features
- 2676+ icons — Handcrafted, pixel-perfect SVGs across a wide range of categories
- Two weights — Outline and Filled, with consistent 24×24 grid alignment
- Tree-shakeable — Import only what you use; every icon is a standalone ES module
- Zero dependencies — No runtime overhead beyond Svelte itself
- TypeScript-ready — Full type declarations included, no extra packages needed
- SVG attribute passthrough — All standard SVG props (
class,style,aria-*, etc.) are forwarded - MIT licensed — Free for personal and commercial use
Related packages
| Package | Description |
|---------|-------------|
| reicon | Core vanilla JS + CDN runtime. No framework required. |
| reicon-react | React components for 2676+ icons. |
| reicon-vue | Vue 3 components for 2676+ icons. |
| reicon-svelte | You are here. Svelte components for 2676+ icons. |
Links
- 🌐 Website: reicon.dev
- 📖 Documentation: reicon.dev/docs
- 📦 npm: npmjs.com/package/reicon-svelte
- 🐙 GitHub: github.com/dqev/reicon
- 🐛 Issues: github.com/dqev/reicon/issues
License
MIT © Dev Chauhan
Free to use in personal and commercial projects. Attribution is appreciated but not required.
