react-iro-gradient-picker 1.0.0 → 1.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.
- package/README.md +70 -20
- package/package.json +5 -2
package/README.md
CHANGED
@@ -5,11 +5,13 @@
|
|
5
5
|
|
6
6
|
A beautiful, modern React gradient and solid color picker with full dark theme integration, built with Tailwind CSS and TypeScript.
|
7
7
|
|
8
|
-
###
|
8
|
+
### 🚀 **[✨ LIVE DEMO & DOCUMENTATION ✨](https://romfatal.github.io/react-iro-gradient-picker/)**
|
9
|
+
|
10
|
+
[](https://www.npmjs.com/package/react-iro-gradient-picker) [](https://github.com/romfatal/react-iro-gradient-picker/blob/main/LICENSE) [](https://romfatal.github.io/react-iro-gradient-picker/)
|
9
11
|
|
10
|
-
[
|
12
|
+
> 📚 **[Interactive Documentation](https://romfatal.github.io/react-iro-gradient-picker/)** | 📦 **[NPM Package](https://www.npmjs.com/package/react-iro-gradient-picker)** | 🔧 **[GitHub Repository](https://github.com/romfatal/react-iro-gradient-picker)**
|
11
13
|
|
12
|
-
|
14
|
+
### Inspired by [gpickr](https://github.com/Simonwep/gpickr) and enhanced with modern features
|
13
15
|
|
14
16
|
## ✨ Features
|
15
17
|
|
@@ -20,39 +22,91 @@ A beautiful, modern React gradient and solid color picker with full dark theme i
|
|
20
22
|
- 🎯 **Tailwind CSS** - Modern styling with comprehensive theming system
|
21
23
|
- 📱 **Responsive Design** - Works great on all screen sizes
|
22
24
|
|
23
|
-
##
|
25
|
+
## 🎬 Live Demo
|
26
|
+
|
27
|
+
### 🚀 **[✨ Try it Live - Interactive Storybook Demo ✨](https://romfatal.github.io/react-iro-gradient-picker/)**
|
24
28
|
|
25
|
-
|
29
|
+
Experience all features in action:
|
30
|
+
- 🌙 **Dark/Light Theme Toggle** - Switch themes and see all components adapt
|
31
|
+
- 🎨 **Solid Color Picker** - Pick any solid color with alpha transparency
|
32
|
+
- 🌈 **Gradient Picker** - Create linear/radial gradients with multiple stops
|
33
|
+
- 🔄 **Dual Mode** - Switch between solid and gradient modes seamlessly
|
34
|
+
- 📱 **Responsive Design** - Works perfectly on desktop and mobile
|
35
|
+
- ⚙️ **All Props & Configuration** - Explore every feature and customization option
|
36
|
+
|
37
|
+
**[📚 View Complete Documentation →](https://romfatal.github.io/react-iro-gradient-picker/)**
|
26
38
|
|
27
39
|
---
|
28
40
|
|
41
|
+
## 🚀 Quick Start
|
42
|
+
|
43
|
+
### Install
|
44
|
+
|
45
|
+
**Important: this component uses React Hooks and works on React version 16.8.0 and higher**
|
46
|
+
|
29
47
|
```bash
|
30
|
-
npm install
|
48
|
+
npm install react-iro-gradient-picker
|
31
49
|
```
|
32
50
|
|
33
|
-
OR
|
34
|
-
|
35
51
|
```bash
|
36
52
|
yarn add react-iro-gradient-picker
|
37
53
|
```
|
38
54
|
|
39
|
-
|
55
|
+
```bash
|
56
|
+
pnpm add react-iro-gradient-picker
|
57
|
+
```
|
58
|
+
|
59
|
+
### Basic Usage
|
40
60
|
|
41
61
|
```tsx
|
42
|
-
import React from 'react';
|
43
|
-
import
|
62
|
+
import React, { useState } from 'react';
|
63
|
+
import ColorPicker from 'react-iro-gradient-picker';
|
44
64
|
|
45
65
|
function App() {
|
46
|
-
const
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
66
|
+
const [color, setColor] = useState('#3B82F6');
|
67
|
+
|
68
|
+
return (
|
69
|
+
<ColorPicker
|
70
|
+
solid
|
71
|
+
value={color}
|
72
|
+
onChange={(newColor: string) => {
|
73
|
+
setColor(newColor);
|
74
|
+
return newColor;
|
75
|
+
}}
|
76
|
+
/>
|
77
|
+
);
|
51
78
|
}
|
52
79
|
|
53
80
|
export default App;
|
54
81
|
```
|
55
82
|
|
83
|
+
### 🌙 With Dark Theme Support
|
84
|
+
|
85
|
+
```tsx
|
86
|
+
import React, { useState } from 'react';
|
87
|
+
import ColorPicker from 'react-iro-gradient-picker';
|
88
|
+
import { ThemeProvider } from 'react-iro-gradient-picker/components/providers/ThemeContext';
|
89
|
+
|
90
|
+
function App() {
|
91
|
+
const [color, setColor] = useState('#3B82F6');
|
92
|
+
|
93
|
+
return (
|
94
|
+
<ThemeProvider defaultTheme="dark">
|
95
|
+
<ColorPicker
|
96
|
+
solid
|
97
|
+
gradient
|
98
|
+
value={color}
|
99
|
+
onChange={setColor}
|
100
|
+
showAlpha={true}
|
101
|
+
showInputs={true}
|
102
|
+
/>
|
103
|
+
</ThemeProvider>
|
104
|
+
);
|
105
|
+
}
|
106
|
+
```
|
107
|
+
|
108
|
+
### 📚 **[→ View Complete Documentation & Examples](https://romfatal.github.io/react-iro-gradient-picker/)**
|
109
|
+
|
56
110
|
## 🌟 What Makes This Special
|
57
111
|
|
58
112
|
This is an enhanced version of the original react-gcolor-picker with major improvements:
|
@@ -77,10 +131,6 @@ This is an enhanced version of the original react-gcolor-picker with major impro
|
|
77
131
|
- **Updated Dependencies** - Latest versions of all packages
|
78
132
|
- **Better Build Process** - Optimized for modern React applications
|
79
133
|
|
80
|
-
export default App;
|
81
|
-
|
82
|
-
```
|
83
|
-
|
84
134
|
## Props
|
85
135
|
|
86
136
|
| Attribute | Type | Default | Description |
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-iro-gradient-picker",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "Modern React gradient and solid color picker with complete dark theme support, built with TypeScript and Tailwind CSS",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -54,7 +54,10 @@
|
|
54
54
|
"predeploy": "storybook build",
|
55
55
|
"deploy": "gh-pages -d storybook-static/",
|
56
56
|
"release": "npm run test && release-it",
|
57
|
-
"build-storybook": "storybook build"
|
57
|
+
"build-storybook": "storybook build",
|
58
|
+
"version:patch": "npm version patch && npm publish",
|
59
|
+
"version:minor": "npm version minor && npm publish",
|
60
|
+
"version:major": "npm version major && npm publish"
|
58
61
|
},
|
59
62
|
"peerDependencies": {
|
60
63
|
"react": ">=16.8.0",
|