@phyoofficial/phyo-icon-library 1.0.4 → 1.0.6
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 +677 -10
- package/dist/index.d.ts +6273 -6273
- package/dist/index.esm.js +6273 -6272
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6273 -6272
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,691 @@
|
|
|
1
|
-
# Icon Library
|
|
1
|
+
# 🎨 Phyo Icon Library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@phyoofficial/phyo-icon-library)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://reactjs.org/)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
**A comprehensive React icon library with 3,136 beautiful, high-quality SVG icons**
|
|
11
|
+
|
|
12
|
+
Perfect for React, Next.js, Vite, and modern web applications
|
|
13
|
+
|
|
14
|
+
[Installation](#-installation) • [Usage](#-usage) • [Icons](#-available-icons) • [Examples](#-examples) • [Documentation](#-documentation)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## ✨ Features
|
|
21
|
+
|
|
22
|
+
- 🎯 **3,136 Icons** - Comprehensive collection across 19 categories
|
|
23
|
+
- 📦 **Tree-shakeable** - Only bundle the icons you actually use
|
|
24
|
+
- 🎨 **Fully Customizable** - Control size, color, stroke, and all SVG properties
|
|
25
|
+
- 💪 **TypeScript Support** - Complete type definitions with IntelliSense
|
|
26
|
+
- ⚡ **Lightweight** - Optimized with React.memo for performance
|
|
27
|
+
- 🔧 **Framework Ready** - Works with React, Next.js 13+ (App Router), Vite, CRA
|
|
28
|
+
- 🌐 **SSR Compatible** - Full server-side rendering support
|
|
29
|
+
- 📱 **Responsive** - Perfect for mobile, tablet, and desktop
|
|
30
|
+
- 🎭 **"use client"** - Next.js App Router ready out of the box
|
|
31
|
+
- 🚀 **Zero Config** - Import and use, no setup required
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 📦 Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @phyoofficial/phyo-icon-library
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
<details>
|
|
42
|
+
<summary>Other package managers</summary>
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Yarn
|
|
46
|
+
yarn add @phyoofficial/phyo-icon-library
|
|
47
|
+
|
|
48
|
+
# PNPM
|
|
49
|
+
pnpm add @phyoofficial/phyo-icon-library
|
|
50
|
+
|
|
51
|
+
# Bun
|
|
52
|
+
bun add @phyoofficial/phyo-icon-library
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
</details>
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🚀 Quick Start
|
|
60
|
+
|
|
61
|
+
### Basic Usage
|
|
62
|
+
|
|
63
|
+
```jsx
|
|
64
|
+
import React from 'react';
|
|
65
|
+
import { ArrowDownBoxFill, HeartFill, StarFill } from '@phyoofficial/phyo-icon-library';
|
|
66
|
+
|
|
67
|
+
function App() {
|
|
68
|
+
return (
|
|
69
|
+
<div>
|
|
70
|
+
<ArrowDownBoxFill width={24} height={24} />
|
|
71
|
+
<HeartFill width={24} height={24} fill="red" />
|
|
72
|
+
<StarFill width={24} height={24} color="blue" />
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default App;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### With TypeScript
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
import React from 'react';
|
|
84
|
+
import { ArrowDownBoxFill, IconProps } from '@phyoofficial/phyo-icon-library';
|
|
85
|
+
|
|
86
|
+
const MyComponent: React.FC = () => {
|
|
87
|
+
const iconProps: IconProps = {
|
|
88
|
+
width: 24,
|
|
89
|
+
height: 24,
|
|
90
|
+
className: 'my-icon',
|
|
91
|
+
fill: 'currentColor'
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
return <ArrowDownBoxFill {...iconProps} />;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default MyComponent;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Next.js 13+ App Router
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
// app/page.tsx (Server Component - works out of the box!)
|
|
104
|
+
import { ArrowDownBoxFill, HeartFill } from '@phyoofficial/phyo-icon-library';
|
|
105
|
+
|
|
106
|
+
export default function Home() {
|
|
107
|
+
return (
|
|
108
|
+
<div className="p-8">
|
|
109
|
+
<h1>Welcome</h1>
|
|
110
|
+
<ArrowDownBoxFill className="w-6 h-6" />
|
|
111
|
+
<HeartFill className="w-6 h-6 text-red-500" />
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
// app/components/ClientButton.tsx (Client Component)
|
|
119
|
+
'use client';
|
|
120
|
+
|
|
121
|
+
import { HeartFill } from '@phyoofficial/phyo-icon-library';
|
|
122
|
+
import { useState } from 'react';
|
|
123
|
+
|
|
124
|
+
export default function LikeButton() {
|
|
125
|
+
const [liked, setLiked] = useState(false);
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<button onClick={() => setLiked(!liked)}>
|
|
129
|
+
<HeartFill
|
|
130
|
+
className="w-6 h-6"
|
|
131
|
+
fill={liked ? 'red' : 'gray'}
|
|
132
|
+
/>
|
|
133
|
+
</button>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 🎨 Customization
|
|
141
|
+
|
|
142
|
+
### Size
|
|
143
|
+
|
|
144
|
+
```jsx
|
|
145
|
+
// Using width and height
|
|
146
|
+
<ArrowDownBoxFill width={16} height={16} />
|
|
147
|
+
<ArrowDownBoxFill width={24} height={24} />
|
|
148
|
+
<ArrowDownBoxFill width={32} height={32} />
|
|
149
|
+
<ArrowDownBoxFill width={48} height={48} />
|
|
150
|
+
|
|
151
|
+
// Using className (with Tailwind)
|
|
152
|
+
<ArrowDownBoxFill className="w-4 h-4" />
|
|
153
|
+
<ArrowDownBoxFill className="w-6 h-6" />
|
|
154
|
+
<ArrowDownBoxFill className="w-8 h-8" />
|
|
155
|
+
<ArrowDownBoxFill className="w-12 h-12" />
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Color
|
|
159
|
+
|
|
160
|
+
```jsx
|
|
161
|
+
// Using fill prop
|
|
162
|
+
<HeartFill fill="red" />
|
|
163
|
+
<HeartFill fill="#3B82F6" />
|
|
164
|
+
<HeartFill fill="rgb(59, 130, 246)" />
|
|
165
|
+
|
|
166
|
+
// Using color prop
|
|
167
|
+
<StarFill color="gold" />
|
|
168
|
+
|
|
169
|
+
// Using currentColor (inherits text color)
|
|
170
|
+
<div className="text-blue-500">
|
|
171
|
+
<HeartFill fill="currentColor" />
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
// Using Tailwind classes
|
|
175
|
+
<HeartFill className="text-red-500" fill="currentColor" />
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Advanced Styling
|
|
179
|
+
|
|
180
|
+
```jsx
|
|
181
|
+
// Inline styles
|
|
182
|
+
<ArrowDownBoxFill
|
|
183
|
+
style={{
|
|
184
|
+
width: 24,
|
|
185
|
+
height: 24,
|
|
186
|
+
color: 'blue',
|
|
187
|
+
cursor: 'pointer',
|
|
188
|
+
transition: 'all 0.3s'
|
|
189
|
+
}}
|
|
190
|
+
/>
|
|
191
|
+
|
|
192
|
+
// CSS classes
|
|
193
|
+
<ArrowDownBoxFill className="icon-button hover:scale-110 transition-transform" />
|
|
194
|
+
|
|
195
|
+
// All SVG props are supported
|
|
196
|
+
<ArrowDownBoxFill
|
|
197
|
+
width={24}
|
|
198
|
+
height={24}
|
|
199
|
+
fill="currentColor"
|
|
200
|
+
stroke="black"
|
|
201
|
+
strokeWidth={2}
|
|
202
|
+
opacity={0.8}
|
|
203
|
+
onClick={() => console.log('Clicked!')}
|
|
204
|
+
onMouseEnter={() => console.log('Hover')}
|
|
205
|
+
/>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 📚 Available Icons
|
|
211
|
+
|
|
212
|
+
The library includes **3,136 icons** organized into **19 categories**:
|
|
213
|
+
|
|
214
|
+
| Category | Icon Count | Examples |
|
|
215
|
+
|----------|----------:|----------|
|
|
216
|
+
| **Arrows** | 178 | ArrowDownBoxFill, ArrowUpCircleLine, ArrowLeftRightFill |
|
|
217
|
+
| **Buildings** | 62 | HomeFill, BuildingLine, HospitalFill |
|
|
218
|
+
| **Business** | 210 | BriefcaseFill, PieChartLine, BarChartFill |
|
|
219
|
+
| **Communication** | 92 | MailFill, PhoneLine, MessageCircleFill |
|
|
220
|
+
| **Design** | 232 | PencilFill, BrushLine, PaletteFill |
|
|
221
|
+
| **Development** | 62 | CodeBoxFill, TerminalLine, BugFill |
|
|
222
|
+
| **Device** | 172 | ComputerFill, PhoneLine, TabletFill |
|
|
223
|
+
| **Document** | 238 | FileFill, FolderLine, FileTextFill |
|
|
224
|
+
| **Editor** | 149 | BoldFill, ItalicLine, UnderlineFill |
|
|
225
|
+
| **Finance** | 172 | CoinFill, WalletLine, BankCardFill |
|
|
226
|
+
| **Food** | 32 | CakeFill, CoffeeLine, RestaurantFill |
|
|
227
|
+
| **Health & Medical** | 83 | HeartPulseFill, MedicineBottleLine, StethoscopeFill |
|
|
228
|
+
| **Logos** | 278 | FacebookFill, TwitterLine, GithubFill |
|
|
229
|
+
| **Map** | 170 | MapPinFill, CompassLine, RoadMapFill |
|
|
230
|
+
| **Media** | 292 | PlayCircleFill, PauseLine, VolumeUpFill |
|
|
231
|
+
| **Others** | 156 | LeafFill, FlowerLine, RocketFill |
|
|
232
|
+
| **System** | 348 | SettingsFill, SearchLine, CheckboxCircleFill |
|
|
233
|
+
| **User & Faces** | 128 | UserFill, UserGroupLine, AccountCircleFill |
|
|
234
|
+
| **Weather** | 82 | SunFill, MoonLine, CloudyFill |
|
|
235
|
+
|
|
236
|
+
### Icon Naming Convention
|
|
237
|
+
|
|
238
|
+
All icons follow a consistent naming pattern:
|
|
239
|
+
|
|
240
|
+
- **PascalCase**: `ArrowDownBoxFill`, `HeartFill`, `UserLine`
|
|
241
|
+
- **Suffix**:
|
|
242
|
+
- `-Fill`: Filled/solid version (e.g., `HeartFill`)
|
|
243
|
+
- `-Line`: Outlined/line version (e.g., `HeartLine`)
|
|
244
|
+
|
|
245
|
+
### Finding Icons
|
|
246
|
+
|
|
247
|
+
**Browse All Icons:**
|
|
248
|
+
Run the icon browser app included in this repository:
|
|
8
249
|
|
|
9
250
|
```bash
|
|
251
|
+
# Clone the repo
|
|
252
|
+
git clone https://github.com/phyoofficial/phyo-icon-library.git
|
|
253
|
+
cd phyo-icon-library
|
|
254
|
+
|
|
255
|
+
# Install dependencies
|
|
10
256
|
npm install
|
|
257
|
+
|
|
258
|
+
# Start the browser
|
|
259
|
+
npm run dev
|
|
11
260
|
```
|
|
12
261
|
|
|
13
|
-
|
|
262
|
+
This will open a searchable icon browser where you can:
|
|
263
|
+
- 🔍 Search icons by name
|
|
264
|
+
- 📁 Browse by category
|
|
265
|
+
- 👁️ Preview icons
|
|
266
|
+
- 📋 Copy icon names
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 💡 Examples
|
|
271
|
+
|
|
272
|
+
### Navigation Menu
|
|
273
|
+
|
|
274
|
+
```jsx
|
|
275
|
+
import {
|
|
276
|
+
HomeFill,
|
|
277
|
+
UserFill,
|
|
278
|
+
SettingsFill,
|
|
279
|
+
MailFill
|
|
280
|
+
} from '@phyoofficial/phyo-icon-library';
|
|
281
|
+
|
|
282
|
+
function Navigation() {
|
|
283
|
+
return (
|
|
284
|
+
<nav className="flex gap-4">
|
|
285
|
+
<a href="/">
|
|
286
|
+
<HomeFill className="w-6 h-6 text-blue-500" />
|
|
287
|
+
Home
|
|
288
|
+
</a>
|
|
289
|
+
<a href="/profile">
|
|
290
|
+
<UserFill className="w-6 h-6 text-blue-500" />
|
|
291
|
+
Profile
|
|
292
|
+
</a>
|
|
293
|
+
<a href="/messages">
|
|
294
|
+
<MailFill className="w-6 h-6 text-blue-500" />
|
|
295
|
+
Messages
|
|
296
|
+
</a>
|
|
297
|
+
<a href="/settings">
|
|
298
|
+
<SettingsFill className="w-6 h-6 text-blue-500" />
|
|
299
|
+
Settings
|
|
300
|
+
</a>
|
|
301
|
+
</nav>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Button with Icon
|
|
307
|
+
|
|
308
|
+
```jsx
|
|
309
|
+
import { SearchLine, AddCircleFill, DeleteBinFill } from '@phyoofficial/phyo-icon-library';
|
|
310
|
+
|
|
311
|
+
function Buttons() {
|
|
312
|
+
return (
|
|
313
|
+
<div className="flex gap-2">
|
|
314
|
+
<button className="flex items-center gap-2 px-4 py-2 bg-blue-500 text-white rounded">
|
|
315
|
+
<SearchLine className="w-5 h-5" />
|
|
316
|
+
Search
|
|
317
|
+
</button>
|
|
318
|
+
|
|
319
|
+
<button className="flex items-center gap-2 px-4 py-2 bg-green-500 text-white rounded">
|
|
320
|
+
<AddCircleFill className="w-5 h-5" />
|
|
321
|
+
Add New
|
|
322
|
+
</button>
|
|
323
|
+
|
|
324
|
+
<button className="flex items-center gap-2 px-4 py-2 bg-red-500 text-white rounded">
|
|
325
|
+
<DeleteBinFill className="w-5 h-5" />
|
|
326
|
+
Delete
|
|
327
|
+
</button>
|
|
328
|
+
</div>
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Interactive Icon
|
|
334
|
+
|
|
335
|
+
```jsx
|
|
336
|
+
import { HeartFill, HeartLine } from '@phyoofficial/phyo-icon-library';
|
|
337
|
+
import { useState } from 'react';
|
|
338
|
+
|
|
339
|
+
function LikeButton() {
|
|
340
|
+
const [liked, setLiked] = useState(false);
|
|
341
|
+
|
|
342
|
+
return (
|
|
343
|
+
<button
|
|
344
|
+
onClick={() => setLiked(!liked)}
|
|
345
|
+
className="p-2 hover:bg-gray-100 rounded-full transition"
|
|
346
|
+
>
|
|
347
|
+
{liked ? (
|
|
348
|
+
<HeartFill className="w-6 h-6 text-red-500" />
|
|
349
|
+
) : (
|
|
350
|
+
<HeartLine className="w-6 h-6 text-gray-400" />
|
|
351
|
+
)}
|
|
352
|
+
</button>
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Loading State
|
|
358
|
+
|
|
359
|
+
```jsx
|
|
360
|
+
import { LoaderFill } from '@phyoofficial/phyo-icon-library';
|
|
361
|
+
|
|
362
|
+
function Loading() {
|
|
363
|
+
return (
|
|
364
|
+
<div className="flex items-center gap-2">
|
|
365
|
+
<LoaderFill
|
|
366
|
+
className="w-5 h-5 animate-spin text-blue-500"
|
|
367
|
+
/>
|
|
368
|
+
<span>Loading...</span>
|
|
369
|
+
</div>
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Icon Grid
|
|
375
|
+
|
|
376
|
+
```jsx
|
|
377
|
+
import {
|
|
378
|
+
FacebookFill,
|
|
379
|
+
TwitterFill,
|
|
380
|
+
InstagramFill,
|
|
381
|
+
LinkedinFill,
|
|
382
|
+
GithubFill,
|
|
383
|
+
YoutubeFill
|
|
384
|
+
} from '@phyoofficial/phyo-icon-library';
|
|
385
|
+
|
|
386
|
+
function SocialLinks() {
|
|
387
|
+
return (
|
|
388
|
+
<div className="flex gap-4">
|
|
389
|
+
<a href="#" className="hover:scale-110 transition">
|
|
390
|
+
<FacebookFill className="w-8 h-8 text-blue-600" />
|
|
391
|
+
</a>
|
|
392
|
+
<a href="#" className="hover:scale-110 transition">
|
|
393
|
+
<TwitterFill className="w-8 h-8 text-sky-500" />
|
|
394
|
+
</a>
|
|
395
|
+
<a href="#" className="hover:scale-110 transition">
|
|
396
|
+
<InstagramFill className="w-8 h-8 text-pink-500" />
|
|
397
|
+
</a>
|
|
398
|
+
<a href="#" className="hover:scale-110 transition">
|
|
399
|
+
<LinkedinFill className="w-8 h-8 text-blue-700" />
|
|
400
|
+
</a>
|
|
401
|
+
<a href="#" className="hover:scale-110 transition">
|
|
402
|
+
<GithubFill className="w-8 h-8 text-gray-800" />
|
|
403
|
+
</a>
|
|
404
|
+
<a href="#" className="hover:scale-110 transition">
|
|
405
|
+
<YoutubeFill className="w-8 h-8 text-red-600" />
|
|
406
|
+
</a>
|
|
407
|
+
</div>
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## 🛠️ Development Setup
|
|
415
|
+
|
|
416
|
+
### Running the Icon Browser Locally
|
|
417
|
+
|
|
418
|
+
This repository includes a Vite + React app for browsing all icons:
|
|
14
419
|
|
|
15
420
|
```bash
|
|
421
|
+
# Clone the repository
|
|
422
|
+
git clone https://github.com/phyoofficial/phyo-icon-library.git
|
|
423
|
+
cd phyo-icon-library
|
|
424
|
+
|
|
425
|
+
# Install dependencies
|
|
426
|
+
npm install
|
|
427
|
+
|
|
428
|
+
# Start the development server
|
|
429
|
+
npm run dev
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Open `http://localhost:5173` to browse all 3,136 icons with search functionality.
|
|
433
|
+
|
|
434
|
+
### Project Structure
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
phyo-icon-library/
|
|
438
|
+
├── icons/ # Source SVG files
|
|
439
|
+
│ └── icons/ # Organized by category
|
|
440
|
+
│ ├── Arrows/
|
|
441
|
+
│ ├── Buildings/
|
|
442
|
+
│ ├── Business/
|
|
443
|
+
│ └── ...
|
|
444
|
+
├── lib/ # Generated React components (JSX)
|
|
445
|
+
│ ├── index.js # Main export file
|
|
446
|
+
│ ├── index.d.ts # TypeScript definitions
|
|
447
|
+
│ └── [Category]/ # Component files by category
|
|
448
|
+
├── dist/ # Bundled output (published to npm)
|
|
449
|
+
│ ├── index.js # CommonJS bundle
|
|
450
|
+
│ ├── index.esm.js # ES Module bundle
|
|
451
|
+
│ └── index.d.ts # TypeScript definitions
|
|
452
|
+
├── src/ # Icon browser app
|
|
453
|
+
│ ├── App.jsx # Main app component
|
|
454
|
+
│ ├── IconGrid.jsx # Icon display grid
|
|
455
|
+
│ └── main.jsx # Entry point
|
|
456
|
+
├── scripts/ # Build scripts
|
|
457
|
+
│ ├── generate-components.js # Generates React components from SVGs
|
|
458
|
+
│ └── copy-icons.js # Copies icons for browser app
|
|
459
|
+
├── package.json
|
|
460
|
+
├── rollup.config.js # Bundler configuration
|
|
461
|
+
├── vite.config.js # Vite configuration
|
|
462
|
+
└── README.md # This file
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### Build Scripts
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
# Generate React components from SVG files
|
|
469
|
+
npm run generate
|
|
470
|
+
|
|
471
|
+
# Bundle library with Rollup
|
|
472
|
+
npm run bundle
|
|
473
|
+
|
|
474
|
+
# Build complete library for publishing
|
|
475
|
+
npm run build:lib
|
|
476
|
+
|
|
477
|
+
# Run icon browser app
|
|
16
478
|
npm run dev
|
|
479
|
+
|
|
480
|
+
# Build icon browser app
|
|
481
|
+
npm run build
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## 🔧 Framework Support
|
|
487
|
+
|
|
488
|
+
### ✅ React (Vite, CRA)
|
|
489
|
+
|
|
490
|
+
```jsx
|
|
491
|
+
import { HeartFill } from '@phyoofficial/phyo-icon-library';
|
|
492
|
+
|
|
493
|
+
function App() {
|
|
494
|
+
return <HeartFill className="w-6 h-6" />;
|
|
495
|
+
}
|
|
17
496
|
```
|
|
18
497
|
|
|
19
|
-
|
|
498
|
+
### ✅ Next.js 13+ App Router (Server Components)
|
|
499
|
+
|
|
500
|
+
```tsx
|
|
501
|
+
// app/page.tsx - Works in Server Components!
|
|
502
|
+
import { ArrowDownBoxFill } from '@phyoofficial/phyo-icon-library';
|
|
503
|
+
|
|
504
|
+
export default function Page() {
|
|
505
|
+
return <ArrowDownBoxFill className="w-6 h-6" />;
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### ✅ Next.js 13+ App Router (Client Components)
|
|
510
|
+
|
|
511
|
+
```tsx
|
|
512
|
+
'use client';
|
|
513
|
+
|
|
514
|
+
import { HeartFill } from '@phyoofficial/phyo-icon-library';
|
|
515
|
+
|
|
516
|
+
export default function ClientComponent() {
|
|
517
|
+
return <HeartFill className="w-6 h-6" />;
|
|
518
|
+
}
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### ✅ Next.js 12 Pages Router
|
|
522
|
+
|
|
523
|
+
```tsx
|
|
524
|
+
// pages/index.tsx
|
|
525
|
+
import { StarFill } from '@phyoofficial/phyo-icon-library';
|
|
526
|
+
|
|
527
|
+
export default function Home() {
|
|
528
|
+
return <StarFill className="w-6 h-6" />;
|
|
529
|
+
}
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### ✅ Remix
|
|
533
|
+
|
|
534
|
+
```tsx
|
|
535
|
+
import { MusicFill } from '@phyoofficial/phyo-icon-library';
|
|
536
|
+
|
|
537
|
+
export default function Index() {
|
|
538
|
+
return <MusicFill className="w-6 h-6" />;
|
|
539
|
+
}
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
### ✅ TypeScript
|
|
543
|
+
|
|
544
|
+
Full TypeScript support with IntelliSense:
|
|
545
|
+
|
|
546
|
+
```tsx
|
|
547
|
+
import { HeartFill, IconProps } from '@phyoofficial/phyo-icon-library';
|
|
548
|
+
|
|
549
|
+
const MyIcon: React.FC<IconProps> = (props) => {
|
|
550
|
+
return <HeartFill {...props} />;
|
|
551
|
+
};
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## 📖 API Reference
|
|
557
|
+
|
|
558
|
+
### IconProps
|
|
559
|
+
|
|
560
|
+
All icon components accept standard SVG props:
|
|
561
|
+
|
|
562
|
+
```typescript
|
|
563
|
+
import { SVGProps } from 'react';
|
|
564
|
+
|
|
565
|
+
type IconProps = SVGProps<SVGSVGElement>;
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
Common props:
|
|
569
|
+
|
|
570
|
+
| Prop | Type | Description |
|
|
571
|
+
|------|------|-------------|
|
|
572
|
+
| `width` | `number \| string` | Icon width |
|
|
573
|
+
| `height` | `number \| string` | Icon height |
|
|
574
|
+
| `fill` | `string` | Fill color |
|
|
575
|
+
| `stroke` | `string` | Stroke color |
|
|
576
|
+
| `strokeWidth` | `number \| string` | Stroke width |
|
|
577
|
+
| `className` | `string` | CSS class names |
|
|
578
|
+
| `style` | `CSSProperties` | Inline styles |
|
|
579
|
+
| `onClick` | `MouseEventHandler` | Click handler |
|
|
580
|
+
| `onMouseEnter` | `MouseEventHandler` | Mouse enter handler |
|
|
581
|
+
| `onMouseLeave` | `MouseEventHandler` | Mouse leave handler |
|
|
582
|
+
| ... | | All other SVG attributes |
|
|
583
|
+
|
|
584
|
+
---
|
|
585
|
+
|
|
586
|
+
## ❓ FAQ
|
|
587
|
+
|
|
588
|
+
<details>
|
|
589
|
+
<summary><strong>Q: How do I find the icon I need?</strong></summary>
|
|
590
|
+
|
|
591
|
+
**A:** Run the icon browser:
|
|
592
|
+
```bash
|
|
593
|
+
npm run dev
|
|
594
|
+
```
|
|
595
|
+
This opens a searchable interface with all 3,136 icons.
|
|
596
|
+
</details>
|
|
597
|
+
|
|
598
|
+
<details>
|
|
599
|
+
<summary><strong>Q: Does this work with Next.js 13+ App Router?</strong></summary>
|
|
600
|
+
|
|
601
|
+
**A:** Yes! The library includes `"use client"` directive and works in both Server and Client Components.
|
|
602
|
+
</details>
|
|
603
|
+
|
|
604
|
+
<details>
|
|
605
|
+
<summary><strong>Q: Will this increase my bundle size?</strong></summary>
|
|
606
|
+
|
|
607
|
+
**A:** No! The library is tree-shakeable. Only the icons you import will be included in your bundle. Each icon is ~1-2KB.
|
|
608
|
+
</details>
|
|
609
|
+
|
|
610
|
+
<details>
|
|
611
|
+
<summary><strong>Q: Can I use this with TypeScript?</strong></summary>
|
|
612
|
+
|
|
613
|
+
**A:** Absolutely! Full TypeScript definitions are included with IntelliSense support.
|
|
614
|
+
</details>
|
|
615
|
+
|
|
616
|
+
<details>
|
|
617
|
+
<summary><strong>Q: How do I change icon color?</strong></summary>
|
|
618
|
+
|
|
619
|
+
**A:** Use the `fill` prop or `className` with `fill="currentColor"`:
|
|
620
|
+
```jsx
|
|
621
|
+
<HeartFill fill="red" />
|
|
622
|
+
<HeartFill className="text-red-500" fill="currentColor" />
|
|
623
|
+
```
|
|
624
|
+
</details>
|
|
625
|
+
|
|
626
|
+
<details>
|
|
627
|
+
<summary><strong>Q: Can I animate the icons?</strong></summary>
|
|
628
|
+
|
|
629
|
+
**A:** Yes! Use CSS animations or libraries like Framer Motion:
|
|
630
|
+
```jsx
|
|
631
|
+
<LoaderFill className="animate-spin" />
|
|
632
|
+
```
|
|
633
|
+
</details>
|
|
634
|
+
|
|
635
|
+
<details>
|
|
636
|
+
<summary><strong>Q: Is Server-Side Rendering (SSR) supported?</strong></summary>
|
|
637
|
+
|
|
638
|
+
**A:** Yes! The library works perfectly with SSR in Next.js, Remix, and other frameworks.
|
|
639
|
+
</details>
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
## 🤝 Contributing
|
|
644
|
+
|
|
645
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
646
|
+
|
|
647
|
+
1. Fork the repository
|
|
648
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
649
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
650
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
651
|
+
5. Open a Pull Request
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
## 📄 License
|
|
656
|
+
|
|
657
|
+
MIT License - see the [LICENSE](LICENSE) file for details.
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
661
|
+
## 🙏 Credits
|
|
662
|
+
|
|
663
|
+
This library is built on top of the amazing [Remix Icon](https://remixicon.com/) project.
|
|
664
|
+
|
|
665
|
+
---
|
|
666
|
+
|
|
667
|
+
## 📞 Support
|
|
668
|
+
|
|
669
|
+
- 📧 Email: abhishek@thepyromedia.com
|
|
670
|
+
- 🐛 Issues: [GitHub Issues](https://github.com/phyoofficial/phyo-icon-library/issues)
|
|
671
|
+
- 💬 Discussions: [GitHub Discussions](https://github.com/phyoofficial/phyo-icon-library/discussions)
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
675
|
+
## 🌟 Show Your Support
|
|
676
|
+
|
|
677
|
+
If you find this library helpful, please consider:
|
|
678
|
+
- ⭐ Starring the repository
|
|
679
|
+
- 🐦 Sharing on Twitter
|
|
680
|
+
- 📝 Writing a blog post
|
|
681
|
+
- 💖 Sponsoring the project
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
<div align="center">
|
|
686
|
+
|
|
687
|
+
**Made with ❤️ by [Phyo Official](https://github.com/phyoofficial)**
|
|
688
|
+
|
|
689
|
+
[⬆ Back to Top](#-phyo-icon-library)
|
|
20
690
|
|
|
21
|
-
|
|
22
|
-
- `public/icons/` — will be populated by `npm run prepare-icons`
|
|
23
|
-
- `icons_summary.json` — generated summary with per-category icon lists
|
|
24
|
-
- `src/` — Vite + React app
|
|
691
|
+
</div>
|