@coolbuttons/react 1.0.0 → 1.0.2
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 +239 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,73 +1,272 @@
|
|
|
1
1
|
# @coolbuttons/react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> A comprehensive collection of 200+ beautifully crafted React button components with TypeScript support.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@coolbuttons/react)
|
|
6
|
+
[](https://www.npmjs.com/package/@coolbuttons/react)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 📦 Installation
|
|
6
12
|
|
|
7
13
|
```bash
|
|
8
14
|
npm install @coolbuttons/react
|
|
15
|
+
# or
|
|
16
|
+
yarn add @coolbuttons/react
|
|
17
|
+
# or
|
|
18
|
+
pnpm add @coolbuttons/react
|
|
9
19
|
```
|
|
10
20
|
|
|
11
|
-
|
|
21
|
+
### Requirements
|
|
22
|
+
|
|
23
|
+
- React 16.8+ (for hooks support)
|
|
24
|
+
- React-DOM 16.8+
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 🚀 Quick Start
|
|
29
|
+
|
|
30
|
+
### Basic Usage
|
|
12
31
|
|
|
13
32
|
```jsx
|
|
14
|
-
import { Claymorphic
|
|
33
|
+
import { Claymorphic } from '@coolbuttons/react';
|
|
15
34
|
|
|
16
35
|
export default function App() {
|
|
36
|
+
return (
|
|
37
|
+
<Claymorphic onClick={() => alert('Clicked!')}>
|
|
38
|
+
Click Me
|
|
39
|
+
</Claymorphic>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Multiple Buttons
|
|
45
|
+
|
|
46
|
+
```jsx
|
|
47
|
+
import {
|
|
48
|
+
Claymorphic,
|
|
49
|
+
GlassCard,
|
|
50
|
+
NeonBorder,
|
|
51
|
+
ModernMinimal
|
|
52
|
+
} from '@coolbuttons/react';
|
|
53
|
+
|
|
54
|
+
export default function ButtonGrid() {
|
|
55
|
+
return (
|
|
56
|
+
<div className="flex gap-4 p-8">
|
|
57
|
+
<Claymorphic>Claymorphic</Claymorphic>
|
|
58
|
+
<GlassCard>Glass Card</GlassCard>
|
|
59
|
+
<NeonBorder>Neon Border</NeonBorder>
|
|
60
|
+
<ModernMinimal>Modern Minimal</ModernMinimal>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 📚 All Available Components
|
|
69
|
+
|
|
70
|
+
### Import Convention
|
|
71
|
+
|
|
72
|
+
```jsx
|
|
73
|
+
import { ButtonName } from '@coolbuttons/react';
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Complete Button List (200+)
|
|
77
|
+
|
|
78
|
+
**Glassmorphic:**
|
|
79
|
+
GlassCard, GlassDouble, GlassFrostedInner, GlassFrostyPill, GlassFusion, GlassGlow, GlassInset, GlassReflective, GlassRefraction, GlassStroke, DeepBlurGlass, EtherealBlur
|
|
80
|
+
|
|
81
|
+
**Neumorphic:**
|
|
82
|
+
NeumorphicSoft, NeumorphicConcave, NeumorphicConcavePill, NeumorphicDark, NeumorphicEmbossed, HighElevatedNeumorphic
|
|
83
|
+
|
|
84
|
+
**Cyberpunk:**
|
|
85
|
+
Cyberpunk, CyberBevel, CyberGlow, CyberGradient, CyberSlice, GlitchEffect, OutlineComet
|
|
86
|
+
|
|
87
|
+
**Modern & Minimal:**
|
|
88
|
+
ModernMinimal, ModernPrimary, MinimalArrow, MinimalBadge, MinimalPulse, InvertedMinimal, InvertedRound
|
|
89
|
+
|
|
90
|
+
**Liquid & Morph:**
|
|
91
|
+
LiquidFill, LiquidGradient, LiquidPrism, LiquidWarp, MorphingShape, GradientMorph
|
|
92
|
+
|
|
93
|
+
**Animated & Interactive:**
|
|
94
|
+
MagneticBorder, MagneticCircle, MagneticSoft, MagnifyHover, MagnifyText, FloatingPulse, FloatingLabel, ExpandingAura, ExpandingPill, BouncyIcon, IconBounce
|
|
95
|
+
|
|
96
|
+
**Retro & Vintage:**
|
|
97
|
+
Classic90s, OldTerminal, ArcadeGreen, DiagonalStripes, ChipBoard
|
|
98
|
+
|
|
99
|
+
**Gradient & Shadow:**
|
|
100
|
+
GradientShadow, DoubleShadow, IndependentShadow, InnerShadowDepth, ShadowGlow, FloatingShadow
|
|
101
|
+
|
|
102
|
+
**Neon & Glow:**
|
|
103
|
+
NeonBorder, NeonPill, NeonPulseRing, GlowGhost, GlowOutline, InnerGlow, InnerGlowPill
|
|
104
|
+
|
|
105
|
+
**Premium Effects:**
|
|
106
|
+
BentoBox, BorderBeam, BorderTrace, Brutalist, Claymorphic, ClaySoftPill, ContrastFrame, DashedReveal, DashRotate, DiamondCut, DotPattern, DualTone, ElevatedFloat, FragmentButton, GhostReveal, GlossyButton, GridOverlay, HandDrawn, Holographic, IndustrialPlate, LavaFlow, And 100+ more...
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 🎨 Component Props
|
|
111
|
+
|
|
112
|
+
All button components accept these props:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
interface ButtonProps {
|
|
116
|
+
children?: React.ReactNode; // Button text/content
|
|
117
|
+
onClick?: () => void; // Click handler function
|
|
118
|
+
disabled?: boolean; // Disable button state
|
|
119
|
+
className?: string; // Additional CSS classes
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Example with Props
|
|
124
|
+
|
|
125
|
+
```jsx
|
|
126
|
+
import { Claymorphic } from '@coolbuttons/react';
|
|
127
|
+
|
|
128
|
+
export function MyButton() {
|
|
129
|
+
const handleClick = () => {
|
|
130
|
+
console.log('Button clicked!');
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<Claymorphic
|
|
135
|
+
onClick={handleClick}
|
|
136
|
+
disabled={false}
|
|
137
|
+
className="w-full md:w-auto"
|
|
138
|
+
>
|
|
139
|
+
Submit
|
|
140
|
+
</Claymorphic>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🎯 Usage Examples
|
|
148
|
+
|
|
149
|
+
### E-commerce
|
|
150
|
+
|
|
151
|
+
```jsx
|
|
152
|
+
import { GlassCard, NeonBorder } from '@coolbuttons/react';
|
|
153
|
+
|
|
154
|
+
export function ProductCard({ product }) {
|
|
17
155
|
return (
|
|
18
156
|
<div>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<GlassCard>
|
|
24
|
-
Glass Button
|
|
157
|
+
<h3>{product.name}</h3>
|
|
158
|
+
<p>${product.price}</p>
|
|
159
|
+
<GlassCard onClick={() => addToCart(product)}>
|
|
160
|
+
Add to Cart
|
|
25
161
|
</GlassCard>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</NeumorphicSoft>
|
|
162
|
+
<NeonBorder onClick={() => viewDetails(product)}>
|
|
163
|
+
View Details
|
|
164
|
+
</NeonBorder>
|
|
30
165
|
</div>
|
|
31
166
|
);
|
|
32
167
|
}
|
|
33
168
|
```
|
|
34
169
|
|
|
35
|
-
|
|
170
|
+
### Forms
|
|
171
|
+
|
|
172
|
+
```jsx
|
|
173
|
+
import { ModernMinimal, ModernPrimary } from '@coolbuttons/react';
|
|
174
|
+
|
|
175
|
+
export function LoginForm() {
|
|
176
|
+
return (
|
|
177
|
+
<form>
|
|
178
|
+
<input type="email" placeholder="Email" />
|
|
179
|
+
<input type="password" placeholder="Password" />
|
|
180
|
+
|
|
181
|
+
<ModernPrimary type="submit">
|
|
182
|
+
Login
|
|
183
|
+
</ModernPrimary>
|
|
184
|
+
|
|
185
|
+
<ModernMinimal type="button" onClick={() => reset()}>
|
|
186
|
+
Reset
|
|
187
|
+
</ModernMinimal>
|
|
188
|
+
</form>
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
```
|
|
36
192
|
|
|
37
|
-
|
|
38
|
-
- **GlassCard** - Glassmorphism design
|
|
39
|
-
- **NeumorphicSoft** - Soft neumorphic design
|
|
40
|
-
- **Brutalist** - Minimal brutalist design
|
|
41
|
-
- **NeonBorder** - Neon border effect
|
|
42
|
-
- **GradientShadow** - Gradient with shadow effect
|
|
43
|
-
- **ModernMinimal** - Clean minimal design
|
|
44
|
-
- **GlitchEffect** - Glitch animation effect
|
|
45
|
-
- **LiquidGradient** - Liquid gradient design
|
|
193
|
+
---
|
|
46
194
|
|
|
47
|
-
##
|
|
195
|
+
## 🎨 Styling
|
|
48
196
|
|
|
49
|
-
|
|
197
|
+
### With Tailwind CSS
|
|
50
198
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- `disabled` (boolean) - Disable state
|
|
54
|
-
- `className` (string) - Additional CSS classes
|
|
55
|
-
- `type` (string) - Button type: 'button' | 'submit' | 'reset'
|
|
199
|
+
```jsx
|
|
200
|
+
import { Claymorphic } from '@coolbuttons/react';
|
|
56
201
|
|
|
57
|
-
|
|
202
|
+
export function TailwindButton() {
|
|
203
|
+
return (
|
|
204
|
+
<Claymorphic className="
|
|
205
|
+
w-full
|
|
206
|
+
md:w-auto
|
|
207
|
+
px-6
|
|
208
|
+
py-3
|
|
209
|
+
text-lg
|
|
210
|
+
font-bold
|
|
211
|
+
rounded-lg
|
|
212
|
+
">
|
|
213
|
+
Tailwind Styled
|
|
214
|
+
</Claymorphic>
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
```
|
|
58
218
|
|
|
59
|
-
|
|
219
|
+
### With CSS Modules
|
|
60
220
|
|
|
61
221
|
```jsx
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
222
|
+
import { GlassCard } from '@coolbuttons/react';
|
|
223
|
+
import styles from './Button.module.css';
|
|
224
|
+
|
|
225
|
+
export function ModuleButton() {
|
|
226
|
+
return (
|
|
227
|
+
<GlassCard className={styles.primaryButton}>
|
|
228
|
+
Module Styled
|
|
229
|
+
</GlassCard>
|
|
230
|
+
);
|
|
231
|
+
}
|
|
65
232
|
```
|
|
66
233
|
|
|
67
|
-
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## ♿ Accessibility
|
|
237
|
+
|
|
238
|
+
All components follow WCAG 2.1 guidelines with proper keyboard support and screen reader compatibility.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 📊 Browser Support
|
|
243
|
+
|
|
244
|
+
- ✅ Chrome/Edge (Latest)
|
|
245
|
+
- ✅ Firefox (Latest)
|
|
246
|
+
- ✅ Safari 12+
|
|
247
|
+
- ✅ iOS Safari 12+
|
|
248
|
+
- ✅ Android Chrome
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 🚀 Performance
|
|
253
|
+
|
|
254
|
+
- **Tree-shakeable**: Import only what you need
|
|
255
|
+
- **Small size**: ~50KB gzipped
|
|
256
|
+
- **No external CSS**: Styles are encapsulated
|
|
257
|
+
- **Optimized rendering**: Uses React best practices
|
|
258
|
+
- **Production ready**: Battle-tested
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 📄 License
|
|
263
|
+
|
|
264
|
+
MIT © 2026 Cool Buttons
|
|
68
265
|
|
|
69
|
-
|
|
266
|
+
---
|
|
70
267
|
|
|
71
|
-
## Support
|
|
268
|
+
## 🙋 Support
|
|
72
269
|
|
|
73
|
-
|
|
270
|
+
- 📖 [Full Documentation](https://github.com/devchauhann/coolbuttons)
|
|
271
|
+
- 🐛 [Report Issues](https://github.com/devchauhann/coolbuttons/issues)
|
|
272
|
+
- 💬 [Discussions](https://github.com/devchauhann/coolbuttons/discussions)
|