@liquidcommerce/elements-sdk 2.7.0 → 2.7.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.
Files changed (81) hide show
  1. package/README.md +83 -2750
  2. package/dist/index.checkout.esm.js +6898 -6837
  3. package/dist/index.esm.js +11463 -10993
  4. package/dist/types/auto-initialize/shared-utils.d.ts +5 -0
  5. package/dist/types/constants/core.constant.d.ts +0 -4
  6. package/dist/types/core/base-component.service.d.ts +2 -1
  7. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +1 -0
  8. package/dist/types/enums/core.enum.d.ts +11 -0
  9. package/dist/types/interfaces/configs/product-list.interface.d.ts +2 -2
  10. package/dist/types/interfaces/core.interface.d.ts +5 -4
  11. package/dist/types/modules/address/address-input.component.d.ts +11 -0
  12. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
  13. package/dist/types/modules/product-list/components/card-components/index.d.ts +3 -0
  14. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +8 -0
  15. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +2 -0
  16. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
  17. package/dist/types/modules/product-list/components/card-components/product-title.d.ts +6 -0
  18. package/dist/types/modules/product-list/components/index.d.ts +1 -0
  19. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +5 -1
  20. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +28 -0
  21. package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +10 -2
  22. package/dist/types/modules/product-list/product-list-card.component.d.ts +0 -5
  23. package/dist/types/modules/product-list/product-list.commands.d.ts +11 -2
  24. package/dist/types/modules/product-list/product-list.interface.d.ts +1 -0
  25. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +11 -2
  26. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  27. package/dist/types/utils/dom-compat.d.ts +2 -0
  28. package/docs/gitbook/actions.md +964 -0
  29. package/docs/gitbook/address.md +48 -0
  30. package/docs/gitbook/cart.md +65 -0
  31. package/docs/gitbook/checkout.md +131 -0
  32. package/docs/gitbook/events.md +1765 -0
  33. package/docs/gitbook/overview.md +166 -0
  34. package/docs/gitbook/product.md +64 -0
  35. package/docs/gitbook/quick-start-guide.md +393 -0
  36. package/docs/v1/README.md +210 -0
  37. package/docs/v1/api/actions/address-actions.md +281 -0
  38. package/docs/v1/api/actions/cart-actions.md +337 -0
  39. package/docs/v1/api/actions/checkout-actions.md +387 -0
  40. package/docs/v1/api/actions/product-actions.md +115 -0
  41. package/docs/v1/api/client.md +482 -0
  42. package/docs/v1/api/configuration.md +1 -0
  43. package/docs/v1/api/injection-methods.md +247 -0
  44. package/docs/v1/api/typescript-types.md +1 -0
  45. package/docs/v1/api/ui-helpers.md +200 -0
  46. package/docs/v1/examples/advanced-patterns.md +96 -0
  47. package/docs/v1/examples/checkout-flow.md +91 -0
  48. package/docs/v1/examples/custom-theming.md +63 -0
  49. package/docs/v1/examples/multi-product-page.md +90 -0
  50. package/docs/v1/examples/simple-product-page.md +89 -0
  51. package/docs/v1/getting-started/concepts.md +507 -0
  52. package/docs/v1/getting-started/installation.md +328 -0
  53. package/docs/v1/getting-started/quick-start.md +405 -0
  54. package/docs/v1/guides/address-component.md +431 -0
  55. package/docs/v1/guides/best-practices.md +324 -0
  56. package/docs/v1/guides/cart-component.md +737 -0
  57. package/docs/v1/guides/checkout-component.md +672 -0
  58. package/docs/v1/guides/events.md +926 -0
  59. package/docs/v1/guides/product-component.md +686 -0
  60. package/docs/v1/guides/product-list-component.md +598 -0
  61. package/docs/v1/guides/theming.md +216 -0
  62. package/docs/v1/integration/angular.md +39 -0
  63. package/docs/v1/integration/laravel.md +41 -0
  64. package/docs/v1/integration/nextjs.md +60 -0
  65. package/docs/v1/integration/proxy-setup.md +89 -0
  66. package/docs/v1/integration/react.md +64 -0
  67. package/docs/v1/integration/vanilla-js.md +84 -0
  68. package/docs/v1/integration/vue.md +34 -0
  69. package/docs/v1/reference/browser-support.md +44 -0
  70. package/docs/v1/reference/error-handling.md +70 -0
  71. package/docs/v1/reference/performance.md +54 -0
  72. package/docs/v1/reference/troubleshooting.md +64 -0
  73. package/package.json +1 -1
  74. package/docs/ACTIONS.md +0 -1301
  75. package/docs/BROWSER_SUPPORT.md +0 -279
  76. package/docs/CONFIGURATION.md +0 -997
  77. package/docs/DOCUMENTATION_INDEX.md +0 -319
  78. package/docs/EVENTS.md +0 -798
  79. package/docs/PROXY.md +0 -228
  80. package/docs/THEMING.md +0 -681
  81. package/docs/TROUBLESHOOTING.md +0 -793
