Carousel
A slideshow component for cycling through elements like images or cards.
Interactive
Requires:
veritheme.js
JS init: automatic
Default
A simple carousel showing one slide at a time with navigation arrows.
html
<div class="vt-carousel vt-max-w-xl vt-mx-auto" data-vt-carousel="default" data-vt-total="5" role="region" aria-roledescription="carousel" aria-label="Photos">
<div class="vt-carousel-content">
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-prev="" aria-label="Previous slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
<div class="vt-carousel-viewport">
<div class="vt-carousel-track" data-vt-carousel-track="">
<div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="1 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 1</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="2 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 2</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="3 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 3</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="4 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 4</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="5 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 5</figcaption>
</figure>
</div>
</div>
</div>
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-next="" aria-label="Next slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
</div>
</div>
With Indicators
Carousel with dot indicators to show current position.
html
<div class="vt-carousel vt-max-w-xl vt-mx-auto" data-vt-carousel="indicators" data-vt-total="5" role="region" aria-roledescription="carousel" aria-label="Photos">
<div class="vt-carousel-content">
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-prev="" aria-label="Previous slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
<div class="vt-carousel-viewport">
<div class="vt-carousel-track" data-vt-carousel-track="">
<div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="1 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 1</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="2 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 2</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="3 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 3</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="4 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 4</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="5 of 5">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 5</figcaption>
</figure>
</div>
</div>
</div>
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-next="" aria-label="Next slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
</div>
<div class="vt-carousel-dots" data-vt-carousel-dots="">
<button type="button" class="vt-carousel-dot vt-active" data-vt-dot="0" aria-label="Slide 1" aria-current="true"></button><button type="button" class="vt-carousel-dot" data-vt-dot="1" aria-label="Slide 2" aria-current="false"></button><button type="button" class="vt-carousel-dot" data-vt-dot="2" aria-label="Slide 3" aria-current="false"></button><button type="button" class="vt-carousel-dot" data-vt-dot="3" aria-label="Slide 4" aria-current="false"></button><button type="button" class="vt-carousel-dot" data-vt-dot="4" aria-label="Slide 5" aria-current="false"></button>
</div>
</div>
Multiple Slides
Shows multiple slides visible at once in a row.
html
<div class="vt-carousel" data-vt-carousel="multi" data-vt-total="6" data-vt-visible="3" role="region" aria-roledescription="carousel" aria-label="Photos">
<div class="vt-carousel-content">
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-prev="" aria-label="Previous slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
<div class="vt-carousel-viewport">
<div class="vt-carousel-track" data-vt-carousel-track="">
<div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="1 of 6">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 1</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="2 of 6">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 2</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="3 of 6">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 3</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="4 of 6">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 4</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="5 of 6">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 5</figcaption>
</figure>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="6 of 6">
<figure class="vt-media">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<figcaption class="vt-media-caption">Slide 6</figcaption>
</figure>
</div>
</div>
</div>
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-next="" aria-label="Next slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
</div>
</div>
Card Carousel
Carousel of product cards, two at a time.
html
<div class="vt-carousel" data-vt-carousel="cards" data-vt-total="4" data-vt-visible="2" role="region" aria-roledescription="carousel" aria-label="Products">
<div class="vt-carousel-content">
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-prev="" aria-label="Previous slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
<div class="vt-carousel-viewport">
<div class="vt-carousel-track" data-vt-carousel-track="">
<div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="1 of 4">
<div class="vt-card">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<div class="vt-card-body">
<h3 class="vt-card-title">Wireless Headphones</h3>
<p class="vt-card-description">Premium sound with noise cancellation</p>
<p class="vt-label-md">$99.00</p>
</div>
</div>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="2 of 4">
<div class="vt-card">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<div class="vt-card-body">
<h3 class="vt-card-title">Smart Watch</h3>
<p class="vt-card-description">Track your fitness and stay connected</p>
<p class="vt-label-md">$249.00</p>
</div>
</div>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="3 of 4">
<div class="vt-card">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<div class="vt-card-body">
<h3 class="vt-card-title">Bluetooth Speaker</h3>
<p class="vt-card-description">Portable speaker with deep bass</p>
<p class="vt-label-md">$59.00</p>
</div>
</div>
</div><div class="vt-carousel-slide" role="group" aria-roledescription="slide" aria-label="4 of 4">
<div class="vt-card">
<div class="vt-media-frame vt-media-video"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-media-icon" aria-hidden="true">
<circle cx="7.5" cy="7.5" r="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424" stroke="currentColor" stroke-width="1.5"></path>
</svg></div>
<div class="vt-card-body">
<h3 class="vt-card-title">USB-C Hub</h3>
<p class="vt-card-description">7-in-1 multiport adapter</p>
<p class="vt-label-md">$39.00</p>
</div>
</div>
</div>
</div>
</div>
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-next="" aria-label="Next slide"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
</div>
</div>
Testimonial Carousel
Centered testimonial with author info, dots, and the buttons under the slides.
html
<div class="vt-carousel vt-max-w-lg vt-mx-auto" data-vt-carousel="testimonial" data-vt-total="3" role="region" aria-roledescription="carousel" aria-label="Testimonials">
<div class="vt-carousel-viewport">
<div class="vt-carousel-track" data-vt-carousel-track="">
<div class="vt-carousel-slide vt-text-center vt-px-4" role="group" aria-roledescription="slide" aria-label="1 of 3">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-8 vt-h-8 vt-mx-auto vt-mb-4 vt-text-foreground-muted/40" aria-hidden="true">
<path d="M17.9922 5.75C20.2013 5.75 21.9922 7.63509 21.9922 9.96101C21.9922 13.0258 20.5783 15.7433 18.3998 17.4295C17.6167 18.0357 17.2252 18.3387 16.9588 18.2272C16.8775 18.1932 16.8045 18.1362 16.7514 18.0654C16.5774 17.8331 16.8036 17.2896 17.2561 16.2028C17.5006 15.6154 17.6228 15.3217 17.5771 15.0357C17.5587 14.9206 17.5428 14.8689 17.4933 14.7636C17.3704 14.5018 16.8808 14.1853 15.9018 13.5523C14.7562 12.8116 13.9922 11.4802 13.9922 9.96101C13.9922 8.47071 14.7273 7.16135 15.8366 6.41291C16.4587 5.99345 17.1985 5.75 17.9922 5.75Z" stroke="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-width="1.5"></path><path d="M5.99219 5.75C8.20132 5.75 9.99219 7.63509 9.99219 9.96101C9.99219 13.0258 8.57833 15.7433 6.39979 17.4295C5.61672 18.0357 5.22518 18.3387 4.95877 18.2272C4.87752 18.1932 4.80451 18.1362 4.75143 18.0654C4.57737 17.8331 4.8036 17.2896 5.25607 16.2028C5.50059 15.6154 5.62285 15.3217 5.57711 15.0357C5.55871 14.9206 5.54279 14.8689 5.49331 14.7636C5.37036 14.5018 4.88084 14.1853 3.9018 13.5523C2.75622 12.8116 1.99219 11.4802 1.99219 9.96101C1.99219 8.47071 2.72729 7.16135 3.83662 6.41291C4.45869 5.99345 5.19849 5.75 5.99219 5.75Z" stroke="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
<blockquote class="vt-body-lg vt-font-medium vt-mb-6">"This component library has completely transformed our development workflow. The design system is intuitive and beautifully crafted."</blockquote>
<div class="vt-flex vt-items-center vt-justify-center vt-gap-3">
<div class="vt-avatar vt-avatar-md">
<img src="https://i.pravatar.cc/80?img=32" alt="Sarah Johnson" class="vt-w-full vt-h-full vt-object-cover">
</div>
<div class="vt-text-left">
<p class="vt-label-md">Sarah Johnson</p>
<p class="vt-caption vt-text-foreground-muted">Lead Designer at Acme Inc</p>
</div>
</div>
</div><div class="vt-carousel-slide vt-text-center vt-px-4" role="group" aria-roledescription="slide" aria-label="2 of 3">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-8 vt-h-8 vt-mx-auto vt-mb-4 vt-text-foreground-muted/40" aria-hidden="true">
<path d="M17.9922 5.75C20.2013 5.75 21.9922 7.63509 21.9922 9.96101C21.9922 13.0258 20.5783 15.7433 18.3998 17.4295C17.6167 18.0357 17.2252 18.3387 16.9588 18.2272C16.8775 18.1932 16.8045 18.1362 16.7514 18.0654C16.5774 17.8331 16.8036 17.2896 17.2561 16.2028C17.5006 15.6154 17.6228 15.3217 17.5771 15.0357C17.5587 14.9206 17.5428 14.8689 17.4933 14.7636C17.3704 14.5018 16.8808 14.1853 15.9018 13.5523C14.7562 12.8116 13.9922 11.4802 13.9922 9.96101C13.9922 8.47071 14.7273 7.16135 15.8366 6.41291C16.4587 5.99345 17.1985 5.75 17.9922 5.75Z" stroke="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-width="1.5"></path><path d="M5.99219 5.75C8.20132 5.75 9.99219 7.63509 9.99219 9.96101C9.99219 13.0258 8.57833 15.7433 6.39979 17.4295C5.61672 18.0357 5.22518 18.3387 4.95877 18.2272C4.87752 18.1932 4.80451 18.1362 4.75143 18.0654C4.57737 17.8331 4.8036 17.2896 5.25607 16.2028C5.50059 15.6154 5.62285 15.3217 5.57711 15.0357C5.55871 14.9206 5.54279 14.8689 5.49331 14.7636C5.37036 14.5018 4.88084 14.1853 3.9018 13.5523C2.75622 12.8116 1.99219 11.4802 1.99219 9.96101C1.99219 8.47071 2.72729 7.16135 3.83662 6.41291C4.45869 5.99345 5.19849 5.75 5.99219 5.75Z" stroke="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
<blockquote class="vt-body-lg vt-font-medium vt-mb-6">"Incredible attention to detail. Every component works exactly as expected out of the box. Saved us months of work."</blockquote>
<div class="vt-flex vt-items-center vt-justify-center vt-gap-3">
<div class="vt-avatar vt-avatar-md">
<img src="https://i.pravatar.cc/80?img=11" alt="Alex Chen" class="vt-w-full vt-h-full vt-object-cover">
</div>
<div class="vt-text-left">
<p class="vt-label-md">Alex Chen</p>
<p class="vt-caption vt-text-foreground-muted">CTO at StartupXYZ</p>
</div>
</div>
</div><div class="vt-carousel-slide vt-text-center vt-px-4" role="group" aria-roledescription="slide" aria-label="3 of 3">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-8 vt-h-8 vt-mx-auto vt-mb-4 vt-text-foreground-muted/40" aria-hidden="true">
<path d="M17.9922 5.75C20.2013 5.75 21.9922 7.63509 21.9922 9.96101C21.9922 13.0258 20.5783 15.7433 18.3998 17.4295C17.6167 18.0357 17.2252 18.3387 16.9588 18.2272C16.8775 18.1932 16.8045 18.1362 16.7514 18.0654C16.5774 17.8331 16.8036 17.2896 17.2561 16.2028C17.5006 15.6154 17.6228 15.3217 17.5771 15.0357C17.5587 14.9206 17.5428 14.8689 17.4933 14.7636C17.3704 14.5018 16.8808 14.1853 15.9018 13.5523C14.7562 12.8116 13.9922 11.4802 13.9922 9.96101C13.9922 8.47071 14.7273 7.16135 15.8366 6.41291C16.4587 5.99345 17.1985 5.75 17.9922 5.75Z" stroke="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-width="1.5"></path><path d="M5.99219 5.75C8.20132 5.75 9.99219 7.63509 9.99219 9.96101C9.99219 13.0258 8.57833 15.7433 6.39979 17.4295C5.61672 18.0357 5.22518 18.3387 4.95877 18.2272C4.87752 18.1932 4.80451 18.1362 4.75143 18.0654C4.57737 17.8331 4.8036 17.2896 5.25607 16.2028C5.50059 15.6154 5.62285 15.3217 5.57711 15.0357C5.55871 14.9206 5.54279 14.8689 5.49331 14.7636C5.37036 14.5018 4.88084 14.1853 3.9018 13.5523C2.75622 12.8116 1.99219 11.4802 1.99219 9.96101C1.99219 8.47071 2.72729 7.16135 3.83662 6.41291C4.45869 5.99345 5.19849 5.75 5.99219 5.75Z" stroke="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
<blockquote class="vt-body-lg vt-font-medium vt-mb-6">"The best UI kit I've ever used. Clean, consistent, and easy to customize. Our team adopted it in a day."</blockquote>
<div class="vt-flex vt-items-center vt-justify-center vt-gap-3">
<div class="vt-avatar vt-avatar-md">
<img src="https://i.pravatar.cc/80?img=47" alt="Maria Lopez" class="vt-w-full vt-h-full vt-object-cover">
</div>
<div class="vt-text-left">
<p class="vt-label-md">Maria Lopez</p>
<p class="vt-caption vt-text-foreground-muted">Product Manager at Globex</p>
</div>
</div>
</div>
</div>
</div>
<div class="vt-carousel-dots" data-vt-carousel-dots="">
<button type="button" class="vt-carousel-dot vt-active" data-vt-dot="0" aria-label="Testimonial 1" aria-current="true"></button><button type="button" class="vt-carousel-dot" data-vt-dot="1" aria-label="Testimonial 2" aria-current="false"></button><button type="button" class="vt-carousel-dot" data-vt-dot="2" aria-label="Testimonial 3" aria-current="false"></button>
</div>
<div class="vt-carousel-controls">
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-prev="" aria-label="Previous testimonial"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M15 18C15 18 9.00001 13.5811 9 12C8.99999 10.4188 15 6 15 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
<button type="button" class="vt-btn vt-btn-bordered vt-btn-icon vt-btn-sm vt-carousel-nav" data-vt-carousel-next="" aria-label="Next testimonial"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg></button>
</div>
</div>
Guidelines
Anatomy
div.vt-carousel[data-vt-carousel] ← Carousel root (data-vt-total, data-vt-visible)
├── div.vt-carousel-content ← Buttons and the viewport in a row
│ ├── button.vt-btn….vt-carousel-nav[data-vt-carousel-prev] ← Previous
│ ├── div.vt-carousel-viewport ← Clips the track
│ │ └── div.vt-carousel-track[data-vt-carousel-track] ← Moves sideways
│ │ └── div.vt-carousel-slide ← One slide
│ └── button.vt-btn….vt-carousel-nav[data-vt-carousel-next] ← Next
└── div.vt-carousel-dots[data-vt-carousel-dots] ← Dot indicators (optional)
└── button.vt-carousel-dot[data-vt-dot="n"] ← One dot, vt-active when current
API Reference
| Class | Type | Description |
|---|---|---|
vt-carousel |
Base | Root — rows stacked 16px apart; carries data-vt-carousel, data-vt-total and data-vt-visible |
vt-carousel-content |
Part | Row of the previous button, the viewport and the next button, 16px apart |
vt-carousel-viewport |
Part | Takes the rest of the row and clips the track |
vt-carousel-track |
Part | The strip of slides, 16px apart (data-vt-carousel-track); moves on navigation |
vt-carousel-slide |
Part | One slide — the full viewport, or a half / third of it with data-vt-visible="2|3" |
vt-btnvt-btn-borderedvt-btn-iconvt-btn-smvt-carousel-nav |
Part | Previous / next (data-vt-carousel-prev / data-vt-carousel-next) — a round bordered icon button, disabled at either end |
vt-carousel-controls |
Part | Centered row for the buttons when they sit under the slides |
vt-carousel-dots |
Part | Centered row of dots (data-vt-carousel-dots) |
vt-carousel-dot |
Part | One dot, 8px (data-vt-dot="n", aria-label) |
vt-carousel-dotvt-active |
State | The current slide — brand fill, aria-current="true" |
data-vt-total |
Attribute | Number of slides |
data-vt-visible |
Attribute | Slides visible at once: 1 (default), 2 or 3 |
Accessibility
| Feature | Details |
|---|---|
| Role | The root is role="region" with aria-roledescription="carousel" and an aria-label |
| Slides | Each slide is role="group" with aria-roledescription="slide" and a label such as "1 of 5" |
| Controls | Previous / next and every dot carry an aria-label; the buttons are disabled at the ends |
| Auto-play | Provide a pause button if slides rotate on their own, and respect prefers-reduced-motion |