You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement multiple element highlighting feature (#2995)
* Implement multiple element highlighting feature
* Fix overlay path string formatting
* Sync shepherd classes with extra highlight elements
* Sync highlight classes option with extra highlight elements
* Add tests for extra highligt elements
* Revert changes in landing page
* Skip elements to highlight if it's contained by another
* Include an example in the demo and provide cookbook example
* Correct the position of extraHighlights in the alphabetic order in StepOptions
Copy file name to clipboardExpand all lines: docs-src/src/content/docs/recipes/cookbook.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,24 +12,24 @@ starting the tour, then `bodyScrollLock.clearAllBodyScrollLocks();` after stoppi
12
12
13
13
### Highlighting multiple elements
14
14
15
-
The most obvious use case for this, is around a group of elements, or more specifically the column in a TABLE. This can be achieved using CSS to absolutely position the element and give it the width and height you need. e.g.,
15
+
Highlighting multiple elements is supported by Shepherd out of the box. You can pass an array of selectors to the `extraHighlights` option in the step configuration. This will highlight all the elements in the array as well as the target element defined in the `attachTo` option.
Similar results could be had by adding elements purely for the purpose of exposing more than one element in the overlay and positioning the element absolutely.
32
+
If an element to be highlighted is contained by another element that is also being highlighted, the contained element will not be highlighted. This is to prevent the contained element from being obscured by the containing element.
Copy file name to clipboardExpand all lines: landing/src/pages/index.astro
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,31 @@ import MainPage from '@layouts/MainPage.astro';
142
142
],
143
143
id: 'welcome'
144
144
},
145
+
{
146
+
title: 'Features',
147
+
text: 'Shepherd has many built-in features to guide users through your app. You can easily customize the look and feel of your tour by adding your own styles. Also, you can highlight multiple elements at once to draw attention to key areas of your application.',
0 commit comments