@icon-craft/react 1.0.0
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/LICENSE +25 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +74 -0
- package/readme.md +794 -0
package/readme.md
ADDED
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
# @icon-craft/react
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**A comprehensive React icon library with 3475+ beautifully crafted SVG icons**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@icon-craft/react)
|
|
10
|
+
[](https://www.npmjs.com/package/@icon-craft/react)
|
|
11
|
+
[](https://bundlephobia.com/package/@icon-craft/react)
|
|
12
|
+
[](https://github.com/PATEL-KRISH-0/icon-craft/blob/main/LICENSE)
|
|
13
|
+
|
|
14
|
+
**3475+ icons** · **Two usage methods** · **Tree-shakeable** · **Zero dependencies** · **Fully customizable**
|
|
15
|
+
|
|
16
|
+
[Installation](#-installation) · [Quick Start](#-quick-start) · [Documentation](#-documentation) · [Examples](#-examples) · [TypeScript](#-typescript-version)
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ✨ Features
|
|
23
|
+
|
|
24
|
+
- 🎨 **3475+ Premium Icons** - Unified collection from Feather Icons and Remix Icon
|
|
25
|
+
- ⚛️ **Pure React Components** - Native JSX components, no canvas or DOM manipulation
|
|
26
|
+
- 🎯 **Dual Usage Patterns** - Dynamic `<Icon name="..."/>` or direct `<IconHome/>`
|
|
27
|
+
- 🎨 **Fully Customizable** - Control size, color, stroke width, className, and more
|
|
28
|
+
- 📦 **Tree-Shakeable** - Only bundle the icons you actually use
|
|
29
|
+
- 🚀 **Zero Dependencies** - Only requires React as peer dependency (23MB source, ~2-5KB per icon when bundled)
|
|
30
|
+
- ♿ **Accessible** - Semantic SVG elements with proper ARIA support
|
|
31
|
+
- 🔧 **Framework Agnostic** - Works with Next.js, Vite, Create React App, Remix, etc.
|
|
32
|
+
- 🌳 **Production Ready** - Battle-tested, optimized, and maintained
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 📦 Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# NPM
|
|
40
|
+
npm install @icon-craft/react
|
|
41
|
+
|
|
42
|
+
# Yarn
|
|
43
|
+
yarn add @icon-craft/react
|
|
44
|
+
|
|
45
|
+
# PNPM
|
|
46
|
+
pnpm add @icon-craft/react
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Peer Dependencies:**
|
|
50
|
+
- React >= 16.8.0
|
|
51
|
+
- React-DOM >= 16.8.0
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🚀 Quick Start
|
|
56
|
+
|
|
57
|
+
### Method 1: Dynamic Icon Component
|
|
58
|
+
|
|
59
|
+
Perfect for rendering icons dynamically based on user input or configuration.
|
|
60
|
+
|
|
61
|
+
```jsx
|
|
62
|
+
import { Icon } from '@icon-craft/react';
|
|
63
|
+
|
|
64
|
+
function App() {
|
|
65
|
+
return (
|
|
66
|
+
<div>
|
|
67
|
+
<Icon name="home" size={24} />
|
|
68
|
+
<Icon name="heart" size={32} color="red" />
|
|
69
|
+
<Icon name="search" size={24} color="#0066cc" />
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Method 2: Direct Icon Components
|
|
76
|
+
|
|
77
|
+
Best for static icons and tree-shaking optimization.
|
|
78
|
+
|
|
79
|
+
```jsx
|
|
80
|
+
import { IconHome, IconHeart, IconSearch } from '@icon-craft/react';
|
|
81
|
+
|
|
82
|
+
function App() {
|
|
83
|
+
return (
|
|
84
|
+
<div>
|
|
85
|
+
<IconHome size={24} />
|
|
86
|
+
<IconHeart size={32} color="red" />
|
|
87
|
+
<IconSearch size={24} color="#0066cc" />
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 📖 Documentation
|
|
96
|
+
|
|
97
|
+
### Icon Component Props
|
|
98
|
+
|
|
99
|
+
All icons accept standard SVG attributes plus these convenience props:
|
|
100
|
+
|
|
101
|
+
| Prop | Type | Default | Description |
|
|
102
|
+
|------|------|---------|-------------|
|
|
103
|
+
| `name` | `string` | - | **Required** for `<Icon/>`. Icon identifier (e.g., "home", "heart") |
|
|
104
|
+
| `size` | `number \| string` | `24` | Width and height in pixels |
|
|
105
|
+
| `color` | `string` | `'currentColor'` | Icon color (any valid CSS color) |
|
|
106
|
+
| `strokeWidth` | `number` | `2` | Stroke width for outline icons |
|
|
107
|
+
| `className` | `string` | `''` | Additional CSS classes |
|
|
108
|
+
| `style` | `CSSProperties` | - | Inline styles object |
|
|
109
|
+
| `onClick` | `function` | - | Click event handler |
|
|
110
|
+
| `...props` | `SVGAttributes` | - | Any other valid SVG attributes |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 💡 Usage Examples
|
|
115
|
+
|
|
116
|
+
### Basic Usage
|
|
117
|
+
|
|
118
|
+
```jsx
|
|
119
|
+
import { Icon } from '@icon-craft/react';
|
|
120
|
+
|
|
121
|
+
// Simple icon
|
|
122
|
+
<Icon name="home" />
|
|
123
|
+
|
|
124
|
+
// Custom size
|
|
125
|
+
<Icon name="heart" size={48} />
|
|
126
|
+
|
|
127
|
+
// Custom color
|
|
128
|
+
<Icon name="star" color="gold" />
|
|
129
|
+
|
|
130
|
+
// With stroke width (for outline icons)
|
|
131
|
+
<Icon name="circle" strokeWidth={3} />
|
|
132
|
+
|
|
133
|
+
// With CSS classes
|
|
134
|
+
<Icon name="search" className="my-custom-class" />
|
|
135
|
+
|
|
136
|
+
// With inline styles
|
|
137
|
+
<Icon name="settings" style={{ marginRight: '10px' }} />
|
|
138
|
+
|
|
139
|
+
// With click handler
|
|
140
|
+
<Icon name="menu" onClick={() => console.log('Clicked!')} />
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Icon Button Component
|
|
144
|
+
|
|
145
|
+
```jsx
|
|
146
|
+
import { Icon } from '@icon-craft/react';
|
|
147
|
+
|
|
148
|
+
function IconButton({ icon, label, onClick }) {
|
|
149
|
+
return (
|
|
150
|
+
<button
|
|
151
|
+
onClick={onClick}
|
|
152
|
+
style={{
|
|
153
|
+
display: 'flex',
|
|
154
|
+
alignItems: 'center',
|
|
155
|
+
gap: '8px',
|
|
156
|
+
padding: '10px 20px',
|
|
157
|
+
border: 'none',
|
|
158
|
+
borderRadius: '8px',
|
|
159
|
+
background: '#007bff',
|
|
160
|
+
color: 'white',
|
|
161
|
+
cursor: 'pointer',
|
|
162
|
+
fontSize: '16px'
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
<Icon name={icon} size={20} />
|
|
166
|
+
{label}
|
|
167
|
+
</button>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Usage
|
|
172
|
+
<IconButton icon="download" label="Download" onClick={handleDownload} />
|
|
173
|
+
<IconButton icon="share" label="Share" onClick={handleShare} />
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### With Tailwind CSS
|
|
177
|
+
|
|
178
|
+
```jsx
|
|
179
|
+
import { Icon } from '@icon-craft/react';
|
|
180
|
+
|
|
181
|
+
function App() {
|
|
182
|
+
return (
|
|
183
|
+
<div className="flex gap-4 p-8">
|
|
184
|
+
<Icon
|
|
185
|
+
name="home"
|
|
186
|
+
className="w-6 h-6 text-blue-500 hover:text-blue-700 transition-colors"
|
|
187
|
+
/>
|
|
188
|
+
<Icon
|
|
189
|
+
name="heart"
|
|
190
|
+
className="w-8 h-8 text-red-500 hover:scale-110 transition-transform"
|
|
191
|
+
/>
|
|
192
|
+
<Icon
|
|
193
|
+
name="settings"
|
|
194
|
+
className="w-5 h-5 text-gray-600 dark:text-gray-300"
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Interactive Favorite Button
|
|
202
|
+
|
|
203
|
+
```jsx
|
|
204
|
+
import { useState } from 'react';
|
|
205
|
+
import { Icon } from '@icon-craft/react';
|
|
206
|
+
|
|
207
|
+
function FavoriteButton({ itemId }) {
|
|
208
|
+
const [isFavorite, setIsFavorite] = useState(false);
|
|
209
|
+
|
|
210
|
+
return (
|
|
211
|
+
<button
|
|
212
|
+
onClick={() => setIsFavorite(!isFavorite)}
|
|
213
|
+
style={{
|
|
214
|
+
background: 'transparent',
|
|
215
|
+
border: 'none',
|
|
216
|
+
cursor: 'pointer',
|
|
217
|
+
padding: '8px',
|
|
218
|
+
borderRadius: '50%',
|
|
219
|
+
transition: 'transform 0.2s'
|
|
220
|
+
}}
|
|
221
|
+
onMouseEnter={(e) => e.currentTarget.style.transform = 'scale(1.1)'}
|
|
222
|
+
onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'}
|
|
223
|
+
>
|
|
224
|
+
<Icon
|
|
225
|
+
name="heart"
|
|
226
|
+
size={32}
|
|
227
|
+
color={isFavorite ? '#ff4444' : '#cccccc'}
|
|
228
|
+
style={{
|
|
229
|
+
fill: isFavorite ? '#ff4444' : 'none',
|
|
230
|
+
transition: 'all 0.3s ease'
|
|
231
|
+
}}
|
|
232
|
+
/>
|
|
233
|
+
</button>
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Navigation Bar
|
|
239
|
+
|
|
240
|
+
```jsx
|
|
241
|
+
import { Icon } from '@icon-craft/react';
|
|
242
|
+
|
|
243
|
+
function Navbar() {
|
|
244
|
+
const navItems = [
|
|
245
|
+
{ icon: 'home', label: 'Home', path: '/' },
|
|
246
|
+
{ icon: 'search', label: 'Search', path: '/search' },
|
|
247
|
+
{ icon: 'bell', label: 'Notifications', path: '/notifications' },
|
|
248
|
+
{ icon: 'user', label: 'Profile', path: '/profile' },
|
|
249
|
+
{ icon: 'settings', label: 'Settings', path: '/settings' },
|
|
250
|
+
];
|
|
251
|
+
|
|
252
|
+
return (
|
|
253
|
+
<nav style={{ display: 'flex', gap: '30px', padding: '20px' }}>
|
|
254
|
+
{navItems.map((item) => (
|
|
255
|
+
<a
|
|
256
|
+
key={item.path}
|
|
257
|
+
href={item.path}
|
|
258
|
+
style={{
|
|
259
|
+
display: 'flex',
|
|
260
|
+
flexDirection: 'column',
|
|
261
|
+
alignItems: 'center',
|
|
262
|
+
gap: '5px',
|
|
263
|
+
textDecoration: 'none',
|
|
264
|
+
color: '#333'
|
|
265
|
+
}}
|
|
266
|
+
>
|
|
267
|
+
<Icon name={item.icon} size={24} />
|
|
268
|
+
<span style={{ fontSize: '12px' }}>{item.label}</span>
|
|
269
|
+
</a>
|
|
270
|
+
))}
|
|
271
|
+
</nav>
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Loading Spinner
|
|
277
|
+
|
|
278
|
+
```jsx
|
|
279
|
+
import { Icon } from '@icon-craft/react';
|
|
280
|
+
|
|
281
|
+
function LoadingSpinner() {
|
|
282
|
+
return (
|
|
283
|
+
<Icon
|
|
284
|
+
name="loader"
|
|
285
|
+
size={48}
|
|
286
|
+
style={{
|
|
287
|
+
animation: 'spin 1s linear infinite'
|
|
288
|
+
}}
|
|
289
|
+
/>
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Add to your CSS:
|
|
294
|
+
// @keyframes spin {
|
|
295
|
+
// from { transform: rotate(0deg); }
|
|
296
|
+
// to { transform: rotate(360deg); }
|
|
297
|
+
// }
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Social Media Links
|
|
301
|
+
|
|
302
|
+
```jsx
|
|
303
|
+
import { Icon } from '@icon-craft/react';
|
|
304
|
+
|
|
305
|
+
function SocialLinks() {
|
|
306
|
+
const socials = [
|
|
307
|
+
{ name: 'github', url: 'https://github.com' },
|
|
308
|
+
{ name: 'twitter', url: 'https://twitter.com' },
|
|
309
|
+
{ name: 'facebook', url: 'https://facebook.com' },
|
|
310
|
+
{ name: 'instagram', url: 'https://instagram.com' },
|
|
311
|
+
{ name: 'linkedin', url: 'https://linkedin.com' },
|
|
312
|
+
];
|
|
313
|
+
|
|
314
|
+
return (
|
|
315
|
+
<div style={{ display: 'flex', gap: '20px' }}>
|
|
316
|
+
{socials.map((social) => (
|
|
317
|
+
<a
|
|
318
|
+
key={social.name}
|
|
319
|
+
href={social.url}
|
|
320
|
+
target="_blank"
|
|
321
|
+
rel="noopener noreferrer"
|
|
322
|
+
style={{ color: '#333', transition: 'color 0.2s' }}
|
|
323
|
+
onMouseEnter={(e) => e.currentTarget.style.color = '#007bff'}
|
|
324
|
+
onMouseLeave={(e) => e.currentTarget.style.color = '#333'}
|
|
325
|
+
>
|
|
326
|
+
<Icon name={social.name} size={28} />
|
|
327
|
+
</a>
|
|
328
|
+
))}
|
|
329
|
+
</div>
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Icon Gallery/Picker
|
|
335
|
+
|
|
336
|
+
```jsx
|
|
337
|
+
import { useState } from 'react';
|
|
338
|
+
import { iconNames, Icon } from '@icon-craft/react';
|
|
339
|
+
|
|
340
|
+
function IconGallery() {
|
|
341
|
+
const [search, setSearch] = useState('');
|
|
342
|
+
const [selected, setSelected] = useState(null);
|
|
343
|
+
|
|
344
|
+
const filteredIcons = iconNames.filter(name =>
|
|
345
|
+
name.toLowerCase().includes(search.toLowerCase())
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
return (
|
|
349
|
+
<div style={{ padding: '20px' }}>
|
|
350
|
+
<input
|
|
351
|
+
type="text"
|
|
352
|
+
placeholder="Search icons..."
|
|
353
|
+
value={search}
|
|
354
|
+
onChange={(e) => setSearch(e.target.value)}
|
|
355
|
+
style={{
|
|
356
|
+
width: '100%',
|
|
357
|
+
maxWidth: '400px',
|
|
358
|
+
padding: '12px',
|
|
359
|
+
fontSize: '16px',
|
|
360
|
+
border: '2px solid #ddd',
|
|
361
|
+
borderRadius: '8px',
|
|
362
|
+
marginBottom: '20px'
|
|
363
|
+
}}
|
|
364
|
+
/>
|
|
365
|
+
|
|
366
|
+
<div
|
|
367
|
+
style={{
|
|
368
|
+
display: 'grid',
|
|
369
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(100px, 1fr))',
|
|
370
|
+
gap: '15px'
|
|
371
|
+
}}
|
|
372
|
+
>
|
|
373
|
+
{filteredIcons.slice(0, 100).map((name) => (
|
|
374
|
+
<div
|
|
375
|
+
key={name}
|
|
376
|
+
onClick={() => setSelected(name)}
|
|
377
|
+
style={{
|
|
378
|
+
display: 'flex',
|
|
379
|
+
flexDirection: 'column',
|
|
380
|
+
alignItems: 'center',
|
|
381
|
+
gap: '8px',
|
|
382
|
+
padding: '15px',
|
|
383
|
+
border: selected === name ? '2px solid #007bff' : '1px solid #ddd',
|
|
384
|
+
borderRadius: '8px',
|
|
385
|
+
cursor: 'pointer',
|
|
386
|
+
transition: 'all 0.2s',
|
|
387
|
+
backgroundColor: selected === name ? '#f0f8ff' : 'white'
|
|
388
|
+
}}
|
|
389
|
+
onMouseEnter={(e) => {
|
|
390
|
+
e.currentTarget.style.borderColor = '#007bff';
|
|
391
|
+
e.currentTarget.style.transform = 'translateY(-2px)';
|
|
392
|
+
}}
|
|
393
|
+
onMouseLeave={(e) => {
|
|
394
|
+
if (selected !== name) {
|
|
395
|
+
e.currentTarget.style.borderColor = '#ddd';
|
|
396
|
+
}
|
|
397
|
+
e.currentTarget.style.transform = 'translateY(0)';
|
|
398
|
+
}}
|
|
399
|
+
>
|
|
400
|
+
<Icon name={name} size={32} />
|
|
401
|
+
<div style={{ fontSize: '10px', textAlign: 'center', wordBreak: 'break-word' }}>
|
|
402
|
+
{name}
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
))}
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
{search && (
|
|
409
|
+
<div style={{ marginTop: '20px', color: '#666' }}>
|
|
410
|
+
Found {filteredIcons.length} icons matching "{search}"
|
|
411
|
+
</div>
|
|
412
|
+
)}
|
|
413
|
+
|
|
414
|
+
{selected && (
|
|
415
|
+
<div style={{
|
|
416
|
+
position: 'fixed',
|
|
417
|
+
bottom: '20px',
|
|
418
|
+
right: '20px',
|
|
419
|
+
padding: '15px 20px',
|
|
420
|
+
background: '#007bff',
|
|
421
|
+
color: 'white',
|
|
422
|
+
borderRadius: '8px',
|
|
423
|
+
boxShadow: '0 4px 12px rgba(0,0,0,0.15)'
|
|
424
|
+
}}>
|
|
425
|
+
Selected: <code style={{ fontWeight: 'bold' }}>{selected}</code>
|
|
426
|
+
</div>
|
|
427
|
+
)}
|
|
428
|
+
</div>
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## 📚 Available Icons
|
|
436
|
+
|
|
437
|
+
### Icon Categories
|
|
438
|
+
|
|
439
|
+
Icon-Craft includes **3475+ icons** across multiple categories:
|
|
440
|
+
|
|
441
|
+
- **UI & Navigation** - home, menu, settings, search, filter, more, etc.
|
|
442
|
+
- **Media Controls** - play, pause, stop, forward, rewind, volume, etc.
|
|
443
|
+
- **Communication** - mail, message, phone, chat, notification, etc.
|
|
444
|
+
- **E-commerce** - shopping-cart, credit-card, tag, dollar, wallet, etc.
|
|
445
|
+
- **Files & Folders** - file, folder, save, upload, download, cloud, etc.
|
|
446
|
+
- **Arrows & Directions** - arrow-up, arrow-down, chevron-right, etc.
|
|
447
|
+
- **Social Media** - facebook, twitter, instagram, github, linkedin, etc.
|
|
448
|
+
- **Weather** - sun, cloud, rain, snow, wind, moon, etc.
|
|
449
|
+
- **Devices** - smartphone, tablet, laptop, monitor, printer, etc.
|
|
450
|
+
- **Business** - briefcase, chart, graph, analytics, presentation, etc.
|
|
451
|
+
- **Health & Medical** - heart, medical, pill, hospital, etc.
|
|
452
|
+
- **Education** - book, graduation, pencil, etc.
|
|
453
|
+
- **And many more!**
|
|
454
|
+
|
|
455
|
+
### Finding Icons
|
|
456
|
+
|
|
457
|
+
```jsx
|
|
458
|
+
import { iconNames, iconMap } from '@icon-craft/react';
|
|
459
|
+
|
|
460
|
+
// Get array of all icon names
|
|
461
|
+
console.log(iconNames);
|
|
462
|
+
// ['home', 'heart', 'search', 'menu', ...]
|
|
463
|
+
|
|
464
|
+
// Get icon name to component name mapping
|
|
465
|
+
console.log(iconMap);
|
|
466
|
+
// { 'home': 'IconHome', 'heart': 'IconHeart', ... }
|
|
467
|
+
|
|
468
|
+
// Search for specific icons
|
|
469
|
+
const searchIcons = iconNames.filter(name => name.includes('arrow'));
|
|
470
|
+
console.log(searchIcons);
|
|
471
|
+
// ['arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', ...]
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Popular Icons
|
|
475
|
+
|
|
476
|
+
```jsx
|
|
477
|
+
// UI & Navigation
|
|
478
|
+
<Icon name="home" />
|
|
479
|
+
<Icon name="menu" />
|
|
480
|
+
<Icon name="search" />
|
|
481
|
+
<Icon name="settings" />
|
|
482
|
+
<Icon name="user" />
|
|
483
|
+
<Icon name="bell" />
|
|
484
|
+
<Icon name="star" />
|
|
485
|
+
|
|
486
|
+
// Actions
|
|
487
|
+
<Icon name="edit" />
|
|
488
|
+
<Icon name="trash" />
|
|
489
|
+
<Icon name="save" />
|
|
490
|
+
<Icon name="download" />
|
|
491
|
+
<Icon name="upload" />
|
|
492
|
+
<Icon name="share" />
|
|
493
|
+
<Icon name="copy" />
|
|
494
|
+
|
|
495
|
+
// Media
|
|
496
|
+
<Icon name="play" />
|
|
497
|
+
<Icon name="pause" />
|
|
498
|
+
<Icon name="stop" />
|
|
499
|
+
<Icon name="volume" />
|
|
500
|
+
<Icon name="camera" />
|
|
501
|
+
<Icon name="image" />
|
|
502
|
+
<Icon name="video" />
|
|
503
|
+
|
|
504
|
+
// Communication
|
|
505
|
+
<Icon name="mail" />
|
|
506
|
+
<Icon name="message" />
|
|
507
|
+
<Icon name="phone" />
|
|
508
|
+
<Icon name="chat" />
|
|
509
|
+
|
|
510
|
+
// Arrows
|
|
511
|
+
<Icon name="arrow-up" />
|
|
512
|
+
<Icon name="arrow-down" />
|
|
513
|
+
<Icon name="arrow-left" />
|
|
514
|
+
<Icon name="arrow-right" />
|
|
515
|
+
<Icon name="chevron-up" />
|
|
516
|
+
<Icon name="chevron-down" />
|
|
517
|
+
|
|
518
|
+
// Social
|
|
519
|
+
<Icon name="github" />
|
|
520
|
+
<Icon name="twitter" />
|
|
521
|
+
<Icon name="facebook" />
|
|
522
|
+
<Icon name="instagram" />
|
|
523
|
+
<Icon name="linkedin" />
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
## 🎯 TypeScript Version
|
|
529
|
+
|
|
530
|
+
Looking for TypeScript support? Check out our TypeScript package:
|
|
531
|
+
|
|
532
|
+
```bash
|
|
533
|
+
npm install @icon-craft/react-ts
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
The TypeScript version includes:
|
|
537
|
+
- Full TypeScript type definitions
|
|
538
|
+
- Type-safe icon names
|
|
539
|
+
- IntelliSense autocomplete
|
|
540
|
+
- All the same icons and features
|
|
541
|
+
|
|
542
|
+
[View @icon-craft/react-ts on NPM →](https://www.npmjs.com/package/@icon-craft/react-ts)
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
## 📦 Bundle Size & Performance
|
|
547
|
+
|
|
548
|
+
### Package Size
|
|
549
|
+
- **Source Package**: ~23MB (includes all 3475 icons)
|
|
550
|
+
- **Per Icon (after tree-shaking)**: ~2-5KB
|
|
551
|
+
- **Runtime Dependencies**: 0 (only React peer dependency)
|
|
552
|
+
|
|
553
|
+
### Optimization Tips
|
|
554
|
+
|
|
555
|
+
#### ✅ Best Practice (Tree-shakeable)
|
|
556
|
+
```jsx
|
|
557
|
+
// Import only what you need
|
|
558
|
+
import { IconHome, IconHeart, IconSearch } from '@icon-craft/react';
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
#### ⚠️ Less Optimal
|
|
562
|
+
```jsx
|
|
563
|
+
// Imports everything
|
|
564
|
+
import * as Icons from '@icon-craft/react';
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
#### 🚀 Code Splitting (Advanced)
|
|
568
|
+
```jsx
|
|
569
|
+
import { lazy, Suspense } from 'react';
|
|
570
|
+
|
|
571
|
+
const Icon = lazy(() =>
|
|
572
|
+
import('@icon-craft/react').then(m => ({ default: m.Icon }))
|
|
573
|
+
);
|
|
574
|
+
|
|
575
|
+
function App() {
|
|
576
|
+
return (
|
|
577
|
+
<Suspense fallback={<div>Loading...</div>}>
|
|
578
|
+
<Icon name="home" />
|
|
579
|
+
</Suspense>
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### Build Tool Support
|
|
585
|
+
|
|
586
|
+
Icon-Craft works seamlessly with:
|
|
587
|
+
- ✅ Webpack 5
|
|
588
|
+
- ✅ Vite
|
|
589
|
+
- ✅ Rollup
|
|
590
|
+
- ✅ Parcel
|
|
591
|
+
- ✅ esbuild
|
|
592
|
+
- ✅ Create React App
|
|
593
|
+
- ✅ Next.js
|
|
594
|
+
- ✅ Remix
|
|
595
|
+
- ✅ Gatsby
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## 🌍 Browser Support
|
|
600
|
+
|
|
601
|
+
- ✅ Chrome (latest)
|
|
602
|
+
- ✅ Firefox (latest)
|
|
603
|
+
- ✅ Safari (latest)
|
|
604
|
+
- ✅ Edge (latest)
|
|
605
|
+
- ✅ Opera (latest)
|
|
606
|
+
- ⚠️ IE 11 (with polyfills)
|
|
607
|
+
|
|
608
|
+
**Requirements:**
|
|
609
|
+
- Modern browsers with SVG support
|
|
610
|
+
- React 16.8+ (Hooks support)
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
## 🤔 FAQ
|
|
615
|
+
|
|
616
|
+
### How is this different from react-icons?
|
|
617
|
+
|
|
618
|
+
| Feature | @icon-craft/react | react-icons |
|
|
619
|
+
|---------|------------------|-------------|
|
|
620
|
+
| **Icons** | 3475+ (Feather + Remix) | 40,000+ (multiple libraries) |
|
|
621
|
+
| **Bundle Size** | Optimized, tree-shakeable | Larger bundle |
|
|
622
|
+
| **Customization** | Full control (size, color, stroke) | Standard props |
|
|
623
|
+
| **Focus** | Curated, unified design | Comprehensive variety |
|
|
624
|
+
|
|
625
|
+
### Can I use this with Next.js?
|
|
626
|
+
|
|
627
|
+
Yes! Icon-Craft works perfectly with Next.js:
|
|
628
|
+
|
|
629
|
+
```jsx
|
|
630
|
+
// app/page.jsx (Next.js 13+)
|
|
631
|
+
import { Icon } from '@icon-craft/react';
|
|
632
|
+
|
|
633
|
+
export default function Home() {
|
|
634
|
+
return <Icon name="home" size={32} />;
|
|
635
|
+
}
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
### How do I make icons clickable?
|
|
639
|
+
|
|
640
|
+
Simply add an `onClick` handler:
|
|
641
|
+
|
|
642
|
+
```jsx
|
|
643
|
+
<Icon
|
|
644
|
+
name="trash"
|
|
645
|
+
onClick={() => handleDelete()}
|
|
646
|
+
style={{ cursor: 'pointer' }}
|
|
647
|
+
/>
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
### Can I animate icons?
|
|
651
|
+
|
|
652
|
+
Yes! Use CSS or inline styles:
|
|
653
|
+
|
|
654
|
+
```jsx
|
|
655
|
+
<Icon
|
|
656
|
+
name="loader"
|
|
657
|
+
style={{
|
|
658
|
+
animation: 'spin 1s linear infinite'
|
|
659
|
+
}}
|
|
660
|
+
/>
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
### How do I change icon color on hover?
|
|
664
|
+
|
|
665
|
+
```jsx
|
|
666
|
+
<Icon
|
|
667
|
+
name="heart"
|
|
668
|
+
className="hover-icon"
|
|
669
|
+
/>
|
|
670
|
+
|
|
671
|
+
// CSS
|
|
672
|
+
// .hover-icon:hover { color: red; }
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
### Does this support SSR (Server-Side Rendering)?
|
|
676
|
+
|
|
677
|
+
Yes! Icon-Craft is fully compatible with SSR frameworks like Next.js and Remix.
|
|
678
|
+
|
|
679
|
+
### Can I use this in a commercial project?
|
|
680
|
+
|
|
681
|
+
Yes! Icon-Craft is MIT licensed. Both Feather Icons (MIT) and Remix Icon (Apache 2.0) allow commercial use.
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
## 🔄 Migration Guide
|
|
686
|
+
|
|
687
|
+
### From react-icons
|
|
688
|
+
|
|
689
|
+
```jsx
|
|
690
|
+
// Before (react-icons)
|
|
691
|
+
import { FaHome, FaHeart } from 'react-icons/fa';
|
|
692
|
+
<FaHome size={24} />
|
|
693
|
+
|
|
694
|
+
// After (icon-craft)
|
|
695
|
+
import { IconHome, IconHeart } from '@icon-craft/react';
|
|
696
|
+
<IconHome size={24} />
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
### From Feather Icons
|
|
700
|
+
|
|
701
|
+
```jsx
|
|
702
|
+
// Before (react-feather)
|
|
703
|
+
import { Home, Heart } from 'react-feather';
|
|
704
|
+
<Home size={24} />
|
|
705
|
+
|
|
706
|
+
// After (icon-craft)
|
|
707
|
+
import { IconHome, IconHeart } from '@icon-craft/react';
|
|
708
|
+
<IconHome size={24} />
|
|
709
|
+
```
|
|
710
|
+
|
|
711
|
+
---
|
|
712
|
+
|
|
713
|
+
## ⚖️ Legal & Attribution
|
|
714
|
+
|
|
715
|
+
### Licensing
|
|
716
|
+
|
|
717
|
+
This library is **MIT licensed**. It does not redistribute original icon packages but transforms and generates icons into a unified React component format.
|
|
718
|
+
|
|
719
|
+
### Icon Sources
|
|
720
|
+
|
|
721
|
+
Icon-Craft combines icons from two excellent open-source projects:
|
|
722
|
+
|
|
723
|
+
#### **Feather Icons** — MIT License
|
|
724
|
+
- Source: https://feathericons.com
|
|
725
|
+
- Repository: https://github.com/feathericons/feather
|
|
726
|
+
- License: MIT (allows modification and redistribution)
|
|
727
|
+
|
|
728
|
+
#### **Remix Icon** — Apache License 2.0
|
|
729
|
+
- Source: https://remixicon.com
|
|
730
|
+
- Repository: https://github.com/Remix-Design/RemixIcon
|
|
731
|
+
- License: Apache 2.0 (allows modification and redistribution)
|
|
732
|
+
|
|
733
|
+
Both licenses **explicitly permit** modification, redistribution, and commercial use.
|
|
734
|
+
|
|
735
|
+
### Third-Party Notices
|
|
736
|
+
|
|
737
|
+
Full license texts are included in the [LICENSE](./LICENSE) file.
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
741
|
+
## 🤝 Contributing
|
|
742
|
+
|
|
743
|
+
Contributions, issues, and feature requests are welcome!
|
|
744
|
+
|
|
745
|
+
### How to Contribute
|
|
746
|
+
|
|
747
|
+
1. Fork the repository
|
|
748
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
749
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
750
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
751
|
+
5. Open a Pull Request
|
|
752
|
+
|
|
753
|
+
### Reporting Issues
|
|
754
|
+
|
|
755
|
+
Found a bug or have a suggestion? [Open an issue](https://github.com/PATEL-KRISH-0/icon-craft/issues)
|
|
756
|
+
|
|
757
|
+
---
|
|
758
|
+
|
|
759
|
+
## 📊 Stats & Links
|
|
760
|
+
|
|
761
|
+
- 📦 [NPM Package](https://www.npmjs.com/package/@icon-craft/react)
|
|
762
|
+
- 🐙 [GitHub Repository](https://github.com/PATEL-KRISH-0/icon-craft)
|
|
763
|
+
- 🐛 [Report Issues](https://github.com/PATEL-KRISH-0/icon-craft/issues)
|
|
764
|
+
- 💬 [Discussions](https://github.com/PATEL-KRISH-0/icon-craft/discussions)
|
|
765
|
+
|
|
766
|
+
---
|
|
767
|
+
|
|
768
|
+
## 🙏 Credits
|
|
769
|
+
|
|
770
|
+
- **Feather Icons** - [feathericons.com](https://feathericons.com/)
|
|
771
|
+
- **Remix Icon** - [remixicon.com](https://remixicon.com/)
|
|
772
|
+
- **Built with ❤️ by [Krish Patel](https://github.com/PATEL-KRISH-0)**
|
|
773
|
+
|
|
774
|
+
---
|
|
775
|
+
|
|
776
|
+
## 📄 License
|
|
777
|
+
|
|
778
|
+
MIT License © 2026 Krish Patel
|
|
779
|
+
|
|
780
|
+
See the [LICENSE](./LICENSE) file for complete details.
|
|
781
|
+
|
|
782
|
+
---
|
|
783
|
+
|
|
784
|
+
<div align="center">
|
|
785
|
+
|
|
786
|
+
**Made with ❤️ by [Krish Patel](https://github.com/PATEL-KRISH-0)**
|
|
787
|
+
|
|
788
|
+
If you find Icon-Craft useful, please consider giving it a ⭐️ on [GitHub](https://github.com/PATEL-KRISH-0/icon-craft)!
|
|
789
|
+
|
|
790
|
+
---
|
|
791
|
+
|
|
792
|
+
**[@icon-craft/react](https://www.npmjs.com/package/@icon-craft/react)** · **[@icon-craft/react-ts](https://www.npmjs.com/package/@icon-craft/react-ts)** · **[GitHub](https://github.com/PATEL-KRISH-0/icon-craft)**
|
|
793
|
+
|
|
794
|
+
</div>
|