reicon 1.2.1 → 1.2.3
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.
- package/README.md +40 -199
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,227 +1,68 @@
|
|
|
1
|
-
<
|
|
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
|
-
| 🔗 Resource | Link |
|
|
34
|
-
|---|---|
|
|
35
|
-
| 🌐 Website & icon browser | [reicon.dev](https://reicon.dev) |
|
|
36
|
-
| 📖 Documentation | [reicon.dev/docs](https://reicon.dev/docs) |
|
|
37
|
-
| ⚛️ React package | [reicon-react](https://npmjs.com/package/reicon-react) |
|
|
38
|
-
| 🎨 Figma plugin | [reicon.dev/docs/figma](https://reicon.dev/docs/figma) |
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Install
|
|
1
|
+
<div align="center">
|
|
43
2
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
# or
|
|
47
|
-
bun add reicon
|
|
48
|
-
# or
|
|
49
|
-
yarn add reicon
|
|
50
|
-
```
|
|
3
|
+
<br/>
|
|
4
|
+
<br/>
|
|
51
5
|
|
|
52
|
-
|
|
6
|
+
<img src="https://reicon.dev/readme-assets/banner.webp" alt="Reicon" width="200" />
|
|
53
7
|
|
|
54
|
-
|
|
55
|
-
<script src="https://unpkg.com/reicon@latest"></script>
|
|
56
|
-
```
|
|
8
|
+
<br/>
|
|
57
9
|
|
|
58
|
-
|
|
10
|
+
### Official Reicon core package — open-source icon library for designers & developers
|
|
59
11
|
|
|
60
|
-
|
|
12
|
+
[](https://www.npmjs.com/package/reicon)
|
|
13
|
+
[](https://reicon.dev/docs/vanilla)
|
|
14
|
+
[](https://github.com/dqev/reicon/blob/main/LICENSE)
|
|
61
15
|
|
|
62
|
-
|
|
16
|
+
</div>
|
|
63
17
|
|
|
64
|
-
|
|
18
|
+
<br/>
|
|
65
19
|
|
|
66
|
-
|
|
67
|
-
import { Home, ShieldCheck, AltArrowDown } from 'reicon';
|
|
20
|
+
## Installation
|
|
68
21
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```js
|
|
77
|
-
import { Home } from 'reicon';
|
|
78
|
-
|
|
79
|
-
const svgString = Home.toSvg({ size: 32, color: 'red' });
|
|
80
|
-
element.innerHTML = svgString;
|
|
22
|
+
```bash
|
|
23
|
+
npm install reicon
|
|
24
|
+
# or
|
|
25
|
+
pnpm add reicon
|
|
26
|
+
# or
|
|
27
|
+
yarn add reicon
|
|
81
28
|
```
|
|
82
29
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Every icon ships in two weights — **Outline** (default) and **Filled**:
|
|
30
|
+
## Quick Start
|
|
86
31
|
|
|
87
32
|
```js
|
|
88
|
-
import { Home } from 'reicon';
|
|
33
|
+
import { Home, Search3, HandHeart } from 'reicon';
|
|
89
34
|
|
|
90
|
-
|
|
91
|
-
Home({
|
|
92
|
-
|
|
93
|
-
|
|
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
|
|
35
|
+
// Appends SVG elements directly
|
|
36
|
+
document.body.appendChild(Home({ size: 24, color: '#9B8AFB' }));
|
|
37
|
+
document.body.appendChild(Search3({ size: 20, weight: 'Filled' }));
|
|
38
|
+
document.body.appendChild(HandHeart({ size: 24 }));
|
|
100
39
|
```
|
|
101
40
|
|
|
102
|
-
### CDN / Script
|
|
41
|
+
### CDN / HTML Script Tag
|
|
103
42
|
|
|
104
43
|
```html
|
|
105
|
-
<script src="https://unpkg.com/reicon
|
|
106
|
-
<script>
|
|
107
|
-
document.body.appendChild(reicon.Home());
|
|
108
|
-
document.body.appendChild(reicon.ShieldCheck({ size: 32, color: '#d97757' }));
|
|
109
|
-
</script>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Direct icon import (smallest bundle)
|
|
44
|
+
<script src="https://unpkg.com/reicon/cdn/reicon.js"></script>
|
|
113
45
|
|
|
114
|
-
|
|
115
|
-
import Home from 'reicon/icons/Home';
|
|
116
|
-
import ShieldCheck from 'reicon/icons/ShieldCheck';
|
|
46
|
+
<re-icon icon="home" size="24"></re-icon>
|
|
117
47
|
```
|
|
118
48
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
## Options
|
|
49
|
+
## Options & Props
|
|
122
50
|
|
|
123
51
|
| Option | Type | Default | Description |
|
|
124
|
-
|
|
125
|
-
| `size` | `number | string` | `24` | Icon width
|
|
126
|
-
| `
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `className` | `string` | — | Additional CSS class on the `<svg>` element |
|
|
130
|
-
| `attrs` | `object` | — | Any additional SVG attributes |
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
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.
|
|
52
|
+
| ------ | ---- | ------- | ----------- |
|
|
53
|
+
| `size` | `number | string` | `24` | Icon width and height in pixels. |
|
|
54
|
+
| `weight` | `'Outline' | 'Filled'` | `'Outline'` | Visual weight style. |
|
|
55
|
+
| `color` | `string` | `'currentColor'` | Icon fill or stroke color. |
|
|
56
|
+
| `className` | `string` | `undefined` | Custom CSS classes on the SVG element. |
|
|
137
57
|
|
|
138
|
-
|
|
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
|
-
- 🌐 Website: [reicon.dev](https://reicon.dev)
|
|
216
|
-
- 📖 Documentation: [reicon.dev/docs](https://reicon.dev/docs)
|
|
217
|
-
- 📦 npm: [npmjs.com/package/reicon](https://npmjs.com/package/reicon)
|
|
218
|
-
- 🐙 GitHub: [github.com/dqev/reicon](https://github.com/dqev/reicon)
|
|
219
|
-
- 🐛 Issues: [github.com/dqev/reicon/issues](https://github.com/dqev/reicon/issues)
|
|
58
|
+
## License
|
|
220
59
|
|
|
221
|
-
|
|
60
|
+
Free for commercial and personal use under the [MIT License](https://github.com/dqev/reicon/blob/main/LICENSE).
|
|
222
61
|
|
|
223
|
-
##
|
|
62
|
+
## Credits
|
|
224
63
|
|
|
225
|
-
|
|
64
|
+
Thank you to all the people who contributed and supported Reicon!
|
|
226
65
|
|
|
227
|
-
|
|
66
|
+
<a href="https://github.com/dqev/reicon/stargazers">
|
|
67
|
+
<img src="https://reicon.dev/readme-assets/stargazers.webp" alt="Reicon Stargazers & Contributors" width="800" />
|
|
68
|
+
</a>
|
package/package.json
CHANGED