reicon 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +41 -198
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,227 +1,70 @@
1
- <p align="center">
2
- <a href="https://reicon.dev">
3
- <img src="https://reicon.dev/jspackage.png" alt="Reicon — SVG Icon Library for Vanilla JS" width="100%" />
4
- </a>
5
- </p>
6
-
7
- <p align="center">
8
- <a href="https://npmjs.com/package/reicon"><img src="https://img.shields.io/npm/v/reicon?color=black&label=npm" alt="npm version" /></a>
9
- <a href="https://npmjs.com/package/reicon"><img src="https://img.shields.io/npm/dm/reicon?color=black&label=downloads" alt="npm downloads" /></a>
10
- <a href="https://github.com/dqev/reicon/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-black" alt="MIT License" /></a>
11
- <a href="https://reicon.dev"><img src="https://img.shields.io/badge/docs-reicon.dev-black" alt="Documentation" /></a>
12
- <a href="https://github.com/dqev/reicon"><img src="https://img.shields.io/badge/github-dqev/reicon-black" alt="GitHub" /></a>
13
- </p>
14
-
15
- <h1 align="center">Reicon</h1>
16
-
17
- <p align="center">
18
- <b>2674+ pixel-perfect SVG icons</b> • Outline & Filled weights • Vanilla JS & CDN runtime • Zero dependencies • MIT Licensed
19
- </p>
20
-
21
- <p align="center">
22
- <a href="#install">Install</a> •
23
- <a href="#usage">Usage</a> •
24
- <a href="#options">Options</a> •
25
- <a href="#tree-shaking">Tree-shaking</a> •
26
- <a href="#icon-names">Icon Names</a> •
27
- <a href="#typescript">TypeScript</a> •
28
- <a href="#cdn">CDN</a>
29
- </p>
30
-
31
- **Reicon** is the core vanilla JavaScript package for <a href="https://reicon.dev">Reicon</a> — a free, open-source SVG icon library featuring 2674+ handcrafted, grid-aligned icons. Use it directly as ES modules, or load via CDN with zero build step. Every icon is tree-shakeable, fully TypeScript-ready, and ships with no dependencies.
32
-
33
- | 🔗 &nbsp; Resource | Link |
34
- |---|---|
35
- | 🌐 &nbsp; Website & icon browser | [reicon.dev](https://reicon.dev) |
36
- | 📖 &nbsp; Documentation | [reicon.dev/docs](https://reicon.dev/docs) |
37
- | ⚛️ &nbsp; React package | [reicon-react](https://npmjs.com/package/reicon-react) |
38
- | 🎨 &nbsp; Figma plugin | [reicon.dev/docs/figma](https://reicon.dev/docs/figma) |
39
-
40
- ---
41
-
42
- ## Install
1
+ <div align="center">
43
2
 
44
- ```bash
45
- npm i reicon
46
- # or
47
- bun add reicon
48
- # or
49
- yarn add reicon
50
- ```
3
+ <br/>
4
+ <br/>
51
5
 
52
- ### CDN (no build step required)
6
+ <img src="https://reicon.dev/readme-assets/banner.webp" alt="Reicon" width="200" />
53
7
 
54
- ```html
55
- <script src="https://unpkg.com/reicon@latest"></script>
56
- ```
8
+ <br/>
57
9
 
58
- No bundler, no framework — just a `<script>` tag.
10
+ # Reicon
59
11
 
60
- ---
12
+ ### Official Reicon core package — open-source icon library for designers & developers
61
13
 
62
- ## Usage
14
+ [![npm](https://img.shields.io/npm/v/reicon?style=flat-square&label=reicon&color=9B8AFB)](https://www.npmjs.com/package/reicon)
15
+ [![Docs](https://img.shields.io/badge/Docs-reicon.dev-9B8AFB?style=flat-square)](https://reicon.dev/docs/vanilla)
16
+ [![License](https://img.shields.io/badge/License-MIT-9B8AFB?style=flat-square)](https://github.com/dqev/reicon/blob/main/LICENSE)
63
17
 
64
- ### Vanilla JS — create SVG elements
18
+ </div>
65
19
 
66
- ```js
67
- import { Home, ShieldCheck, AltArrowDown } from 'reicon';
20
+ <br/>
68
21
 
69
- document.body.appendChild(Home());
70
- document.body.appendChild(ShieldCheck({ size: 32, color: '#d97757' }));
71
- document.body.appendChild(AltArrowDown({ weight: 'Filled' }));
72
- ```
73
-
74
- ### Get SVG as a string
75
-
76
- ```js
77
- import { Home } from 'reicon';
22
+ ## Installation
78
23
 
79
- const svgString = Home.toSvg({ size: 32, color: 'red' });
80
- element.innerHTML = svgString;
24
+ ```bash
25
+ npm install reicon
26
+ # or
27
+ pnpm add reicon
28
+ # or
29
+ yarn add reicon
81
30
  ```
82
31
 
83
- ### Weights
84
-
85
- Every icon ships in two weights — **Outline** (default) and **Filled**:
32
+ ## Quick Start
86
33
 
87
34
  ```js
88
- import { Home } from 'reicon';
35
+ import { Home, Search3, HandHeart } from 'reicon';
89
36
 
90
- Home() // Outline (default)
91
- Home({ weight: 'Filled' }) // Filled
37
+ // Appends SVG elements directly
38
+ document.body.appendChild(Home({ size: 24, color: '#9B8AFB' }));
39
+ document.body.appendChild(Search3({ size: 20, weight: 'Filled' }));
40
+ document.body.appendChild(HandHeart({ size: 24 }));
92
41
  ```
93
42
 
94
- ### Sizing & coloring
95
-
96
- ```js
97
- Home({ size: 32 }) // 32×32px
98
- Home({ size: 48, color: 'red' }) // Custom size and color
99
- Home({ color: 'currentColor' }) // Inherits parent text color
100
- ```
101
-
102
- ### CDN / Script tag
43
+ ### CDN / HTML Script Tag
103
44
 
104
45
  ```html
105
- <script src="https://unpkg.com/reicon@latest"></script>
106
- <script>
107
- document.body.appendChild(reicon.Home());
108
- document.body.appendChild(reicon.ShieldCheck({ size: 32, color: '#d97757' }));
109
- </script>
110
- ```
46
+ <script src="https://unpkg.com/reicon/cdn/reicon.js"></script>
111
47
 
112
- ### Direct icon import (smallest bundle)
113
-
114
- ```js
115
- import Home from 'reicon/icons/Home';
116
- import ShieldCheck from 'reicon/icons/ShieldCheck';
48
+ <re-icon icon="home" size="24"></re-icon>
117
49
  ```
118
50
 
119
- ---
120
-
121
- ## Options
51
+ ## Options & Props
122
52
 
123
53
  | Option | Type | Default | Description |
124
- |--------|------|---------|-------------|
125
- | `size` | `number | string` | `24` | Icon width & height (number = px) |
126
- | `color` | `string` | — | Primary icon stroke/fill color. Leave unset to use CSS. |
127
- | `weight` | `'Outline' | 'Filled'` | `'Outline'` | Icon style variant |
128
- | `strokeWidth` | `number | string` | — | Override the default stroke width |
129
- | `className` | `string` | — | Additional CSS class on the `<svg>` element |
130
- | `attrs` | `object` | — | Any additional SVG attributes |
131
-
132
- ---
54
+ | ------ | ---- | ------- | ----------- |
55
+ | `size` | `number | string` | `24` | Icon width and height in pixels. |
56
+ | `weight` | `'Outline' | 'Filled'` | `'Outline'` | Visual weight style. |
57
+ | `color` | `string` | `'currentColor'` | Icon fill or stroke color. |
58
+ | `className` | `string` | `undefined` | Custom CSS classes on the SVG element. |
133
59
 
134
- ## Tree-shaking
135
-
136
- Every icon is a standalone ES module. Modern bundlers — **Vite**, **Webpack**, **Rollup**, **esbuild** — automatically tree-shake unused icons, keeping only what you import.
137
-
138
- ```js
139
- // ✅ Only Home is included in your production bundle
140
- import { Home } from 'reicon';
141
-
142
- // ✅ Even smaller — direct path import skips the barrel file entirely
143
- import Home from 'reicon/icons/Home';
144
- ```
145
-
146
- The package is marked `"sideEffects": false` for optimal dead-code elimination.
147
-
148
- ---
149
-
150
- ## Icon Names
151
-
152
- Icons use **PascalCase**, derived from their original kebab-case file names:
153
-
154
- | Original name | PascalCase import |
155
- |---------------|-------------------|
156
- | `home` | `Home` |
157
- | `shield-check` | `ShieldCheck` |
158
- | `alt-arrow-down` | `AltArrowDown` |
159
- | `shopping-cart` | `ShoppingCart` |
160
- | `user-circle` | `UserCircle` |
161
-
162
- Browse and search all 2674+ icons at <a href="https://reicon.dev">reicon.dev</a>.
163
-
164
- ---
165
-
166
- ## TypeScript
167
-
168
- Full type declarations ship with the package — no separate `@types/` installation needed.
169
-
170
- ```ts
171
- import { Home, IconOptions, IconWeight } from 'reicon';
172
-
173
- const weight: IconWeight = 'Filled';
174
- const options: IconOptions = { size: 32, color: '#d97757', weight };
175
-
176
- const svg: SVGSVGElement = Home(options);
177
- document.body.appendChild(svg);
178
- ```
179
-
180
- ### Exported types
181
-
182
- | Type | Description |
183
- |------|-------------|
184
- | `IconOptions` | Options for creating an SVG element |
185
- | `IconWeight` | `'Outline' | 'Filled'` |
186
-
187
- ---
188
-
189
- ## Features
190
-
191
- - **2674+ icons** — Handcrafted, pixel-perfect SVGs across a wide range of categories
192
- - **Two weights** — Outline and Filled, with consistent 24×24 grid alignment
193
- - **Tree-shakeable** — Import only what you use; every icon is a standalone ES module
194
- - **Zero dependencies** — No runtime overhead whatsoever
195
- - **TypeScript-ready** — Full type declarations included, no extra packages needed
196
- - **CDN ready** — Drop a `<script>` tag and start using icons immediately
197
- - **`toSvg()` helper** — Get raw SVG markup for any framework or template
198
- - **MIT licensed** — Free for personal and commercial use
199
-
200
- ---
201
-
202
- ## Related packages
203
-
204
- | Package | Description |
205
- |---------|-------------|
206
- | [`reicon`](https://npmjs.com/package/reicon) | **This package.** Core vanilla JS + CDN runtime. No framework required. |
207
- | [`reicon-react`](https://npmjs.com/package/reicon-react) | React components for 2674+ icons. |
208
- | [`reicon-vue`](https://npmjs.com/package/reicon-vue) | Vue 3 components for 2674+ icons. |
209
- | [`reicon-svelte`](https://npmjs.com/package/reicon-svelte) | Svelte components for 2674+ icons. |
210
-
211
- ---
212
-
213
- ## Links
214
-
215
- - 🌐 &nbsp; Website: [reicon.dev](https://reicon.dev)
216
- - 📖 &nbsp; Documentation: [reicon.dev/docs](https://reicon.dev/docs)
217
- - 📦 &nbsp; npm: [npmjs.com/package/reicon](https://npmjs.com/package/reicon)
218
- - 🐙 &nbsp; GitHub: [github.com/dqev/reicon](https://github.com/dqev/reicon)
219
- - 🐛 &nbsp; Issues: [github.com/dqev/reicon/issues](https://github.com/dqev/reicon/issues)
60
+ ## License
220
61
 
221
- ---
62
+ Free for commercial and personal use under the [MIT License](https://github.com/dqev/reicon/blob/main/LICENSE).
222
63
 
223
- ## License
64
+ ## Credits
224
65
 
225
- MIT © [Dev Chauhan](https://devchauhan.in)
66
+ Thank you to all the people who contributed and supported Reicon!
226
67
 
227
- Free to use in personal and commercial projects. Attribution is appreciated but not required.
68
+ <a href="https://github.com/dqev/reicon/stargazers">
69
+ <img src="https://reicon.dev/readme-assets/stargazers.webp" alt="Reicon Stargazers & Contributors" width="800" />
70
+ </a>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reicon",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "type": "module",
5
5
  "description": "Core vanilla JS icon components for 2674+ icons in 2 weights (Outline & Filled). Tree-shakeable, TypeScript-ready.",
6
6
  "main": "./index.js",