msr-icons 0.0.1 → 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/README.md +114 -54
- package/dist/index.d.ts +103 -0
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# msr-icons
|
|
2
|
-
|
|
3
|
-
A lightweight, production-ready React SVG icon library with 100+ pre-built icons. Perfect for modern web applications.
|
|
2
|
+
A lightweight, production-ready React SVG icon library with **380+ pre-built icons**. Perfect for modern web applications.
|
|
4
3
|
|
|
5
4
|
## Features
|
|
6
5
|
|
|
7
|
-
- ✨ **
|
|
6
|
+
- ✨ **380+ SVG Icons** – Files, UI, brands, social, tech stack, utilities, and more
|
|
8
7
|
- 🎨 **Customizable** – Control color, size, and styling via props
|
|
9
8
|
- 📦 **Tree-shakeable** – Import only what you need
|
|
10
9
|
- ⚡ **Optimized** – Built with Vite for fast dev/build
|
|
@@ -28,21 +27,35 @@ pnpm add msr-icons
|
|
|
28
27
|
import { Icon } from 'msr-icons';
|
|
29
28
|
|
|
30
29
|
export default function App() {
|
|
31
|
-
return <Icon name="
|
|
30
|
+
return <Icon name="Facebook" size={32} color="#286bc2" />;
|
|
32
31
|
}
|
|
33
32
|
```
|
|
34
33
|
|
|
34
|
+
### Listing All Icon Names
|
|
35
|
+
|
|
36
|
+
If you want to inspect all available icon component names (for docs, autocomplete hints, or dynamic selection), you can list the exported keys:
|
|
37
|
+
|
|
38
|
+
```jsx
|
|
39
|
+
import * as Icons from 'msr-icons';
|
|
40
|
+
|
|
41
|
+
const iconNames = Object
|
|
42
|
+
.keys(Icons)
|
|
43
|
+
.filter((key) => key !== 'Icon'); // omit the wrapper if you only need raw icons
|
|
44
|
+
|
|
45
|
+
console.log(iconNames);
|
|
46
|
+
```
|
|
47
|
+
|
|
35
48
|
### Importing Individual Icons
|
|
36
49
|
|
|
37
50
|
```jsx
|
|
38
|
-
import {
|
|
51
|
+
import { Facebook, Github, Twitter } from 'msr-icons';
|
|
39
52
|
|
|
40
53
|
export default function App() {
|
|
41
54
|
return (
|
|
42
55
|
<div>
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
<
|
|
56
|
+
<Facebook fillColor="#286bc2" onClick={() => alert('Facebook')} />
|
|
57
|
+
<Github fillColor="#000" />
|
|
58
|
+
<Twitter fillColor="#1DA1F2" isColored />
|
|
46
59
|
</div>
|
|
47
60
|
);
|
|
48
61
|
}
|
|
@@ -50,77 +63,124 @@ export default function App() {
|
|
|
50
63
|
|
|
51
64
|
## Icon Props
|
|
52
65
|
|
|
53
|
-
###
|
|
66
|
+
### Standard Props (Available on all icons)
|
|
54
67
|
|
|
55
|
-
- **`
|
|
68
|
+
- **`fillColor`** (string) – SVG fill/stroke color. Default varies by icon.
|
|
56
69
|
- **`isColored`** (boolean) – Use brand color or custom color. Default: `true`
|
|
57
70
|
- **`onClick`** (function) – Click handler
|
|
58
|
-
- **`
|
|
59
|
-
- **`
|
|
60
|
-
- **`style`** (object) – Inline styles
|
|
71
|
+
- **`onHover`** (function) – Mouse enter event handler
|
|
72
|
+
- **`backgroundColor`** (string) – Background color for the SVG container
|
|
73
|
+
- **`style`** (object) – Inline styles object (spread with standard props)
|
|
74
|
+
- **`className`** (string) – CSS class names for styling
|
|
61
75
|
|
|
62
76
|
### Icon-Specific Props
|
|
63
77
|
|
|
64
|
-
- **`
|
|
65
|
-
- **`
|
|
66
|
-
- **`
|
|
67
|
-
- **`
|
|
78
|
+
- **`WIFI`** – `isDot` (boolean), `is4Lines` (boolean), `strokeWidth` (string)
|
|
79
|
+
- **`Snapchat`** – `backgroundColor` (string)
|
|
80
|
+
- **`Login/Logout`** – `lineWidth` (string)
|
|
81
|
+
- **`Reload`** – `lineWidth` (string)
|
|
82
|
+
- **`EditBox`** – `strokeWidth` (string)
|
|
68
83
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
**Social Media:** Facebook, Twitter, Instagram, LinkedIn, GitHub, TikTok, Snapchat, WhatsApp, Telegram, Discord, Reddit, Pinterest, Viber, Vine
|
|
72
|
-
|
|
73
|
-
**Tech Stack:** JavaScript, React, NodeJS, Python, Java, PHP, Docker, AWS, Azure, Google Cloud
|
|
74
|
-
|
|
75
|
-
**UI Components:** Settings, Search, Menu, Trash, Edit, Download, Upload, Refresh, Reload, Send, Bell, Search, and more
|
|
84
|
+
### Usage Examples
|
|
76
85
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
```jsx
|
|
87
|
+
// Basic usage with custom color
|
|
88
|
+
<Facebook fillColor="#286bc2" />
|
|
89
|
+
|
|
90
|
+
// With event handlers
|
|
91
|
+
<Twitter
|
|
92
|
+
fillColor="#1DA1F2"
|
|
93
|
+
onClick={() => console.log('clicked')}
|
|
94
|
+
onHover={() => console.log('hovered')}
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
// With styling
|
|
98
|
+
<Github
|
|
99
|
+
fillColor="#000"
|
|
100
|
+
backgroundColor="#f0f0f0"
|
|
101
|
+
style={{ padding: '10px', borderRadius: '4px' }}
|
|
102
|
+
className="my-icon"
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
// With custom colors and brand colors
|
|
106
|
+
<Instagram isColored fillColor="#E1306C" /> // Custom color
|
|
107
|
+
<Instagram isColored /> // Brand color (default #cc39a4)
|
|
108
|
+
<Instagram /> // Default currentColor
|
|
109
|
+
```
|
|
82
110
|
|
|
83
|
-
|
|
111
|
+
## Available Icons
|
|
84
112
|
|
|
85
|
-
|
|
86
|
-
npm run build
|
|
87
|
-
```
|
|
113
|
+
**Files & Formats:** File, Folder variants, CSV, JSON, XML, Markdown, Excel, PowerPoint, Config, DB, RAR, SVG, WEBP, YAML, TOML
|
|
88
114
|
|
|
89
|
-
|
|
115
|
+
**UI Components:** Settings, Search, Menu, Trash, Edit, Download/Upload, Refresh/Reload, Send, Bell, Alerts, Charts, Toggles, Inputs, Layouts, Themes, Accessibility
|
|
90
116
|
|
|
91
|
-
|
|
92
|
-
npm run dev
|
|
93
|
-
```
|
|
117
|
+
**Brands & Platforms:** OpenAI, Perplexity, Claude, Gemini, Hugging Face, MongoDB, PostgreSQL, Elasticsearch, RabbitMQ, Redis, Solana, Ethereum, Bitcoin, MetaMask, Twilio, Sendgrid, Mailchimp, Intercom, StatusPage, PagerDuty, Facebook, Twitter, Instagram, GitHub, LinkedIn, Discord, Slack, Figma, Google, AWS, Azure, Docker, and more
|
|
94
118
|
|
|
95
|
-
|
|
119
|
+
**Utilities:** Mail, Phone, Map, Location, Printer, Shield, Globe, Internet, Disk, Lock/Unlock, Key, Clipboard, QR/Barcode, Scanner, Flip/Rotate, Zoom
|
|
96
120
|
|
|
97
|
-
|
|
98
|
-
npm lint
|
|
99
|
-
```
|
|
121
|
+
... and **380+ icons in total**.
|
|
100
122
|
|
|
101
123
|
## Project Structure
|
|
102
124
|
|
|
103
125
|
```
|
|
104
126
|
src/
|
|
105
|
-
├──
|
|
106
|
-
├──
|
|
107
|
-
├──
|
|
108
|
-
|
|
109
|
-
|
|
127
|
+
├── icons/
|
|
128
|
+
│ ├── files.jsx # File & format icons
|
|
129
|
+
│ ├── ui.jsx # UI & controls
|
|
130
|
+
│ └── brands.jsx # Brand & platform icons
|
|
131
|
+
├── Icon.jsx # Icon wrapper component
|
|
132
|
+
├── Icon.css # Icon styling
|
|
133
|
+
├── index.js # Library entry
|
|
134
|
+
└── main.jsx # Dev entry
|
|
110
135
|
```
|
|
111
136
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
137
|
+
### Self-Explaining Props
|
|
138
|
+
All props use clear, descriptive names:
|
|
139
|
+
- `fillColor` instead of `color` - explicitly indicates it controls the fill color
|
|
140
|
+
- `backgroundColor` - for container background
|
|
141
|
+
- `onHover` - for mouse hover events
|
|
142
|
+
- `strokeWidth` - for SVG stroke thickness
|
|
115
143
|
|
|
116
|
-
|
|
117
|
-
|
|
144
|
+
### Styling Support
|
|
145
|
+
Each icon supports comprehensive styling:
|
|
146
|
+
```jsx
|
|
147
|
+
<Facebook
|
|
148
|
+
fillColor="#286bc2"
|
|
149
|
+
backgroundColor="rgba(255,255,255,0.1)"
|
|
150
|
+
style={{
|
|
151
|
+
padding: '8px',
|
|
152
|
+
borderRadius: '50%',
|
|
153
|
+
cursor: 'pointer'
|
|
154
|
+
}}
|
|
155
|
+
onHover={() => {/* handle hover */}}
|
|
156
|
+
onClick={() => {/* handle click */}}
|
|
157
|
+
/>
|
|
118
158
|
```
|
|
119
159
|
|
|
120
|
-
|
|
160
|
+
### Tree-Shakeable
|
|
161
|
+
Import only the icons you need - unused icons are automatically removed during build:
|
|
121
162
|
|
|
122
|
-
```
|
|
123
|
-
|
|
163
|
+
```jsx
|
|
164
|
+
// Only Facebook and Github are bundled
|
|
165
|
+
import { Facebook, Github } from 'msr-icons';
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### ESM and CommonJS Support
|
|
169
|
+
The library is built with both formats:
|
|
170
|
+
- **ESM** (ES Modules) - `dist/index.js` - for modern bundlers
|
|
171
|
+
- **CJS** (CommonJS) - `dist/index.cjs` - for Node.js environments
|
|
172
|
+
- **TypeScript Definitions** - `dist/index.d.ts` - for type support
|
|
173
|
+
|
|
174
|
+
### Export Map
|
|
175
|
+
Configured in `package.json` for optimal resolution:
|
|
176
|
+
```json
|
|
177
|
+
"exports": {
|
|
178
|
+
".": {
|
|
179
|
+
"types": "./dist/index.d.ts",
|
|
180
|
+
"import": "./dist/index.js",
|
|
181
|
+
"require": "./dist/index.cjs"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
124
184
|
```
|
|
125
185
|
|
|
126
186
|
## License
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IconProps {
|
|
4
|
+
/** Icon fill/stroke color. Default: "#000" */
|
|
5
|
+
fillColor?: string;
|
|
6
|
+
/** Whether to use the color or fallback to currentColor. Default: true */
|
|
7
|
+
isColored?: boolean;
|
|
8
|
+
/** Click handler */
|
|
9
|
+
onClick?: (e: React.MouseEvent<SVGSVGElement>) => void;
|
|
10
|
+
/** Background color for the SVG container */
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
/** Hover handler */
|
|
13
|
+
onHover?: (e: React.MouseEvent<SVGSVGElement>) => void;
|
|
14
|
+
/** Additional inline styles */
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
/** Additional CSS class name */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Stroke width for stroke-based icons */
|
|
19
|
+
strokeWidth?: number | string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Social Media Icons
|
|
23
|
+
export const SvgFacebook: React.FC<IconProps>;
|
|
24
|
+
export const SvgWIFI: React.FC<IconProps>;
|
|
25
|
+
export const SvgDiscord: React.FC<IconProps>;
|
|
26
|
+
export const SvgInstagram: React.FC<IconProps>;
|
|
27
|
+
export const SvgLinkedIn: React.FC<IconProps>;
|
|
28
|
+
export const SvgPinterest: React.FC<IconProps>;
|
|
29
|
+
export const SvgReddit: React.FC<IconProps>;
|
|
30
|
+
export const SvgSnapchat: React.FC<IconProps>;
|
|
31
|
+
export const SvgTwitter: React.FC<IconProps>;
|
|
32
|
+
export const SvgWhatsApp: React.FC<IconProps>;
|
|
33
|
+
|
|
34
|
+
// UI Icons
|
|
35
|
+
export const SvgDoubleCheck: React.FC<IconProps>;
|
|
36
|
+
export const SvgEditBox: React.FC<IconProps>;
|
|
37
|
+
export const SvgEX: React.FC<IconProps>;
|
|
38
|
+
export const SvgEye: React.FC<IconProps>;
|
|
39
|
+
export const SvgLogin: React.FC<IconProps>;
|
|
40
|
+
export const SvgLogout: React.FC<IconProps>;
|
|
41
|
+
export const SvgNotEye: React.FC<IconProps>;
|
|
42
|
+
export const SvgReload: React.FC<IconProps>;
|
|
43
|
+
export const SvgRefresh: React.FC<IconProps>;
|
|
44
|
+
export const SvgSend: React.FC<IconProps>;
|
|
45
|
+
export const SvgTrash: React.FC<IconProps>;
|
|
46
|
+
export const SvgTrashBig: React.FC<IconProps>;
|
|
47
|
+
|
|
48
|
+
// Tech Stack Icons
|
|
49
|
+
export const SvgHTML: React.FC<IconProps>;
|
|
50
|
+
export const SvgCSS: React.FC<IconProps>;
|
|
51
|
+
export const SvgJS: React.FC<IconProps>;
|
|
52
|
+
export const SvgNodeJS: React.FC<IconProps>;
|
|
53
|
+
export const SvgReact: React.FC<IconProps>;
|
|
54
|
+
|
|
55
|
+
// Navigation Icons
|
|
56
|
+
export const SvgChevronDown: React.FC<IconProps>;
|
|
57
|
+
export const SvgChevronLeft: React.FC<IconProps>;
|
|
58
|
+
export const SvgChevronRight: React.FC<IconProps>;
|
|
59
|
+
export const SvgChevronUp: React.FC<IconProps>;
|
|
60
|
+
export const SvgPlaySkipBack: React.FC<IconProps>;
|
|
61
|
+
export const SvgPlay: React.FC<IconProps>;
|
|
62
|
+
export const SvgPause: React.FC<IconProps>;
|
|
63
|
+
export const SvgSkipToStart: React.FC<IconProps>;
|
|
64
|
+
export const SvgSkipToEnd: React.FC<IconProps>;
|
|
65
|
+
|
|
66
|
+
// Additional Icons
|
|
67
|
+
export const SvgGithub: React.FC<IconProps>;
|
|
68
|
+
export const SvgFolder: React.FC<IconProps>;
|
|
69
|
+
export const SvgMenu: React.FC<IconProps>;
|
|
70
|
+
export const SvgSettings: React.FC<IconProps>;
|
|
71
|
+
|
|
72
|
+
// New Tier 2 Icons
|
|
73
|
+
export const SvgAlert: React.FC<IconProps>;
|
|
74
|
+
export const SvgMic: React.FC<IconProps>;
|
|
75
|
+
export const SvgCamera: React.FC<IconProps>;
|
|
76
|
+
export const SvgPaste: React.FC<IconProps>;
|
|
77
|
+
export const SvgCheckCircleFilled: React.FC<IconProps>;
|
|
78
|
+
export const SvgXCircleFilled: React.FC<IconProps>;
|
|
79
|
+
export const SvgBack: React.FC<IconProps>;
|
|
80
|
+
export const SvgForward: React.FC<IconProps>;
|
|
81
|
+
export const SvgSort: React.FC<IconProps>;
|
|
82
|
+
export const SvgMailOpen: React.FC<IconProps>;
|
|
83
|
+
export const SvgFax: React.FC<IconProps>;
|
|
84
|
+
export const SvgDocument: React.FC<IconProps>;
|
|
85
|
+
export const SvgDocumentAdd: React.FC<IconProps>;
|
|
86
|
+
export const SvgDocumentCheck: React.FC<IconProps>;
|
|
87
|
+
export const SvgDocumentDownload: React.FC<IconProps>;
|
|
88
|
+
export const SvgDocumentUpload: React.FC<IconProps>;
|
|
89
|
+
export const SvgArchiveAdd: React.FC<IconProps>;
|
|
90
|
+
export const SvgArchiveRemove: React.FC<IconProps>;
|
|
91
|
+
export const SvgMailRead: React.FC<IconProps>;
|
|
92
|
+
export const SvgMailUnread: React.FC<IconProps>;
|
|
93
|
+
export const SvgHeadphones: React.FC<IconProps>;
|
|
94
|
+
export const SvgSpeaker: React.FC<IconProps>;
|
|
95
|
+
export const SvgEye3: React.FC<IconProps>;
|
|
96
|
+
export const SvgEye4: React.FC<IconProps>;
|
|
97
|
+
export const SvgMenu2: React.FC<IconProps>;
|
|
98
|
+
export const SvgMenu3: React.FC<IconProps>;
|
|
99
|
+
|
|
100
|
+
// Export all icons as a record
|
|
101
|
+
export const icons: Record<string, React.FC<IconProps>>;
|
|
102
|
+
|
|
103
|
+
export default icons;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "msr-icons",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "A lightweight, production-ready React SVG icon library with
|
|
6
|
+
"description": "A lightweight, production-ready React SVG icon library with 300+ pre-built icons.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"icons",
|
|
9
9
|
"react",
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
"library",
|
|
13
13
|
"ui"
|
|
14
14
|
],
|
|
15
|
-
"author": "",
|
|
15
|
+
"author": "Michael Scharff",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": ""
|
|
19
|
+
"url": "https://github.com/Minka1902/msr-icons.git"
|
|
20
20
|
},
|
|
21
|
-
"homepage": "",
|
|
22
21
|
"bugs": {
|
|
23
|
-
"url": ""
|
|
22
|
+
"url": "https://github.com/Minka1902/msr-icons/issues"
|
|
24
23
|
},
|
|
25
24
|
"scripts": {
|
|
26
25
|
"dev": "vite",
|
|
27
26
|
"build": "vite build",
|
|
28
27
|
"lint": "eslint .",
|
|
29
|
-
"preview": "vite preview"
|
|
28
|
+
"preview": "vite preview",
|
|
29
|
+
"type-check": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"main": "./dist/index.cjs",
|
|
32
32
|
"module": "./dist/index.js",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
58
58
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
59
59
|
"globals": "^16.5.0",
|
|
60
|
+
"typescript": "^5.6.3",
|
|
60
61
|
"vite": "^7.2.4"
|
|
61
62
|
}
|
|
62
|
-
}
|
|
63
|
+
}
|