diff --git a/demo/components/demos/test/null-page.vue b/demo/components/demos/test/null-page.vue
new file mode 100644
index 0000000..145ace0
--- /dev/null
+++ b/demo/components/demos/test/null-page.vue
@@ -0,0 +1,13 @@
+<
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/components/layout/nav.vue b/demo/components/layout/nav.vue
index fbe9668..380ebef 100644
--- a/demo/components/layout/nav.vue
+++ b/demo/components/layout/nav.vue
@@ -1,6 +1,6 @@
-
+
ul.layout-nav
li(v-for='link in links' :key='link.path')
@@ -10,7 +10,7 @@ ul.layout-nav
-
-
diff --git a/demo/content/test.md b/demo/content/test.md
new file mode 100644
index 0000000..9623a68
--- /dev/null
+++ b/demo/content/test.md
@@ -0,0 +1,17 @@
+---
+title: 'Test'
+---
+
+## Tab capture
+
+When tabbing through the carousel, the focus moves from slide 1 to slide 2, then to the arrows, and finally to the dots. It never reaches slide 3 unless the user interacts with one of the navigation UI elements.
+
+
+
+```vue
+
+
+
+
+
+```
diff --git a/src/concerns/pagination.coffee b/src/concerns/pagination.coffee
index 5b2d268..33666d2 100644
--- a/src/concerns/pagination.coffee
+++ b/src/concerns/pagination.coffee
@@ -133,6 +133,13 @@ export default
then @tweenToX @endX
else @goto @pages - 1
+ # Go to a percentage of the carousel (useful for scrollbars)
+ gotoPercentage: (percentage) ->
+ targetPercentage = Math.max 0, Math.min 100, percentage
+ @targetX = @getXFromPercentage percentage
+ console.log(percentage, @targetX)
+ @startTweening()
+
# Tween to a specific index
tweenToIndex: (index) ->
@targetX = @getXForIndex index
@@ -154,6 +161,17 @@ export default
x += @makeIncompletePageOffset index
return Math.round @applyXBoundaries x
+ # Calculate the X value given a percentage
+ getXFromPercentage: (percentage) ->
+ x = (@measuredTrackWidth - @carouselWidth) * (percentage / 100) * -1
+
+ console.log('width: ', @measuredTrackWidth - @carouselWidth)
+
+ console.log('x: ', x)
+
+
+ return Math.round @applyXBoundaries x
+
# Creates a px value to represent adjustments that should be made to
# account for incommplete pages of slides when looping is enabled. Like
# when there is 3 slotted slides and 2 slides per page and you have looped
diff --git a/src/ssr-carousel-scrollbar.vue b/src/ssr-carousel-scrollbar.vue
new file mode 100644
index 0000000..36c3903
--- /dev/null
+++ b/src/ssr-carousel-scrollbar.vue
@@ -0,0 +1,63 @@
+
+
+
+
+.ssr-carousel-scrollbar
+ .ssr-carousel-bar-container(
+ role='scrollbar'
+ ref='container'
+ @click='onScrollbarClick'
+ )
+ .ssr-carousel-bar(:style='barStyle')
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ssr-carousel.vue b/src/ssr-carousel.vue
index a8e7ca7..93a8dd0 100644
--- a/src/ssr-carousel.vue
+++ b/src/ssr-carousel.vue
@@ -1,6 +1,6 @@
-
+
.ssr-carousel(
v-if='$slots.default && $slots.default.length'
@@ -65,6 +65,13 @@
@goto='gotoDot')
template(#dot='props'): slot(name='dot' v-bind='props')
+ //- Scrollbar navigation
+ ssr-carousel-scrollbar(
+ v-if='showScrollbar'
+ v-bind='{ trackTranslateX, measuredTrackWidth, carouselWidth }'
+ @gotoPercentage='gotoPercentage'
+ )
+
//- Live region, for announcing the current slide position
.ssr-carousel-visually-hidden(aria-live='polite' aria-atomic='true')
| {{ currentSlideMessage }}
@@ -73,11 +80,12 @@
-
-