aliveicon 1.0.31 → 1.0.32
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 +193 -5
- package/dist/cjs/index.js +4172 -1062
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4122 -1064
- package/dist/esm/index.js.map +1 -1
- package/dist/types/icons/r/Rabbit.d.ts +15 -0
- package/dist/types/icons/r/Radar.d.ts +15 -0
- package/dist/types/icons/r/Radiation.d.ts +15 -0
- package/dist/types/icons/r/Radical.d.ts +15 -0
- package/dist/types/icons/r/Radio.d.ts +15 -0
- package/dist/types/icons/r/RadioReceiver.d.ts +15 -0
- package/dist/types/icons/r/RadioTower.d.ts +15 -0
- package/dist/types/icons/r/Radius.d.ts +15 -0
- package/dist/types/icons/r/RailSymbol.d.ts +15 -0
- package/dist/types/icons/r/Rainbow.d.ts +15 -0
- package/dist/types/icons/r/Rat.d.ts +15 -0
- package/dist/types/icons/r/Ratio.d.ts +15 -0
- package/dist/types/icons/r/Receipt.d.ts +15 -0
- package/dist/types/icons/r/ReceiptCent.d.ts +15 -0
- package/dist/types/icons/r/ReceiptEuro.d.ts +15 -0
- package/dist/types/icons/r/ReceiptIndianRuppee.d.ts +15 -0
- package/dist/types/icons/r/ReceiptJapaneseYen.d.ts +15 -0
- package/dist/types/icons/r/ReceiptPoundSterling.d.ts +15 -0
- package/dist/types/icons/r/ReceiptRussianRuble.d.ts +15 -0
- package/dist/types/icons/r/ReceiptSwissFranc.d.ts +15 -0
- package/dist/types/icons/r/ReceiptText.d.ts +15 -0
- package/dist/types/icons/r/RectangleCircle.d.ts +15 -0
- package/dist/types/icons/r/RectangleEllipsis.d.ts +15 -0
- package/dist/types/icons/r/RectangleGoggles.d.ts +15 -0
- package/dist/types/icons/r/RectangleHorizontal.d.ts +15 -0
- package/dist/types/icons/r/RectangleVertical.d.ts +15 -0
- package/dist/types/icons/r/Recycle.d.ts +15 -0
- package/dist/types/icons/r/Redo-2.d.ts +15 -0
- package/dist/types/icons/r/Redo-Dot.d.ts +15 -0
- package/dist/types/icons/r/Redo.d.ts +15 -0
- package/dist/types/icons/r/RefreshCcw.d.ts +15 -0
- package/dist/types/icons/r/RefreshCcwDot.d.ts +15 -0
- package/dist/types/icons/r/RefreshCw-Off.d.ts +15 -0
- package/dist/types/icons/r/RefreshCw.d.ts +15 -0
- package/dist/types/icons/r/Refrigerator.d.ts +15 -0
- package/dist/types/icons/r/Regex.d.ts +15 -0
- package/dist/types/icons/r/Remove-Formatting.d.ts +15 -0
- package/dist/types/icons/r/Repeat-2.d.ts +15 -0
- package/dist/types/icons/r/Repeat.d.ts +15 -0
- package/dist/types/icons/r/Replace-All.d.ts +16 -0
- package/dist/types/icons/r/Replace.d.ts +16 -0
- package/dist/types/icons/r/Reply-All.d.ts +15 -0
- package/dist/types/icons/r/Reply.d.ts +15 -0
- package/dist/types/icons/r/Rewind.d.ts +15 -0
- package/dist/types/icons/r/Ribbon.d.ts +15 -0
- package/dist/types/icons/r/Rocket.d.ts +16 -0
- package/dist/types/icons/r/Roller-Coaster.d.ts +14 -0
- package/dist/types/icons/r/Rolling-Chair.d.ts +14 -0
- package/dist/types/icons/r/Rotate-3D.d.ts +14 -0
- package/dist/types/icons/r/Rotate-ccw.d.ts +15 -0
- package/dist/types/index.d.ts +49 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,193 @@
|
|
|
1
|
-
# aliveicon
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# aliveicon
|
|
2
|
+
|
|
3
|
+
> Beautiful, animated line icons — they draw themselves on hover, click, or page load.
|
|
4
|
+
|
|
5
|
+
<p align="left">
|
|
6
|
+
<a href="https://www.npmjs.com/package/aliveicon"><img src="https://img.shields.io/npm/v/aliveicon.svg?color=blue" alt="npm version" /></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/aliveicon"><img src="https://img.shields.io/npm/dm/aliveicon.svg?color=blue" alt="npm downloads" /></a>
|
|
8
|
+
<a href="https://github.com/Hemang-patel-9/aliveicon/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/aliveicon.svg?color=green" alt="license" /></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/icons-515%2B-orange" alt="icon count" />
|
|
10
|
+
<img src="https://img.shields.io/badge/types-included-blue" alt="typescript" />
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
`aliveicon` is a collection of **515+ ready-to-use animated SVG icons** for React. Every icon is a real component that "draws" its stroke with a smooth path animation powered by [Framer Motion](https://www.framer.com/motion/). Drop one into your app and it comes alive on hover, on click, or as soon as it mounts — no extra wiring required.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## ✨ Features
|
|
18
|
+
|
|
19
|
+
- 🎬 **Animated out of the box** — icons draw their outlines using Framer Motion path animations.
|
|
20
|
+
- 🖱️ **Trigger however you like** — animate on hover, on click, on mount, or loop continuously.
|
|
21
|
+
- 🎨 **Inherits your color** — icons use `currentColor`, so they match your text color automatically.
|
|
22
|
+
- 📏 **Resizable** — set any pixel size with a single `size` prop.
|
|
23
|
+
- 🌳 **Tree-shakeable ESM + CJS builds** — import only the icons you use.
|
|
24
|
+
- 🔠 **TypeScript first** — full type definitions and IntelliSense for every prop.
|
|
25
|
+
- ⚛️ **React 18+, Javsacript & Next.js ready** — components are marked `'use client'` and work in the App Router.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 📦 Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install aliveicon
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# or with your package manager of choice
|
|
37
|
+
yarn add aliveicon
|
|
38
|
+
pnpm add aliveicon
|
|
39
|
+
bun add aliveicon
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Peer dependencies
|
|
43
|
+
|
|
44
|
+
`aliveicon` relies on the following packages already being installed in your project:
|
|
45
|
+
|
|
46
|
+
| Package | Version |
|
|
47
|
+
| ------- | ------- |
|
|
48
|
+
| `react` | `>=18.0.0` |
|
|
49
|
+
| `react-dom` | `>=18.0.0` |
|
|
50
|
+
| `framer-motion` | `>=10.0.0` |
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install react react-dom framer-motion
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 🚀 Quick start
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import { Activity, BellRing, Rocket } from 'aliveicon';
|
|
62
|
+
|
|
63
|
+
export default function App() {
|
|
64
|
+
return (
|
|
65
|
+
<div style={{ display: 'flex', gap: 16, color: '#6366f1' }}>
|
|
66
|
+
{/* Animates on hover by default */}
|
|
67
|
+
<Activity size={32} />
|
|
68
|
+
|
|
69
|
+
{/* Keeps looping while hovered */}
|
|
70
|
+
<BellRing size={32} loopOnHover />
|
|
71
|
+
|
|
72
|
+
{/* Plays the animation when clicked */}
|
|
73
|
+
<Rocket size={32} animateOnClick />
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
That's it. By default an icon plays its animation whenever the user hovers over it.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 🎛️ Props
|
|
84
|
+
|
|
85
|
+
Every icon shares the same API. All props are optional, and any extra props (`onClick`, `aria-label`, `id`, …) are forwarded to the wrapping `<div>`.
|
|
86
|
+
|
|
87
|
+
| Prop | Type | Default | Description |
|
|
88
|
+
| ---- | ---- | ------- | ----------- |
|
|
89
|
+
| `size` | `number` | `28` | Width and height of the icon, in pixels. |
|
|
90
|
+
| `hoverable` | `boolean` | `true` | Play the animation when the user hovers over the icon. |
|
|
91
|
+
| `loopOnHover` | `boolean` | `false` | Keep replaying the animation for as long as the icon is hovered. |
|
|
92
|
+
| `animateOnClick` | `boolean` | `false` | Play the animation when the icon is clicked. |
|
|
93
|
+
| `autoAnimateOnLoad` | `boolean` | `false` | Play the animation once, automatically, when the component mounts. |
|
|
94
|
+
| `className` | `string` | — | Extra classes merged onto the wrapper (deduped via `tailwind-merge`). |
|
|
95
|
+
| `style` | `React.CSSProperties` | — | Inline styles applied to the wrapper element. |
|
|
96
|
+
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | — | Any other div attributes — `onClick`, `onMouseEnter`, `aria-*`, etc. |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🎨 Styling & color
|
|
101
|
+
|
|
102
|
+
Icons are drawn with `stroke="currentColor"`, so they take on the **text color** of their container. Change the color the same way you'd change text color:
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
{/* Inline style */}
|
|
106
|
+
<Activity style={{ color: '#e11d48' }} />
|
|
107
|
+
|
|
108
|
+
{/* Inherit from a parent */}
|
|
109
|
+
<div style={{ color: 'tomato' }}>
|
|
110
|
+
<Activity />
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
{/* Tailwind utility classes */}
|
|
114
|
+
<Activity className="text-emerald-500" />
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Sizing
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
<Activity size={16} />
|
|
121
|
+
<Activity size={24} />
|
|
122
|
+
<Activity size={48} />
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🧩 Usage examples
|
|
128
|
+
|
|
129
|
+
**Animate automatically on page load**
|
|
130
|
+
|
|
131
|
+
```tsx
|
|
132
|
+
<Rocket autoAnimateOnLoad />
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Loop the animation while hovering**
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
<Bell loopOnHover />
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Animate on click instead of hover**
|
|
142
|
+
|
|
143
|
+
```tsx
|
|
144
|
+
<Heart hoverable={false} animateOnClick />
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Use inside a button with your own handler**
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
<button onClick={() => console.log('clicked')}>
|
|
151
|
+
<Trash animateOnClick aria-label="Delete" />
|
|
152
|
+
</button>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## 📚 Available icons
|
|
158
|
+
|
|
159
|
+
`aliveicon` currently ships **515+ icons** and is actively growing. Import any icon by its named export (PascalCase):
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
import { CircleCheck, ChartLine, ShieldAlert } from 'aliveicon';
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
| Group | Count | Examples |
|
|
166
|
+
| ----- | ----- | -------- |
|
|
167
|
+
| **A** | 78 | `Activity`, `Airplay`, `AlarmClock`, `Anchor`, `ArrowRight`, `Atom`, `Award` |
|
|
168
|
+
| **B** | 128 | `Battery`, `Bell`, `Bluetooth`, `Book`, `Bot`, `Brain`, `Bug`, `Building` |
|
|
169
|
+
| **C** | 140 | `Calendar`, `Camera`, `Car`, `ChartLine`, `Check`, `ChevronDown`, `Circle`, `Clock` |
|
|
170
|
+
| **N** | 16 | `Navigation`, `Network`, `Newspaper`, `Notebook`, `Nut` |
|
|
171
|
+
| **O** | 10 | `Octagon`, `Omega`, `Option`, `Orbit`, `Origami` |
|
|
172
|
+
| **Q** | 2 | `Quote`, `QRCode` |
|
|
173
|
+
| **R** | 50 | `Rabbit`, `Radar`, `Radio`, `Receipt`, `RefreshCw`, `Rocket`, `RotateCcw` |
|
|
174
|
+
| **U** | 35 | `Umbrella`, `Undo`, `Upload`, `User`, `Users`, `Utensils` |
|
|
175
|
+
| **V** | 20 | `Variable`, `Vault`, `Video`, `Volume`, `Vote` |
|
|
176
|
+
| **W** | 33 | `Wallet`, `Wand`, `Watch`, `Waves`, `Webcam`, `Wifi`, `Wind`, `Wrench` |
|
|
177
|
+
| **X** | 2 | `X`, `XTwitter` |
|
|
178
|
+
| **Y** | 1 | `YouTube` |
|
|
179
|
+
| **Z** | 4 | `Zap`, `ZapOff`, `ZoomIn`, `ZoomOut` |
|
|
180
|
+
|
|
181
|
+
> The full, type-checked list of exports lives in [`src/index.ts`](src/index.ts). Your editor's autocomplete will surface every available icon as you type.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 🎬 How the animation works
|
|
186
|
+
|
|
187
|
+
Each icon is an inline SVG whose stroke paths are rendered as Framer Motion `motion.path` elements. When triggered, the icon animates its `pathLength`, `pathOffset`, and `opacity` to redraw the outline from scratch, then settles back into its resting state. Triggers (`hover`, `click`, `mount`, `loop`) simply decide *when* that animation runs, using Framer Motion's `useAnimation` controls under the hood.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## 📄 License
|
|
192
|
+
|
|
193
|
+
[MIT](LICENSE) © Hemang Baldha
|