pop-emojis 0.0.0 → 0.0.1

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.
Files changed (2) hide show
  1. package/README.md +87 -60
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,73 +1,100 @@
1
- # React + TypeScript + Vite
1
+ # pop-emojis 🎉
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ A tiny, opinionated React component that creates smooth emoji pop animations on click built on top of Framer Motion.
4
4
 
5
- Currently, two official plugins are available:
5
+ Perfect for reactions, likes, feedback buttons, and fun micro-interactions with **zero animation setup**.
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7
+ ---
9
8
 
10
- ## React Compiler
9
+ ## Features
11
10
 
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
11
+ - **One-line usage** Add emoji pops in seconds
12
+ - **Built on Framer Motion** — Smooth, physics-based animations
13
+ - **Sensible defaults** — Works great out of the box
14
+ - 📦 **Zero boilerplate** — No animation code required
15
+ - 🔒 **Fully typed** — Complete TypeScript support
16
+ - ⚛️ **React 17+** — Compatible with modern React
13
17
 
14
- ## Expanding the ESLint configuration
18
+ ---
15
19
 
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
20
+ ## 📦 Installation
17
21
 
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
22
+ ```bash
23
+ npm install pop-emojis framer-motion
24
+ ```
25
+
26
+ > **Note:** `framer-motion` is a peer dependency and must be installed separately.
27
+
28
+ ---
29
+
30
+ ## 🚀 Usage
31
+
32
+ ### Basic Example
33
+
34
+ ```tsx
35
+ import { EmojiPop } from "pop-emojis"
36
+
37
+ export default function App() {
38
+ return (
39
+ <div style={{ display: "flex", justifyContent: "center", marginTop: 100 }}>
40
+ <EmojiPop emoji="🫡" />
41
+ </div>
42
+ )
43
+ }
44
+ ```
45
+
46
+ **What happens?**
25
47
 
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
29
- tseslint.configs.strictTypeChecked,
30
- // Optionally, add this for stylistic rules
31
- tseslint.configs.stylisticTypeChecked,
48
+ 1. You see 🫡
49
+ 2. You click 🫡
50
+ 3. Multiple 🫡 emojis pop out with smooth animations
32
51
 
33
- // Other configs...
34
- ],
35
- languageOptions: {
36
- parserOptions: {
37
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
- tsconfigRootDir: import.meta.dirname,
39
- },
40
- // other options...
41
- },
42
- },
43
- ])
52
+ ### Custom Count
53
+
54
+ ```tsx
55
+ <EmojiPop emoji="❤️" count={10} />
44
56
  ```
45
57
 
46
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
-
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
52
-
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
60
- reactX.configs['recommended-typescript'],
61
- // Enable lint rules for React DOM
62
- reactDom.configs.recommended,
63
- ],
64
- languageOptions: {
65
- parserOptions: {
66
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
- tsconfigRootDir: import.meta.dirname,
68
- },
69
- // other options...
70
- },
71
- },
72
- ])
58
+ ### Different Emojis
59
+
60
+ ```tsx
61
+ <div style={{ display: "flex", gap: "1rem" }}>
62
+ <EmojiPop emoji="🎉" />
63
+ <EmojiPop emoji="👍" />
64
+ <EmojiPop emoji="🔥" />
65
+ <EmojiPop emoji="⭐" />
66
+ </div>
73
67
  ```
68
+
69
+ ---
70
+
71
+ ## ⚙️ Props
72
+
73
+ | Prop | Type | Default | Description |
74
+ |---------|----------|---------|----------------------------------------|
75
+ | `emoji` | `string` | `"🫡"` | Emoji used for both button & animation |
76
+ | `count` | `number` | `6` | Number of emojis per click |
77
+
78
+ ---
79
+
80
+ ## 🤔 Why This Library?
81
+
82
+ Yes, you can use Framer Motion directly.
83
+
84
+ This library exists to:
85
+
86
+ ✅ **Remove repetitive animation code** — Don't write the same pop logic over and over
87
+
88
+ ✅ **Provide a ready-made reaction interaction** — Common UX pattern, pre-built
89
+
90
+ ✅ **Keep animation logic out of your app** — Focus on features, not micro-interactions
91
+
92
+ Think of it as a **pre-built micro-interaction**, not an animation engine.
93
+
94
+ ---
95
+
96
+
97
+
98
+ ## 🤝 Contributing
99
+
100
+ Issues and pull requests are welcome! Feel free to open an issue if you find a bug or have a feature request.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pop-emojis",
3
3
  "private": false,
4
- "version": "0.0.0",
4
+ "version": "0.0.1",
5
5
  "type": "module",
6
6
  "author": "MahindraGamni",
7
7
  "description": "A React component for animated emoji pop effects",