From a74780568b5d6043e33c6dfd5769d865219805ea Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 10 Aug 2018 20:15:30 +0400 Subject: [PATCH] Add docs for popover offset --- readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/readme.md b/readme.md index 5cd1ec8..6349db1 100644 --- a/readme.md +++ b/readme.md @@ -109,6 +109,23 @@ driver.highlight({ }); ``` +You can also add offset to the popover position by using the `offset` property + +```javascript +const driver = new Driver(); +driver.highlight({ + element: '#some-element', + popover: { + title: 'Title for the Popover', + description: 'Description for it', + position: 'bottom', + // Will show it 20 pixels away from the actual position of popover + // You may also provide the negative values + offset: 20, + } +}); +``` + ### Creating Feature Introductions – [Demo](http://kamranahmed.info/driver.js) 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. -- GitLab