@@ -29,12 +29,14 @@ php -S localhost:8080 -t examples # Using PHP
29
29
### 📄 Available Example Pages
30
30
31
31
#### 1. ** Main Interactive Demo** (` index.html ` )
32
+
32
33
- Live customization controls
33
34
- Real-time preview
34
35
- Export functionality
35
36
- All basic options
36
37
37
38
#### 2. ** Advanced Customization** (` advanced-demo.html ` )
39
+
38
40
- 100+ QR code variations
39
41
- All shape combinations
40
42
- Gradient examples
@@ -43,18 +45,21 @@ php -S localhost:8080 -t examples # Using PHP
43
45
- Logo integration
44
46
45
47
#### 3. ** Simple Usage** (` simple-usage.html ` )
48
+
46
49
- Basic implementation
47
50
- Common use cases
48
51
- Template examples (WiFi, vCard, etc.)
49
52
- Copy & paste code snippets
50
53
51
54
#### 4. ** API Documentation** (` api-docs.html ` )
55
+
52
56
- Complete props reference
53
57
- Method documentation
54
58
- TypeScript interfaces
55
59
- Hook examples
56
60
57
61
#### 5. ** Detectability Test** (` qr-test.html ` )
62
+
58
63
- Test QR code scanning
59
64
- Contrast validation
60
65
- Real-time detectability feedback
@@ -67,18 +72,15 @@ php -S localhost:8080 -t examples # Using PHP
67
72
``` tsx
68
73
import { ReactQrCode } from ' @devmehq/react-qr-code'
69
74
70
- <ReactQrCode
71
- value = " https://example.com"
72
- size = { 256 }
73
- />
75
+ ;< ReactQrCode value = " https://example.com" size = {256 } / >
74
76
```
75
77
76
78
### With Custom Styling
77
79
78
80
``` tsx
79
81
import { AdvancedQRCode } from ' @devmehq/react-qr-code'
80
82
81
- <AdvancedQRCode
83
+ ; < AdvancedQRCode
82
84
value = " https://example.com"
83
85
size = {300 }
84
86
eyeShape = " rounded"
@@ -95,7 +97,7 @@ import { AdvancedQRCode } from '@devmehq/react-qr-code'
95
97
bodyGradient = { {
96
98
type: ' linear' ,
97
99
colors: [' #667EEA' , ' #764BA2' ],
98
- angle: 45
100
+ angle: 45 ,
99
101
}}
100
102
/>
101
103
```
@@ -116,7 +118,7 @@ import { AdvancedQRCode } from '@devmehq/react-qr-code'
116
118
``` tsx
117
119
import { AdvancedQRCode , QRHelpers } from ' @devmehq/react-qr-code'
118
120
119
- <AdvancedQRCode
121
+ ; < AdvancedQRCode
120
122
value = {QRHelpers.wifi(' NetworkName' , ' password123' , ' WPA2' )}
121
123
theme=" professional"
122
124
/>
@@ -131,7 +133,7 @@ import { AdvancedQRCode, QRHelpers } from '@devmehq/react-qr-code'
131
133
lastName: ' Doe' ,
132
134
phone: ' +1234567890' ,
133
135
134
- organization: ' ACME Corp'
136
+ organization: ' ACME Corp' ,
135
137
})}
136
138
theme = " elegant"
137
139
/ >
@@ -142,36 +144,42 @@ import { AdvancedQRCode, QRHelpers } from '@devmehq/react-qr-code'
142
144
The library includes 25+ professionally designed themes:
143
145
144
146
### Minimal & Clean
147
+
145
148
- ` minimal ` - Clean black and white
146
149
- ` monochrome ` - Grayscale elegance
147
150
- ` elegant ` - Sophisticated style
148
151
- ` professional ` - Business ready
149
152
150
153
### Colorful & Vibrant
154
+
151
155
- ` ocean ` - Deep blue waves
152
156
- ` sunset ` - Warm orange/pink
153
157
- ` forest ` - Natural greens
154
158
- ` rainbow ` - Full spectrum
155
159
- ` aurora ` - Northern lights
156
160
157
161
### Tech & Modern
162
+
158
163
- ` neon ` - Bright cyber green
159
164
- ` cyberpunk ` - Tech noir
160
165
- ` retrowave ` - 80s aesthetic
161
166
- ` gradient ` - Modern gradients
162
167
163
168
### Nature & Earth
169
+
164
170
- ` earth ` - Natural browns
165
171
- ` nature ` - Green harmony
166
172
- ` ice ` - Cool blues
167
173
- ` fire ` - Hot reds
168
174
169
175
### Metallic
176
+
170
177
- ` gold ` - Luxurious gold
171
178
- ` silver ` - Sleek silver
172
179
- ` bronze ` - Warm bronze
173
180
174
181
### Special
182
+
175
183
- ` cosmic ` - Space theme
176
184
- ` pastel ` - Soft colors
177
185
- ` dark ` - Dark mode
@@ -181,6 +189,7 @@ The library includes 25+ professionally designed themes:
181
189
## 🔧 Customization Options
182
190
183
191
### Eye (Finder Pattern) Shapes
192
+
184
193
- ` square ` - Classic square
185
194
- ` circle ` - Smooth circles
186
195
- ` rounded ` - Rounded corners
@@ -193,6 +202,7 @@ The library includes 25+ professionally designed themes:
193
202
- ` cat ` - Cat eyes
194
203
195
204
### Body (Data Module) Shapes
205
+
196
206
- ` square ` - Traditional pixels
197
207
- ` circle ` - Circular dots
198
208
- ` rounded ` - Soft corners
@@ -213,6 +223,7 @@ The library includes 25+ professionally designed themes:
213
223
- ` fluid ` - Fluid design
214
224
215
225
### Background Patterns
226
+
216
227
- ` none ` - Solid color
217
228
- ` dots ` - Dot pattern
218
229
- ` lines ` - Line pattern
@@ -229,11 +240,13 @@ The library includes 25+ professionally designed themes:
229
240
## 📊 Performance Tips
230
241
231
242
1 . ** Use Canvas for Large QR Codes**
243
+
232
244
``` tsx
233
245
<ReactQrCode renderAs = " canvas" size = { 512 } />
234
246
```
235
247
236
248
2 . ** Enable Lazy Loading**
249
+
237
250
``` tsx
238
251
<AdvancedQRCode lazy = { true } />
239
252
```
@@ -246,24 +259,22 @@ The library includes 25+ professionally designed themes:
246
259
4 . ** Batch Rendering**
247
260
``` tsx
248
261
// Render multiple QR codes efficiently
249
- const codes = data .map (item => (
250
- <AdvancedQRCode
251
- key = { item .id }
252
- value = { item .value }
253
- lazy = { true }
254
- />
262
+ const codes = data .map ((item ) => (
263
+ <AdvancedQRCode key = { item .id } value = { item .value } lazy = { true } />
255
264
))
256
265
```
257
266
258
267
## 🧪 Testing Detectability
259
268
260
269
Use the ` qr-test.html ` page to:
270
+
261
271
1 . Test QR code scanning with real devices
262
272
2 . Validate contrast ratios
263
273
3 . Check error correction levels
264
274
4 . Verify logo doesn't interfere
265
275
266
276
### Recommended Contrast Ratios
277
+
267
278
- ** Minimum** : 3:1
268
279
- ** Recommended** : 7:1
269
280
- ** Best** : 10:1+
@@ -281,6 +292,7 @@ Use the `qr-test.html` page to:
281
292
## 🎯 Common Use Cases
282
293
283
294
### Event Tickets
295
+
284
296
``` tsx
285
297
<AdvancedQRCode
286
298
value = { ` TICKET:${eventId }:${userId } ` }
@@ -290,15 +302,13 @@ Use the `qr-test.html` page to:
290
302
```
291
303
292
304
### Product Labels
305
+
293
306
``` tsx
294
- <AdvancedQRCode
295
- value = { ` PRODUCT:${sku }:${batch } ` }
296
- theme = " minimal"
297
- size = { 150 }
298
- />
307
+ <AdvancedQRCode value = { ` PRODUCT:${sku }:${batch } ` } theme = " minimal" size = { 150 } />
299
308
```
300
309
301
310
### Restaurant Menus
311
+
302
312
``` tsx
303
313
<AdvancedQRCode
304
314
value = " https://restaurant.com/menu"
@@ -308,6 +318,7 @@ Use the `qr-test.html` page to:
308
318
```
309
319
310
320
### Social Media
321
+
311
322
``` tsx
312
323
<AdvancedQRCode
313
324
value = { ` instagram://user?username=${username } ` }
@@ -320,4 +331,4 @@ Use the `qr-test.html` page to:
320
331
- [ GitHub Repository] ( https://github.com/devmehq/react-qr-code )
321
332
- [ NPM Package] ( https://www.npmjs.com/package/@devmehq/react-qr-code )
322
333
- [ Issue Tracker] ( https://github.com/devmehq/react-qr-code/issues )
323
- - [ Discussions] ( https://github.com/devmehq/react-qr-code/discussions )
334
+ - [ Discussions] ( https://github.com/devmehq/react-qr-code/discussions )
0 commit comments