package/docs/THEMING.md DELETED
@@ -1,681 +0,0 @@
1
- # Theming Guide
2
-
3
- Complete reference for customizing the appearance of LiquidCommerce Elements SDK components based on actual SDK interfaces.
4
-
5
- ## Overview
6
-
7
- The SDK provides theme customization through the `customTheme` configuration option. Theme configuration uses a hierarchical structure with global and component-specific settings.
8
-
9
- ## Basic Usage
10
-
11
- ```javascript
12
- const client = await Elements('YOUR_API_KEY', {
13
- customTheme: {
14
- global: {
15
- theme: { /* global theme */ },
16
- layout: { /* global layout */ }
17
- },
18
- product: { /* product theme */ },
19
- cart: { /* cart theme */ },
20
- checkout: { /* checkout theme */ },
21
- address: { /* address theme */ }
22
- }
23
- });
24
- ```
25
-
26
- ## Global Configuration
27
-
28
- ### Global Theme
29
-
30
- ```typescript
31
- interface IGlobalTheme {
32
- buttonCornerRadius: string;
33
- cardCornerRadius: string;
34
- headingFont: IFontFamily;
35
- paragraphFont: IFontFamily;
36
- primaryColor: string;
37
- accentColor: string;
38
- defaultTextColor: string;
39
- selectedTextColor: string;
40
- linkTextColor: string;
41
- errorColor: string;
42
- warningColor: string;
43
- successColor: string;
44
- drawerBackgroundColor: string;
45
- }
46
-
47
- interface IFontFamily {
48
- name: string;
49
- weights: number[];
50
- }
51
- ```
52
-
53
- **Example:**
54
- ```javascript
55
- customTheme: {
56
- global: {
57
- theme: {
58
- buttonCornerRadius: '8px',
59
- cardCornerRadius: '12px',
60
- headingFont: {
61
- name: 'Inter',
62
- weights: [600, 700]
63
- },
64
- paragraphFont: {
65
- name: 'Inter',
66
- weights: [400, 500]
67
- },
68
- primaryColor: '#007bff',
69
- accentColor: '#6c757d',
70
- defaultTextColor: '#212529',
71
- selectedTextColor: '#ffffff',
72
- linkTextColor: '#1d4ed8',
73
- errorColor: '#dc3545',
74
- warningColor: '#ffc107',
75
- successColor: '#28a745',
76
- drawerBackgroundColor: '#ffffff'
77
- }
78
- }
79
- }
80
- ```
81
-
82
- ### Global Layout
83
-
84
- ```typescript
85
- interface IGlobalLayout {
86
- enablePersonalization: boolean;
87
- personalizationText: string;
88
- personalizationCardStyle: 'outlined' | 'filled';
89
- allowPromoCodes: boolean;
90
- inputFieldStyle: 'outlined' | 'filled';
91
- showPoweredBy: boolean; // ⚠️ READ-ONLY: Cannot be customized (paid feature)
92
- poweredByMode: 'light' | 'dark'; // Can be customized
93
- }
94
- ```
95
-
96
- **⚠️ Protected Field**: `showPoweredBy` is controlled by LiquidCommerce and cannot be overridden through custom theme configuration. This is a paid feature managed through your LiquidCommerce dashboard. However, `poweredByMode` can be customized to match your site's theme (light or dark).
97
-
98
- **Example:**
99
- ```javascript
100
- customTheme: {
101
- global: {
102
- layout: {
103
- enablePersonalization: true,
104
- personalizationText: 'Personalize your product',
105
- personalizationCardStyle: 'outlined',
106
- allowPromoCodes: true,
107
- inputFieldStyle: 'filled',
108
- poweredByMode: 'dark' // Can be customized (light or dark)
109
- // Note: showPoweredBy is read-only and cannot be customized here
110
- }
111
- }
112
- }
113
- ```
114
-
115
- ### Personalization (Engraving) Configuration
116
-
117
- The personalization feature is controlled globally and affects how engraving appears across all contexts (product, cart, and checkout).
118
-
119
- **Configuration Options:**
120
-
121
- - **`enablePersonalization`** (boolean): Master switch to enable/disable personalization feature globally. When `false`, engraving options won't appear even for engravable products.
122
-
123
- - **`personalizationText`** (string): The text shown on the "Add Personalization" button in product views. This is the call-to-action that customers see before adding engraving.
124
-
125
- - **`personalizationCardStyle`** ('outlined' | 'filled'): Controls the visual style of personalization cards displayed in cart and checkout:
126
- - `'outlined'`: Border-based style with transparent background
127
- - `'filled'`: Filled background style
128
-
129
- **Context-Specific Behavior:**
130
-
131
- The SDK intelligently displays personalization differently based on context:
132
-
133
- 1. **Product View:** Shows button with `personalizationText` and engraving fee (e.g., "Personalize your product +$5.00")
134
-
135
- 2. **Cart View:** Displays engraving details in a card with edit/remove buttons using the `personalizationCardStyle`
136
-
137
- 3. **Checkout View:** Shows engraving details in a card (read-only) with only remove button using the `personalizationCardStyle`
138
-
139
- **Example Configurations:**
140
-
141
- ```javascript
142
- // Minimal personalization (use defaults)
143
- customTheme: {
144
- global: {
145
- layout: {
146
- enablePersonalization: true
147
- }
148
- }
149
- }
150
-
151
- // Custom personalization styling
152
- customTheme: {
153
- global: {
154
- layout: {
155
- enablePersonalization: true,
156
- personalizationText: 'Make it yours',
157
- personalizationCardStyle: 'filled'
158
- }
159
- }
160
- }
161
-
162
- // Disable personalization globally
163
- customTheme: {
164
- global: {
165
- layout: {
166
- enablePersonalization: false
167
- }
168
- }
169
- }
170
- ```
171
-
172
- **Note:** Individual products determine if they support engraving based on product metadata. The global setting only controls whether the feature is available when products support it.
173
-
174
- ## Product Component
175
-
176
- ```typescript
177
- interface IProductComponent {
178
- theme: {
179
- backgroundColor: string;
180
- };
181
- layout: {
182
- showImages: boolean;
183
- showOnlyMainImage: boolean;
184
- showTitle: boolean;
185
- showDescription: boolean;
186
- showQuantityCounter: boolean;
187
- showOffHours: boolean;
188
- quantityCounterStyle: 'outlined' | 'ghost';
189
- fulfillmentDisplay: 'carousel' | 'popup';
190
- enableShippingFulfillment: boolean;
191
- enableOnDemandFulfillment: boolean;
192
- addToCartButtonText: string;
193
- addToCartButtonShowTotalPrice: boolean;
194
- buyNowButtonText: string;
195
- preSaleButtonText: string;
196
- prioritizeEngraving: boolean;
197
- noAvailabilityText: string;
198
- };
199
- }
200
- ```
201
-
202
- **Example:**
203
- ```javascript
204
- customTheme: {
205
- product: {
206
- theme: {
207
- backgroundColor: '#ffffff'
208
- },
209
- layout: {
210
- showImages: true,
211
- showOnlyMainImage: false,
212
- showTitle: true,
213
- showDescription: true,
214
- showQuantityCounter: true,
215
- showOffHours: false,
216
- quantityCounterStyle: 'outlined',
217
- fulfillmentDisplay: 'carousel',
218
- enableShippingFulfillment: true,
219
- enableOnDemandFulfillment: true,
220
- addToCartButtonText: 'Add to Cart',
221
- addToCartButtonShowTotalPrice: true,
222
- buyNowButtonText: 'Buy Now',
223
- preSaleButtonText: 'Pre-Order',
224
- prioritizeEngraving: false,
225
- noAvailabilityText: 'Not available in your area'
226
- }
227
- }
228
- }
229
- ```
230
-
231
- ## Cart Component
232
-
233
- ```typescript
234
- interface ICartComponent {
235
- theme: {
236
- backgroundColor: string;
237
- };
238
- layout: {
239
- showQuantityCounter: boolean;
240
- quantityCounterStyle: 'outlined' | 'ghost';
241
- drawerHeaderText: string;
242
- goToCheckoutButtonText: string;
243
- };
244
- }
245
- ```
246
-
247
- **Example:**
248
- ```javascript
249
- customTheme: {
250
- cart: {
251
- theme: {
252
- backgroundColor: '#ffffff'
253
- },
254
- layout: {
255
- showQuantityCounter: true,
256
- quantityCounterStyle: 'outlined',
257
- drawerHeaderText: 'Your Cart',
258
- goToCheckoutButtonText: 'Proceed to Checkout'
259
- }
260
- }
261
- }
262
- ```
263
-
264
- ## Checkout Component
265
-
266
- ```typescript
267
- interface ICheckoutComponent {
268
- theme: {
269
- backgroundColor: string;
270
- };
271
- layout: {
272
- emailOptIn: {
273
- show: boolean;
274
- checked: boolean;
275
- text: string;
276
- };
277
- smsOptIn: {
278
- show: boolean;
279
- checked: boolean;
280
- text: string;
281
- };
282
- allowGiftCards: boolean;
283
- legalMessage: {
284
- show: boolean;
285
- text: string;
286
- };
287
- continueShoppingUrl: string;
288
- exitUrl: string;
289
- thankYouButtonText: string;
290
- drawerHeaderText: string;
291
- placeOrderButtonText: string;
292
- checkoutCompleted: {
293
- customLogo: string;
294
- customText: string | null;
295
- };
296
- };
297
- }
298
- ```
299
-
300
- **Example:**
301
- ```javascript
302
- customTheme: {
303
- checkout: {
304
- theme: {
305
- backgroundColor: '#ffffff'
306
- },
307
- layout: {
308
- emailOptIn: {
309
- show: true,
310
- checked: false,
311
- text: 'Send me marketing emails'
312
- },
313
- smsOptIn: {
314
- show: true,
315
- checked: false,
316
- text: 'Send me SMS updates'
317
- },
318
- allowGiftCards: true,
319
- legalMessage: {
320
- show: true,
321
- text: 'By placing this order, you agree to our terms and conditions.'
322
- },
323
- continueShoppingUrl: '/',
324
- exitUrl: '/',
325
- thankYouButtonText: 'Continue Shopping',
326
- drawerHeaderText: 'Checkout',
327
- placeOrderButtonText: 'Place Order',
328
- checkoutCompleted: {
329
- customLogo: 'https://yourdomain.com/logo.png',
330
- customText: 'Thank you for your order!'
331
- }
332
- }
333
- }
334
- }
335
- ```
336
-
337
- **Layout Properties:**
338
-
339
- - **`continueShoppingUrl`** (string): URL to redirect to when customer clicks "Continue Shopping" after order completion
340
- - **`exitUrl`** (string): URL for the exit/close action in checkout
341
- - **`legalMessage.text`** (string): Supports rich text / HTML content
342
-
343
- ## Address Component
344
-
345
- ```typescript
346
- interface IAddressComponent {
347
- theme: {
348
- backgroundColor: string;
349
- };
350
- }
351
- ```
352
-
353
- **Example:**
354
- ```javascript
355
- customTheme: {
356
- address: {
357
- theme: {
358
- backgroundColor: '#ffffff'
359
- }
360
- }
361
- }
362
- ```
363
-
364
- ## Product List Component
365
-
366
- ```typescript
367
- interface IProductListComponent {
368
- theme: {
369
- backgroundColor: string;
370
- };
371
- layout: {
372
- productCard: {
373
- style: 'card' | 'ghost';
374
- cornerRadius: 'rounded' | 'sharp';
375
- showPrice: boolean;
376
- showSizeSelector: boolean;
377
- showFulfillment: boolean;
378
- showRetailerName: boolean;
379
- showQuantityCounter: boolean;
380
- enableShippingFulfillment: boolean;
381
- enableOnDemandFulfillment: boolean;
382
- showCollections: boolean;
383
- enablePersonalization: boolean;
384
- };
385
- displayMode: 'modal' | 'drawer';
386
- };
387
- }
388
- ```
389
-
390
- **Example:**
391
- ```javascript
392
- customTheme: {
393
- productList: {
394
- theme: {
395
- backgroundColor: '#f8f9fa'
396
- },
397
- layout: {
398
- productCard: {
399
- style: 'card',
400
- cornerRadius: 'rounded',
401
- showPrice: true,
402
- showSizeSelector: true,
403
- showFulfillment: true,
404
- showRetailerName: false,
405
- showQuantityCounter: true,
406
- enableShippingFulfillment: true,
407
- enableOnDemandFulfillment: true,
408
- showCollections: false,
409
- enablePersonalization: true
410
- },
411
- displayMode: 'drawer'
412
- }
413
- }
414
- }
415
- ```
416
-
417
- **Card Style Options:**
418
-
419
- - **`style`**: `'card'` shows a bordered card with background, `'ghost'` shows a minimal borderless card
420
- - **`cornerRadius`**: `'rounded'` uses rounded corners, `'sharp'` uses square corners
421
- - **`displayMode`**: `'modal'` opens product details in a modal, `'drawer'` opens in a side drawer
422
-
423
- **Card Feature Flags:**
424
-
425
- - **`showPrice`**: Display price on the product card
426
- - **`showSizeSelector`**: Show size/variant selector on the card
427
- - **`showFulfillment`**: Show fulfillment type indicator
428
- - **`showRetailerName`**: Show the retailer name
429
- - **`showQuantityCounter`**: Show quantity increment/decrement controls
430
- - **`enableShippingFulfillment`**: Allow shipping fulfillment option
431
- - **`enableOnDemandFulfillment`**: Allow on-demand fulfillment option
432
- - **`showCollections`**: Show product collection/tag labels
433
- - **`enablePersonalization`**: Show personalization/engraving option on cards
434
-
435
- ## Complete Configuration Example
436
-
437
- ```javascript
438
- const client = await Elements('YOUR_API_KEY', {
439
- env: 'production',
440
- customTheme: {
441
- global: {
442
- theme: {
443
- buttonCornerRadius: '8px',
444
- cardCornerRadius: '12px',
445
- headingFont: {
446
- name: 'Inter',
447
- weights: [600, 700]
448
- },
449
- paragraphFont: {
450
- name: 'Inter',
451
- weights: [400, 500]
452
- },
453
- primaryColor: '#007bff',
454
- accentColor: '#6c757d',
455
- defaultTextColor: '#212529',
456
- selectedTextColor: '#ffffff',
457
- linkTextColor: '#1d4ed8',
458
- errorColor: '#dc3545',
459
- warningColor: '#ffc107',
460
- successColor: '#28a745',
461
- drawerBackgroundColor: '#ffffff'
462
- },
463
- layout: {
464
- enablePersonalization: true,
465
- personalizationText: 'Make it yours',
466
- personalizationCardStyle: 'outlined',
467
- allowPromoCodes: true,
468
- inputFieldStyle: 'filled',
469
- poweredByMode: 'light'
470
- }
471
- },
472
- product: {
473
- theme: {
474
- backgroundColor: '#ffffff'
475
- },
476
- layout: {
477
- showImages: true,
478
- showOnlyMainImage: false,
479
- showTitle: true,
480
- showDescription: true,
481
- showQuantityCounter: true,
482
- showOffHours: false,
483
- quantityCounterStyle: 'outlined',
484
- fulfillmentDisplay: 'carousel',
485
- enableShippingFulfillment: true,
486
- enableOnDemandFulfillment: true,
487
- addToCartButtonText: 'Add to Cart',
488
- addToCartButtonShowTotalPrice: true,
489
- buyNowButtonText: 'Buy Now',
490
- preSaleButtonText: 'Pre-Order',
491
- prioritizeEngraving: false,
492
- noAvailabilityText: 'Not available in your area'
493
- }
494
- },
495
- cart: {
496
- theme: {
497
- backgroundColor: '#ffffff'
498
- },
499
- layout: {
500
- showQuantityCounter: true,
501
- quantityCounterStyle: 'outlined',
502
- drawerHeaderText: 'Your Cart',
503
- goToCheckoutButtonText: 'Checkout'
504
- }
505
- },
506
- checkout: {
507
- theme: {
508
- backgroundColor: '#ffffff'
509
- },
510
- layout: {
511
- emailOptIn: {
512
- show: true,
513
- checked: false,
514
- text: 'Email me with news and offers'
515
- },
516
- smsOptIn: {
517
- show: true,
518
- checked: false,
519
- text: 'Text me with updates'
520
- },
521
- allowGiftCards: true,
522
- legalMessage: {
523
- show: false,
524
- text: ''
525
- },
526
- continueShoppingUrl: '/',
527
- exitUrl: '/',
528
- thankYouButtonText: 'Continue Shopping',
529
- drawerHeaderText: 'Checkout',
530
- placeOrderButtonText: 'Place Order',
531
- checkoutCompleted: {
532
- customLogo: 'https://yourdomain.com/logo.png',
533
- customText: null
534
- }
535
- }
536
- },
537
- address: {
538
- theme: {
539
- backgroundColor: '#ffffff'
540
- }
541
- }
542
- }
543
- });
544
- ```
545
-
546
- ## Dynamic Theme Updates (Builder Mode)
547
-
548
- When `isBuilder: true`, update themes dynamically:
549
-
550
- ```javascript
551
- const client = await Elements('YOUR_API_KEY', {
552
- env: 'development',
553
- isBuilder: true
554
- });
555
-
556
- // Update global theme
557
- await client.builder.updateComponentGlobalConfigs({
558
- theme: {
559
- primaryColor: '#ff6b6b'
560
- }
561
- });
562
-
563
- // Update product component
564
- await client.builder.updateProductComponent({
565
- layout: {
566
- addToCartButtonText: 'Add to Bag'
567
- }
568
- });
569
-
570
- // Update cart component
571
- client.builder.updateCartComponent({
572
- layout: {
573
- drawerHeaderText: 'Shopping Bag'
574
- }
575
- });
576
-
577
- // Update checkout component
578
- client.builder.updateCheckoutComponent({
579
- layout: {
580
- placeOrderButtonText: 'Complete Purchase'
581
- }
582
- });
583
-
584
- // Update address component
585
- client.builder.updateAddressComponent({
586
- theme: {
587
- backgroundColor: '#f8f9fa'
588
- }
589
- });
590
- ```
591
-
592
- ## TypeScript Support
593
-
594
- The SDK includes full TypeScript definitions:
595
-
596
- ```typescript
597
- import type {
598
- IClientCustomThemeConfig,
599
- UpdateComponentGlobalConfigs,
600
- UpdateProductComponent,
601
- UpdateCartComponent,
602
- UpdateCheckoutComponent,
603
- UpdateAddressComponent
604
- } from '@liquidcommerce/elements-sdk';
605
-
606
- const customTheme: IClientCustomThemeConfig = {
607
- global: {
608
- theme: {
609
- primaryColor: '#007bff'
610
- }
611
- }
612
- };
613
- ```
614
-
615
- ## Theme Presets
616
-
617
- ### Minimal
618
-
619
- ```javascript
620
- customTheme: {
621
- global: {
622
- theme: {
623
- buttonCornerRadius: '4px',
624
- cardCornerRadius: '4px',
625
- primaryColor: '#000000',
626
- accentColor: '#666666'
627
- }
628
- }
629
- }
630
- ```
631
-
632
- ### Rounded
633
-
634
- ```javascript
635
- customTheme: {
636
- global: {
637
- theme: {
638
- buttonCornerRadius: '24px',
639
- cardCornerRadius: '16px'
640
- }
641
- }
642
- }
643
- ```
644
-
645
- ### Bold Colors
646
-
647
- ```javascript
648
- customTheme: {
649
- global: {
650
- theme: {
651
- primaryColor: '#ff4757',
652
- accentColor: '#5f27cd',
653
- successColor: '#1dd1a1',
654
- errorColor: '#ee5a6f'
655
- }
656
- }
657
- }
658
- ```
659
-
660
- ## Best Practices
661
-
662
- 1. **Start minimal** - Only override what you need
663
- 2. **Maintain consistency** - Use consistent corner radius and colors across components
664
- 3. **Test accessibility** - Ensure sufficient color contrast
665
- 4. **Use web fonts** - Load fonts before initializing SDK for smooth rendering
666
- 5. **Match your brand** - Use your existing brand colors and typography
667
- 6. **Test on mobile** - Verify appearance on different screen sizes
668
- 7. **Use TypeScript** - Leverage type checking to avoid errors
669
- 8. **Document your theme** - Keep a reference of your theme customizations
670
-
671
- ## Limitations
672
-
673
- - Theme configuration is deep-merged with default theme
674
- - Some UI elements may not be customizable (core functionality)
675
- - Font loading is your responsibility (load fonts before SDK init)
676
- - Background colors apply to drawer containers, not individual elements
677
-
678
- ## Related Documentation
679
-
680
- - [Configuration Reference](./CONFIGURATION.md) - All SDK configuration options
681
- - [Troubleshooting Guide](./TROUBLESHOOTING.md) - Common theming issues