Add docs for popover offset
Browse files
readme.md
CHANGED
@@ -109,6 +109,23 @@ driver.highlight({
|
|
109 |
});
|
110 |
```
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
### Creating Feature Introductions – [Demo](http://kamranahmed.info/driver.js)
|
113 |
|
114 |
Feature introductions are helpful when onboarding new users and giving them an idea about different parts of the application; you can create them seemlessly with Driver. Define the steps and call the `start` when you want to start presenting. User will be able to control the steps using the keyboard or using the buttons on popovers.
|
|
|
109 |
});
|
110 |
```
|
111 |
|
112 |
+
You can also add offset to the popover position by using the `offset` property
|
113 |
+
|
114 |
+
```javascript
|
115 |
+
const driver = new Driver();
|
116 |
+
driver.highlight({
|
117 |
+
element: '#some-element',
|
118 |
+
popover: {
|
119 |
+
title: 'Title for the Popover',
|
120 |
+
description: 'Description for it',
|
121 |
+
position: 'bottom',
|
122 |
+
// Will show it 20 pixels away from the actual position of popover
|
123 |
+
// You may also provide the negative values
|
124 |
+
offset: 20,
|
125 |
+
}
|
126 |
+
});
|
127 |
+
```
|
128 |
+
|
129 |
### Creating Feature Introductions – [Demo](http://kamranahmed.info/driver.js)
|
130 |
|
131 |
Feature introductions are helpful when onboarding new users and giving them an idea about different parts of the application; you can create them seemlessly with Driver. Define the steps and call the `start` when you want to start presenting. User will be able to control the steps using the keyboard or using the buttons on popovers.
|