-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
772 lines (740 loc) · 28.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Boarding</title>
<meta
name="description"
itemprop="description"
content="A light-weight, no-dependency, vanilla JavaScript library to onboard your users to your page or application"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/favicons/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicons/favicon-16x16.png"
/>
<link rel="manifest" href="/favicons/site.webmanifest" />
<link
rel="mask-icon"
href="/favicons/safari-pinned-tab.svg"
color="#c56528"
/>
<link rel="shortcut icon" href="/favicons/favicon.ico" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-config" content="/favicons/browserconfig.xml" />
<meta name="theme-color" content="#ffffff" />
<meta
name="google-site-verification"
content="KO9YN_XsNztSqiMkQsHfSfsAoLgeAsaVoXL26w6EPbg"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
</head>
<body>
<div class="page-wrap">
<section class="section__header" id="boarding-demo-head">
<h1 class="brand">
<img id="logo_img" src="./images/boarding.svg" />
<span id="name_boarding">Boarding.js</span>
</h1>
<p class="text-muted tagline">
Light-weight, no-dependency, vanilla JavaScript engine to drive user's
focus across the page
</p>
<a
id="animated-tour"
href="javascript:void(0)"
class="btn btn__example btn__dark"
>With Animation</a
>
<a
id="boring-tour"
href="javascript:void(0)"
class="btn btn__example btn__dark"
>Without Animation</a
>
<div class="github-button top-30">
<!-- Place this tag where you want the button to render. -->
<a
class="github-button"
href="https://github.com/josias-r/boarding.js"
data-size="large"
data-show-count="true"
aria-label="Star josias-r/boarding.js on GitHub"
>Star</a
>
</div>
</section>
<blockquote style="font-size: 0.8rem">
<p>
💡 This library is a a port of
<a
href="https://github.com/kamranahmedse/driver.js"
target="_blank"
rel="noopener noreferrer"
>driver.js</a
>. The reason behind refactoring that library, is because driver.js
under the hood works by elevating elements using css with z-index.
This means it can very easily break your layout if you rely anywhere
on the css stacking context.
</p>
<p>
So how does this library approach the problem? It doesn't touch any
styles at all. Instead the library renders the overlay using an SVG
element. This means it works with <strong>any</strong> layout.
</p>
<p class="zero-bottom">
It has the small downside that an SVG is less customizable in terms of
how it looks visually than the approach that driver.js had. But maybe
better support for styling will be added in the future, since there
are other ways to approach that problem.
</p>
</blockquote>
<blockquote>
<p>
A lightweight (~7.5kb gzipped) yet powerful JavaScript engine that
helps you drive the user's focus on page.
</p>
<p class="zero-bottom">
Some sample use-cases can be creating powerful feature introductions,
call-to-action components, focus shifters etc.
</p>
</blockquote>
<section class="section__purpose">
<h3>What are the features?</h3>
<p>
Boarding is compatible with all the major browsers and can be used for
any of your overlay needs. Feature introductions, focus shifters,
call-to-action are just a few examples.
</p>
<ul>
<li id="highlight_feature">
🔆 <strong>Highlight</strong> any (literally any) item on page
</li>
<li id="interactions_feature">
✋ <strong>Block user interactions</strong>
</li>
<li id="feature_introductions_feature">
📣 Create <strong>feature introductions</strong>
</li>
<li id="focus_shifters_feature">
👓 Add <strong>focus shifters</strong> for users
</li>
<li id="customizable_feature">
🛠️ Highly customizable – <strong>Use it anywhere</strong> for
overlay
</li>
<li id="keyboard_feature">
⌨️ User Friendly – <strong>Controllable by keys</strong>
</li>
<li id="free_use_feature">
🆓 <strong>MIT Licensed</strong> – Free for personal and commercial
use
</li>
<li id="lightweight_feature">
🕊️ Lightweight – Only <strong>~7.5kb</strong> when gzipped
</li>
<li id="major_browsers_feature">
🌀 <strong>Consistent behavior</strong> across all major browsers
</li>
</ul>
</section>
<hr class="hr__fancy" />
<section class="section__how">
<h3>How does it do that?</h3>
<p>
In it simplest, it puts the canvas on top of the whole page and then
cuts the part that is over the element to be highlighted and provides
you several hooks when highlighting, highlighted or un-highlighting
elements making it highly customizable.
</p>
<h3 id="comparison-table">How does it compare to driver.js?</h3>
<div style="overflow-x: auto">
<table>
<tr>
<th style="width: 50%">Features</th>
<th>Boarding.js</th>
<th>Driver.js</th>
</tr>
<tr>
<td>
Works with complex layouts <br /><small
>(no z-index conflicts)</small
>
</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-remove"></i></td>
</tr>
<tr>
<td>
Define steps for elements which are not mounted yet <br /><small
>(for highly interactive websites, such as react applications,
where elements might only appear once an action has been
taken)</small
>
</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-remove"></i></td>
</tr>
<tr>
<td>
Has the concept of a stage<br /><small
>(a customizable background for the highlighted
element)</small
>
<br />
<br />
<small
>* Boarding.js will add the
<code>boarding-highlighted-element</code> class to the
higlighted element for optional custom styling.</small
>
</td>
<td><i class="fa fa-remove"></i>*</td>
<td><i class="fa fa-check"></i></td>
</tr>
<tr>
<td>Auto popover positioning</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-remove"></i></td>
</tr>
<tr>
<td>
Control popover
<a href="#single-element-with-popover-position">alignment</a>
</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-remove"></i></td>
</tr>
<tr>
<td>
Control allowed user (click) actions <br /><small
>(<a href="#api_section">strictClickHandling</a>)</small
>
</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-remove"></i></td>
</tr>
<tr>
<td>
Allow preparing/validating a move before it happens <br /><small
>(<a href="#api_section">prepareElement</a>)</small
>
</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-remove"></i></td>
</tr>
<tr>
<td>Written in TypeScript</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-remove"></i></td>
</tr>
</table>
</div>
<p>
Besides the above, Boarding.js also has a few more options available
for each individual step, a more stable event system and more hooks
for it, such as <code>onBeforeHighlighted</code>.
</p>
</section>
<hr class="hr__fancy" />
<section class="section__examples">
<div id="examples_section">
<h3>Can you show some Examples?</h3>
<p>
Below you find some of the examples and sample use-cases on how you
can use it.
</p>
</div>
<div id="single-element-no-popover" class="section__example">
<h4>Highlighting a Single Element – Without Popover</h4>
<p class="zero-bottom">
If all you want is just highlight a single element, you can do that
simply by passing the selector
</p>
<a href="#" class="btn__run-demo" id="run-single-element-no-popover"
>Show Demo</a
>
<pre><code class="javascript">const boarding = new Boarding();
boarding.highlight('#create-post');
</code></pre>
</div>
<hr class="hr__fancy" />
<div class="section__example">
<p>
A <strong>real world use-case</strong> for this could be
highlighting an element when user is interacting with it
</p>
<pre><code class="javascript">const focusBoarding = new Boarding();
// Highlight the section on focus
document.getElementById('creation-input')
.addEventListener('focus', (e) => {
focusBoarding.focus('#creation-input');
});
</code></pre>
<p class="top-20">
Focus any of the inputs and see how it moves the highlight from one
element to the other
</p>
<div id="creation-forms">
<input
type="text"
id="creation-input"
class="form-control"
placeholder="Focus any of the inputs"
/>
<input
type="text"
id="creation-input-2"
class="form-control"
placeholder="Focus any of the inputs"
/>
<input
type="text"
id="creation-input-3"
class="form-control"
placeholder="Focus any of the inputs"
/>
<input
type="text"
id="creation-input-4"
class="form-control"
placeholder="Focus any of the inputs"
/>
</div>
</div>
<p>
You can also turn off the animation or set the padding around the
corner. More on it later.
</p>
<hr class="hr__fancy" />
<div id="single-element-with-popover" class="section__example">
<h4>Highlighting a Single Element – With Popover</h4>
<p>
If you would like to show some details alongside the highlighted
element, you can do that easily by specifying title and description
</p>
<a href="#" class="btn__run-demo" id="run-single-element-with-popover"
>Show Demo</a
>
<pre><code class="javascript">const boarding = new Boarding();
boarding.highlight({
element: '#some-element',
popover: {
title: 'Title for the Popover',
description: 'Description for it',
}
});
</code></pre>
<p class="top-20">
You can modify the behavior of this popover also by a certain set of
options. More on it below.
</p>
</div>
<hr class="hr__fancy" />
<div id="single-element-with-popover-position" class="section__example">
<h4>Popover Positioning</h4>
<p>
You can also, change the preffered position of the popover to be
either
<code>top</code>, <code>bottom</code>, <code>left</code>,
<code>right</code>.
</p>
<p>
And for even more fine-grain control define the alignment of the
popover to be either
<code>start</code>, <code>center</code>, <code>end</code>
</p>
<a
href="#"
class="btn__run-demo"
id="run-single-element-with-popover-position"
>Show Demo</a
>
<pre><code class="javascript">const boarding = new Boarding();
boarding.highlight({
element: '#some-element',
popover: {
title: 'Title for the Popover',
description: 'Description for it',
// prefferedPosition can be top, bottom, left, right
prefferedPosition: 'left',
// alignment can be start, center, end
alignment: "start"
}
});
</code></pre>
</div>
<div class="section__example">
<div class="top-90 position-btns" id="position-btns">
<a href="#" data-alignment="start" data-preferredside="top"
>Top, Start</a
>
<a href="#" data-alignment="center" data-preferredside="top"
>Top, Center</a
>
<a href="#" data-alignment="end" data-preferredside="top"
>Top, End</a
>
<a href="#" data-alignment="start" data-preferredside="bottom"
>Bottom, Start</a
>
<a href="#" data-alignment="center" data-preferredside="bottom"
>Bottom, Center</a
>
<a href="#" data-alignment="end" data-preferredside="bottom"
>Bottom, End</a
>
<a href="#" data-alignment="start" data-preferredside="left"
>Left, Start</a
>
<a href="#" data-alignment="center" data-preferredside="left"
>Left, Center</a
>
<a href="#" data-alignment="end" data-preferredside="left"
>Left, End</a
>
<a href="#" data-alignment="start" data-preferredside="right"
>Right, Start</a
>
<a href="#" data-alignment="center" data-preferredside="right"
>Right, Center</a
>
<a href="#" data-alignment="end" data-preferredside="right"
>Right, End</a
>
</div>
<p class="top-20">
If you don't specify the position or specify it to be
<code>auto</code>, it will automatically find the suitable position
for the popover and show it
</p>
</div>
<hr class="hr__fancy" />
<div id="single-element-with-popover-html" class="section__example">
<h4>HTML in Popovers</h4>
<p>
You can also specify HTML in the body or the title of the popovers.
Here is an example:
</p>
<a
href="#"
class="btn__run-demo"
id="run-single-element-with-popover-html"
>Show Demo</a
>
<pre><code class="javascript">const boarding = new Boarding();
boarding.highlight({
element: '#some-element',
popover: {
title: '<em>An italicized title</em>',
description: 'Description may also contain <strong>HTML</strong>'
}
});
</code></pre>
</div>
<p class="top-20">And of course it can be any valid HTML.</p>
<hr class="hr__fancy" />
<div id="single-element-no-close" class="section__example">
<h4>Disable Close on Outside Click</h4>
<p>
By default, boarding.js gets reset if user clicks outside the
highlighted element, you can disable this:
</p>
<a href="#" class="btn__run-demo" id="run-single-element-no-close"
>Show Demo</a
>
<pre><code class="javascript">const boarding = new Boarding({
allowClose: false,
});
boarding.highlight({
element: '#some-element',
popover: {
title: '<em>An italicized title</em>',
description: 'Description may also contain <strong>HTML</strong>'
}
});
</code></pre>
<p class="top-20">
If you use this option, for multi-step boarding, it would close
after you are done with the popover or you can close it
programmatically. For single element popover, you need to close it
properly, otherwise it won't be closed
</p>
<pre><code class="javascript">boarding.reset()</code>
</pre>
</div>
<hr class="hr__fancy" />
<div id="third-element-introduction" class="section__example">
<h4 id="first-element-introduction">
Creating Feature Introductions
</h4>
<p id="second-para-feature-introductions">
You can also make powerful feature introductions to guide the users
about the features. Just provide an array of steps where each step
specifies an element to highlight.
</p>
<p id="third-para-feature-introductions">
Below is just a quick example showing you how to combine the steps
in introduction.
</p>
<a href="#" class="btn__run-demo" id="run-multi-element-popovers"
>Show Demo</a
>
</div>
<pre><code class="javascript">const boarding = new Boarding();
// Define the steps for introduction
boarding.defineSteps([
{
element: '#first-element-introduction',
popover: {
className: 'first-step-popover-class',
title: 'Title on Popover',
description: 'Body of the popover',
prefferedPosition: 'left'
}
},
{
element: '#second-element-introduction',
popover: {
title: 'Title on Popover',
description: 'Body of the popover',
prefferedPosition: 'top'
}
},
{
element: '#third-element-introduction',
popover: {
title: 'Title on Popover',
description: 'Body of the popover',
prefferedPosition: 'right'
}
},
]);
// Start the introduction
boarding.start();
</code></pre>
<p class="top-20">
This is just a quick example for the feature introduction. For a
richer one, please have a look at the
<a href="#" class="btn__example">"Quick Tour"</a>
</p>
<p>
You may also turn off the footer buttons in popover, in which case
user can control the popover using the arrows keys on keyboard. Or you
may control it using the methods provided by Boarding.
</p>
<hr class="hr__fancy" />
<div id="element-without-popover" class="section__example">
<h4>Without Overlay</h4>
<p>
You can create feature introductions and do everything listed above
without overlays also. All you have to do is just set the opacity to
`0`.
</p>
<a href="#" class="btn__run-demo" id="run-element-without-popover"
>Show Demo</a
>
<pre><code class="javascript">const boarding = new Boarding({
opacity: 0,
});
boarding.highlight({
element: '#run-element-without-popover',
popover: {
title: 'Title for the Popover',
description: 'Description for it',
prefferedPosition: 'top', // can be `top`, `left`, `right`, `bottom`
}
});
</code></pre>
<p class="top-20">
..and you can do the same for the feature introductions
</p>
</div>
<hr class="hr__fancy" />
<div id="element-without-popover" class="section__example">
<h4 id="run-element-with-step-counter-header">
With a current step counter
</h4>
<p>
If you want to customize the rendered popover, for example by adding
a a counter for the "current step", you can do so by modifying the
popover html elements using onPopoverRender.
</p>
<a href="#" class="btn__run-demo" id="run-element-with-step-counter"
>Show Demo</a
>
<pre><code class="javascript">const boarding = new Boarding({
// modify the rendered popoverElements.popoverTitle
onPopoverRender: (popoverElements) => {
// setTimeout, so we the count runs immediatly after all internal boarding logic has run. Otherwise we would get an outdated boarding.currentStep number
setTimeout(() => {
popoverElements.popoverTitle.innerText = `${
popoverElements.popoverTitle.innerText
} (${boarding.currentStep + 1}/${
boarding.getSteps().length
})`;
}, 0);
},
});
boarding.defineSteps([/* ...steps */]);
boarding.start();
</code></pre>
<p class="top-20">
..and you can do the same for the feature introductions
</p>
</div>
<hr class="hr__fancy" />
<div class="section__example">
<div id="api_section">
<h3>..and much much more</h3>
<p>
Boarding comes with many options that you can manipulate to make
boarding behave as you may like
</p>
</div>
<h4>Boarding Definition</h4>
<p>Here are the options that Boarding understands</p>
<pre><code class="javascript">const boarding = new Boarding({
className: 'scoped-class', // className to wrap boarding.js popover
animate: true, // Animate while changing highlighted element
opacity: 0.75, // Overlay opacity (0 means only popovers and without overlay)
padding: 10, // Distance of element from around the edges
allowClose: true, // Whether clicking on overlay should close or not
overlayClickNext: false, // Should it move to next step on overlay click
overlayColor: 'rgb(0,0,0)', // Fill color for the overlay
doneBtnText: 'Done', // Text on the final button
closeBtnText: 'Close', // Text on the close button for this step
nextBtnText: 'Next', // Next button text for this step
prevBtnText: 'Previous', // Previous button text for this step
showButtons: false, // Do not show control buttons in footer
keyboardControl: true, // Allow controlling through keyboard (escape to close, arrow keys to move)
scrollIntoViewOptions: {
behaviour: "smooth",
}, // We use `scrollIntoView()` when possible, pass here the options for it if you want any. Alternatively, you can also disable this functionallity by setting scrollIntoViewOptions to "no-scroll"
onBeforeHighlighted: (Element) {}, // Called when element is about to be highlighted
onHighlighted: (Element) {}, // Called when element is fully highlighted
onDeselected: (Element) {}, // Called when element has been deselected
onReset: (Element) {}, // Called when overlay is about to be cleared
onStart: (Element) {}, // Called when `boarding.start()` was called
onNext: (Element) => {}, // Called when moving to next step on any step
onPrevious: (Element) => {}, // Called when moving to next step on any step
strictClickHandling: "block-all", // Can also be `true` or if not wanted at all, `false`. Either block ALL pointer events, or isolate pointer-events to only allow on the highlighted element (`true`). Popover and overlay pointer-events are of course always allowed to be clicked
// Make changes to the actual popoverElements once they get rendered.
onPopoverRender: (el) => {
// ...
},
});
</code></pre>
</div>
<p class="top-20">
Note that all the button options that you provide in the boarding
definition can be overridden for a specific step by giving them in the
step definition
</p>
<div class="section__example">
<h4>Step Definition</h4>
<p>
Here are the set of options that you can pass in each step i.e. an
item in array of steps or the object that you pass to
<code>highlight</code> method
</p>
<pre><code class="javascript">const stepDefinition = {
element: '#some-item', // Query selector string or Node to be highlighted
popover: { // There will be no popover if empty or not given
className: 'popover-class', // className to wrap this specific step popover in addition to the general className in Boarding options
title: 'Title', // Title on the popover
description: 'Description', // Body of the popover
showButtons: false, // Do not show control buttons in footer
closeBtnText: 'Close', // Text on the close button for this step
nextBtnText: 'Next', // Next button text for this step
prevBtnText: 'Previous', // Previous button text for this step
onPopoverRender: (el) => { // Make changes to the actual popoverElements once they get rendered.
// ...
},
}
prepareElement: () => {}, // Called *before* moving to this step (for both cases when coming from "onNext" or "onPrevious")
onNext: (Element) => {}, // Overwrite the original onX eventhandlers for the current step. Same for on[Previous/Highlighted/BeforeHighlighted/Deselected]
};
</code></pre>
</div>
<div class="section__example">
<h4>API Methods</h4>
<p>Below are the set of methods that are available to you</p>
<pre><code class="javascript">const boarding = new Boarding(boardingOptions);
const isActivated = boarding.isActivated; // Checks if the boarding is active or not
boarding.next(); // Moves to next step in the steps list
boarding.previous(); // Moves to previous step in the steps list
boarding.start(stepNumber = 0); // Starts driving through the defined steps
boarding.highlight(string|stepDefinition); // highlights the element using query selector or the step definition
boarding.reset(); // Resets the overlay and clears the screen
boarding.hasHighlightedElement(); // Checks if there is any highlighted element
boarding.hasNextStep(); // Checks if there is next step to move to
boarding.hasPreviousStep(); // Checks if there is previous step to move to
// Prevents the current move. Useful in `prepareElement`, `onNext`, `onPrevious` if you want to
// perform some asynchronous task and manually move to next step
boarding.preventMove();
boarding.continue(); // Continue the move that was prevented using preventMove
boarding.clearMovePrevented(); // preventMove will just "pause" the tour. If you want to clear that paused state, you can call clearMovePrevented, to clean up that paused state. You should do this, when your logic has a condition where it never calls continue
// Gets the currently highlighted element on screen
const activeElement = boarding.getHighlightedElement();
const lastActiveElement = boarding.getLastHighlightedElement();
activeElement.getCalculatedPosition(); // Gets screen co-ordinates of the active element
activeElement.hidePopover(); // Hide the popover
activeElement.showPopover(); // Show the popover
activeElement.getNode(); // Gets the DOM Element behind this element
</code></pre>
</div>
<p class="top-20">
You can use a variety of options to achieve whatever you may want. I
have some plans on improving it further, make sure to keep an eye on
the
<a href="https://github.com/josias-r/boarding.js" target="_blank"
>GitHub page</a
>
</p>
</section>
<hr class="hr__fancy" />
<div class="section__example">
<h4>Contributing</h4>
<p>
You can find the contribution instructions on the
<a href="https://github.com/josias-r/boarding.js" target="_blank"
>GitHub page</a
>. Feel free to submit an issue, create a pull request or spread the
word
</p>
</div>
<!-- Place this tag where you want the button to render. -->
<a
class="github-button"
href="https://github.com/josias-r"
data-size="large"
data-show-count="true"
aria-label="Follow @josias-r on GitHub"
>Follow @josias-r</a
>
</div>
<script async defer src="//buttons.github.io/buttons.js"></script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>