kamrify commited on
Commit
d71c768
·
1 Parent(s): 7c1e8fa

Update configuration

Browse files
docs/src/content/guides/configuration.mdx CHANGED
@@ -119,17 +119,17 @@ type Config = {
119
 
120
  // Whether to animate the product tour. (default: true)
121
  animate?: boolean;
122
- // Overlay color. (default: rgba(0, 0, 0, 0.5))
123
  // This is useful when you have a dark background
124
  // and want to highlight elements with a light
125
  // background color.
126
- backdropColor?: string;
127
  // Whether to smooth scroll to the highlighted element. (default: false)
128
  smoothScroll?: boolean;
129
  // Whether to allow closing the popover by clicking on the backdrop. (default: true)
130
  allowClose?: boolean;
131
  // Opacity of the backdrop. (default: 0.5)
132
- opacity?: number;
133
  // Distance between the highlighted element and the cutout. (default: 10)
134
  stagePadding?: number;
135
  // Radius of the cutout around the highlighted element. (default: 5)
 
119
 
120
  // Whether to animate the product tour. (default: true)
121
  animate?: boolean;
122
+ // Overlay color. (default: black)
123
  // This is useful when you have a dark background
124
  // and want to highlight elements with a light
125
  // background color.
126
+ overlayColor?: string;
127
  // Whether to smooth scroll to the highlighted element. (default: false)
128
  smoothScroll?: boolean;
129
  // Whether to allow closing the popover by clicking on the backdrop. (default: true)
130
  allowClose?: boolean;
131
  // Opacity of the backdrop. (default: 0.5)
132
+ overlayOpacity?: number;
133
  // Distance between the highlighted element and the cutout. (default: 10)
134
  stagePadding?: number;
135
  // Radius of the cutout around the highlighted element. (default: 5)
docs/src/content/guides/customize-overlay.mdx ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Styling Overlay"
3
+ groupTitle: "Examples"
4
+ sort: 8
5
+ ---
6
+
7
+ import { CodeSample } from "../../components/CodeSample.tsx";
8
+
9
+ You can customize the overlay opacity and color using `overlayOpacity` and `overlayColor` options to change the look of the overlay.
10
+
11
+ ## Overlay Color
12
+
13
+ Here are some driver.js examples with different overlay colors.
14
+
15
+ ```js
16
+ import { driver } from "driver.js";
17
+ import "driver.js/dist/driver.css";
18
+
19
+ const driverObj = driver({
20
+ overlayColor: 'blue'
21
+ });
22
+ driverObj.highlight({
23
+ popover: {
24
+ title: 'Pass any RGB Color',
25
+ description: 'Here we have set the overlay color to be blue. You can pass any RGB color to overlayColor option.'
26
+ }
27
+ });
28
+ ```
29
+
30
+ <CodeSample
31
+ buttonText={"Blue Color"}
32
+ config={{
33
+ overlayColor: 'blue'
34
+ }}
35
+ highlight={{
36
+ popover: {
37
+ title: 'Pass any RGB Color',
38
+ description: 'Here we have set the overlay color to be blue. You can pass any RGB color to overlayColor option.',
39
+ }
40
+ }}
41
+ id={"left-start"}
42
+ client:load
43
+ />