search results:

    • Standard
    • React
    Pricing Learn Community
    • + D
    • Light
    • Dark
    • System
    logo TW Elements
    • Getting started
      • Quick start
      • Tutorials
      • Design system
      • Local installation
      • Optimization
      • Dark mode
      • Theming
      • Changelog
      • Migrating to v2
      • Internationalization guide
      • Class customization
      • Icons Integration
    • CommercialNew
      • Pricing
      • License
      • Installation
      • Git & repository
      • Premium Support
    • Integrations
      • Angular
      • ASP.NET
      • Django
      • Express
      • Laravel
      • Next
      • Nuxt
      • Qwik
      • React
      • Remix
      • Solid
      • Svelte
      • SvelteKit
      • Vue
    • Content & styles
      • Animations
      • Animations Extended
      • Colors
      • Dividers
      • Figures
      • Headings
      • Hover effects
      • Icons
      • Images
      • Mask
      • Shadows
      • Typography
    • Navigation
      • Breadcrumbs
      • Footer
      • Headers
      • Mega menu
      • Navbar
      • Offcanvas
      • Pagination
      • Pills
      • Scrollspy
      • Sidenav
      • Tabs
    • Components
      • Accordion
      • Alerts
      • Avatar
      • Badges
      • Button group
      • Buttons
      • Cards
      • Carousel
      • Chips
      • Collapse
      • Dropdown
      • Gallery
      • Jumbotron
      • Lightbox
      • Link
      • List group
      • Modal
      • Notifications
      • Paragraphs
      • Placeholders
      • Popconfirm
      • Popover
      • Progress
      • Rating
      • Scroll back to top button
      • Social buttons
      • Spinners
      • Stepper
      • Testimonials
      • Timeline
      • Toast
      • Tooltip
      • Video
      • Video carousel
    • Forms
      • Autocomplete
      • Checkbox
      • Datepicker
      • Datetimepicker
      • File input
      • Form templates
      • Input Group
      • Inputs
      • Login form
      • Multi range slider
      • Radio
      • Range
      • Registration form
      • Search
      • Select
      • Switch
      • Textarea
      • Timepicker
      • Validation
    • Data
      • Charts
      • Charts advanced
      • Datatables
      • Tables
    • Methods
      • Clipboard
      • Infinite scroll
      • Lazy loading
      • Loading management
      • Ripple
      • Scrollbar
      • Smooth scroll
      • Sticky
      • Touch
    • Design Blocks
      • Admin Charts
      • Admin Complex
      • Admin Forms
      • Admin Maps
      • Admin Navigation
      • Admin tables
      • Banners
      • Contact
      • Content
      • CTA
      • FAQ
      • Features
      • Headers
      • Hero / Intro sections
      • Logo clouds
      • Mega menu
      • News
      • Newsletter
      • Pricing
      • Projects
      • Stats
      • Stats admin
      • Team
      • Testimonials
    • Tools
      • Button generator
      • Card generator
      • Flexbox generator
      • Footer generator
      • Form builder
      • Grid generator
      • Icon generator
      • Instagram Filters generator
      • Logo generator
      • Table generator
      • Typography generator
    • Coming Soon
      • Angular
      • Builder
      • Templates
      • Vue
    • Resources
      • Playground
      • YouTube Channel
      • Private FB Group
      • Newsletter
      • UI Design course New
      • UI / UX tips

    Video Carousel / Gallery

    Tailwind CSS Video Carousel / Gallery

    Use responsive video carousel component with helper examples for video carousel, video slider gallery, full page video carousel & more. Open source license.


    Basic example

    The video carousel uses the carousel functionality to make it cycle through different elements.

    Video carousel is useful when you have several videos to show and you have limited space on the page.

    First slide label

    Some representative placeholder content for the first slide.

    Second slide label

    Some representative placeholder content for the second slide.

    Third slide label

    Some representative placeholder content for the third slide.

    • HTML
    • javascript
            
                
          <div
            id="carouselExampleCaptions"
            class="relative"
            data-twe-carousel-init
            data-twe-ride="carousel">
            <div
              class="absolute bottom-0 left-0 right-0 z-[2] mx-[15%] mb-4 flex list-none justify-center p-0"
              data-twe-carousel-indicators>
              <button
                type="button"
                data-twe-target="#carouselExampleCaptions"
                data-twe-slide-to="0"
                data-twe-carousel-active
                class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
                aria-current="true"
                aria-label="Slide 1"></button>
              <button
                type="button"
                data-twe-target="#carouselExampleCaptions"
                data-twe-slide-to="1"
                class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
                aria-label="Slide 2"></button>
              <button
                type="button"
                data-twe-target="#carouselExampleCaptions"
                data-twe-slide-to="2"
                class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
                aria-label="Slide 3"></button>
            </div>
            <div
              class="relative w-full overflow-hidden after:clear-both after:block after:content-['']">
              <div
                class="relative float-left -mr-[100%] hidden w-full !transform-none opacity-0 transition-opacity duration-[600ms] ease-in-out motion-reduce:transition-none"
                data-twe-carousel-fade
                data-twe-carousel-item
                data-twe-carousel-active>
                <video class="w-full" autoplay loop muted>
                  <source
                    src="https://tecdn.b-cdn.net/img/video/Tropical.mp4"
                    type="video/mp4" />
                </video>
                <div
                  class="absolute inset-x-[15%] bottom-5 hidden py-5 text-center text-white md:block">
                  <h5 class="text-xl">First slide label</h5>
                  <p>
                    Some representative placeholder content for the first slide.
                  </p>
                </div>
              </div>
              <div
                class="relative float-left -mr-[100%] hidden w-full !transform-none opacity-0 transition-opacity duration-[600ms] ease-in-out motion-reduce:transition-none"
                data-twe-carousel-fade
                data-twe-carousel-item>
                <video class="w-full" autoplay loop muted>
                  <source
                    src="https://tecdn.b-cdn.net/img/video/forest.mp4"
                    type="video/mp4" />
                </video>
                <div
                  class="absolute inset-x-[15%] bottom-5 hidden py-5 text-center text-white md:block">
                  <h5 class="text-xl">Second slide label</h5>
                  <p>
                    Some representative placeholder content for the second slide.
                  </p>
                </div>
              </div>
              <div
                class="relative float-left -mr-[100%] hidden w-full !transform-none opacity-0 transition-opacity duration-[600ms] ease-in-out motion-reduce:transition-none"
                data-twe-carousel-fade
                data-twe-carousel-item>
                <video class="w-full" autoplay loop muted>
                  <source
                    src="https://tecdn.b-cdn.net/img/video/Agua-natural.mp4"
                    type="video/mp4" />
                </video>
                <div
                  class="absolute inset-x-[15%] bottom-5 hidden py-5 text-center text-white md:block">
                  <h5 class="text-xl">Third slide label</h5>
                  <p>
                    Some representative placeholder content for the third slide.
                  </p>
                </div>
              </div>
            </div>
            <button
              class="absolute bottom-0 left-0 top-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
              type="button"
              data-twe-target="#carouselExampleCaptions"
              data-twe-slide="prev">
              <span class="inline-block h-8 w-8">
                <svg
                  xmlns="http://www.w3.org/2000/svg"
                  fill="none"
                  viewBox="0 0 24 24"
                  stroke-width="1.5"
                  stroke="currentColor"
                  class="h-6 w-6">
                  <path
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    d="M15.75 19.5L8.25 12l7.5-7.5" />
                </svg>
              </span>
              <span
                class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
                >Previous</span
              >
            </button>
            <button
              class="absolute bottom-0 right-0 top-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
              type="button"
              data-twe-target="#carouselExampleCaptions"
              data-twe-slide="next">
              <span class="inline-block h-8 w-8">
                <svg
                  xmlns="http://www.w3.org/2000/svg"
                  fill="none"
                  viewBox="0 0 24 24"
                  stroke-width="1.5"
                  stroke="currentColor"
                  class="h-6 w-6">
                  <path
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    d="M8.25 4.5l7.5 7.5-7.5 7.5" />
                </svg>
              </span>
              <span
                class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
                >Next</span
              >
            </button>
          </div>
          
            
        
            
                
          // Initialization for ES Users
          import {
            Carousel,
            initTWE,
          } from "tw-elements";
          
          initTWE({ Carousel });
          
            
        

    Hey there 👋 we're excited about TW elements and want to see it grow! If you enjoy it, help the project grow by sharing it with your peers. Every share counts, thank you!

    Full page carousel

    Use videos full-page sliders that relate directly to the content to help create a positive first impression, and add CTA elements to navigate the user.

    See live example of the full page carousel here in the snippet.

    Learn TW elements

    Best & free guide of responsive web design
    Start tutorial Read more

    You can place here any content

    And cover it with any mask

    Learn more
    • HTML
    • javascript
            
                
          <div
            id="carouselExampleCaptionsFull"
            class="relative"
            data-twe-carousel-init
            data-twe-ride="carousel">
            <div
              class="absolute inset-x-0 bottom-0 z-[2] mx-[15%] mb-4 flex list-none justify-center p-0"
              data-twe-carousel-indicators>
              <button
                type="button"
                data-twe-target="#carouselExampleCaptionsFull"
                data-twe-slide-to="0"
                data-twe-carousel-active
                class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
                aria-current="true"
                aria-label="Slide 1"></button>
              <button
                type="button"
                data-twe-target="#carouselExampleCaptionsFull"
                data-twe-slide-to="1"
                class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
                aria-label="Slide 2"></button>
              <button
                type="button"
                data-twe-target="#carouselExampleCaptionsFull"
                data-twe-slide-to="2"
                class="mx-[3px] box-content h-[3px] w-[30px] flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-white bg-clip-padding p-0 -indent-[999px] opacity-50 transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none"
                aria-label="Slide 3"></button>
            </div>
            <div
              class="relative w-full overflow-hidden after:clear-both after:block after:content-['']">
              <div
                class="relative float-left -mr-[100%] hidden w-full !transform-none bg-cover bg-center bg-no-repeat opacity-0 transition-opacity duration-[600ms] ease-in-out motion-reduce:transition-none"
                data-twe-carousel-fade
                data-twe-carousel-item
                data-twe-carousel-active>
                <video class="" playsinline autoplay muted loop>
                  <source
                    class=""
                    src="https://tecdn.b-cdn.net/img/video/Lines.mp4"
                    type="video/mp4" />
                </video>
                <div
                  class="absolute bottom-0 left-0 right-0 top-0 h-full w-full overflow-hidden bg-fixed"
                  style="background-color: rgba(0, 0, 0, 0.6)">
                  <div class="flex h-full items-center justify-center">
                    <div class="px-md-0 px-14 text-center text-white">
                      <h2 class="mb-4 text-3xl font-semibold">Learn TW elements</h2>
                      <h5 class="mb-6 text-lg font-semibold">
                        Best & free guide of responsive web design
                      </h5>
                      <div class="md:space-x-2">
                        <a
                          type="button"
                          class="mb-2 inline-block rounded border-2 border-white px-6 py-2 text-xs font-medium uppercase leading-tight text-white transition duration-150 ease-in-out hover:bg-black hover:bg-opacity-5 focus:outline-none focus:ring-0 md:mb-0"
                          href="#!"
                          role="button"
                          data-twe-ripple-init
                          data-twe-ripple-color="light"
                          >Start tutorial</a
                        >
                        <a
                          type="button"
                          class="inline-block rounded border-2 border-white px-6 py-2 text-xs font-medium uppercase leading-tight text-white transition duration-150 ease-in-out hover:bg-black hover:bg-opacity-5 focus:outline-none focus:ring-0"
                          href="#!"
                          role="button"
                          data-twe-ripple-init
                          data-twe-ripple-color="light"
                          >Read more</a
                        >
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <div
                class="relative float-left -mr-[100%] hidden w-full !transform-none bg-cover bg-center bg-no-repeat opacity-0 transition-opacity duration-[600ms] ease-in-out motion-reduce:transition-none"
                data-twe-carousel-fade
                data-twe-carousel-item>
                <video class="" playsinline autoplay muted loop>
                  <source
                    class=""
                    src="https://tecdn.b-cdn.net/img/video/forest.mp4"
                    type="video/mp4" />
                </video>
                <div
                  class="absolute bottom-0 left-0 right-0 top-0 h-full w-full overflow-hidden bg-fixed"
                  style="background-color: rgba(0, 0, 0, 0.3)">
                  <div class="flex h-full items-center justify-center">
                    <div class="px-md-0 px-14 text-center text-white">
                      <h2 class="mb-4 text-3xl font-semibold">
                        You can place here any content
                      </h2>
                    </div>
                  </div>
                </div>
              </div>
              <div
                class="relative float-left -mr-[100%] hidden w-full !transform-none bg-cover bg-center bg-no-repeat opacity-0 transition-opacity duration-[600ms] ease-in-out motion-reduce:transition-none"
                data-twe-carousel-fade
                data-twe-carousel-item>
                <video class="" playsinline autoplay muted loop>
                  <source
                    class=""
                    src="https://tecdn.b-cdn.net/img/video/Tropical.mp4"
                    type="video/mp4" />
                </video>
                <div
                  class="absolute bottom-0 left-0 right-0 top-0 h-full w-full overflow-hidden bg-fixed"
                  style="
                    background: linear-gradient(
                      45deg,
                      rgba(29, 236, 197, 0.7),
                      rgba(91, 14, 214, 0.7) 100%
                    );
                  ">
                  <div class="flex h-full items-center justify-center">
                    <div class="px-md-0 px-14 text-center text-white">
                      <h2 class="mb-4 text-3xl font-semibold">
                        And cover it with any mask
                      </h2>
                      <a
                        type="button"
                        class="inline-block rounded border-2 border-white px-6 py-2 text-xs font-medium uppercase leading-tight text-white transition duration-150 ease-in-out hover:bg-black hover:bg-opacity-5 focus:outline-none focus:ring-0"
                        href="#!"
                        role="button"
                        data-twe-ripple-init
                        data-twe-ripple-color="light"
                        >Learn more</a
                      >
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <button
              class="absolute bottom-0 left-0 top-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
              type="button"
              data-twe-target="#carouselExampleCaptionsFull"
              data-twe-slide="prev">
              <span class="inline-block h-8 w-8">
                <svg
                  xmlns="http://www.w3.org/2000/svg"
                  fill="none"
                  viewBox="0 0 24 24"
                  stroke-width="1.5"
                  stroke="currentColor"
                  class="h-6 w-6">
                  <path
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    d="M15.75 19.5L8.25 12l7.5-7.5" />
                </svg>
              </span>
              <span
                class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
                >Previous</span
              >
            </button>
            <button
              class="absolute bottom-0 right-0 top-0 z-[1] flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-white opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:text-white hover:no-underline hover:opacity-90 hover:outline-none focus:text-white focus:no-underline focus:opacity-90 focus:outline-none motion-reduce:transition-none"
              type="button"
              data-twe-target="#carouselExampleCaptionsFull"
              data-twe-slide="next">
              <span class="inline-block h-8 w-8">
                <svg
                  xmlns="http://www.w3.org/2000/svg"
                  fill="none"
                  viewBox="0 0 24 24"
                  stroke-width="1.5"
                  stroke="currentColor"
                  class="h-6 w-6">
                  <path
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    d="M8.25 4.5l7.5 7.5-7.5 7.5" />
                </svg>
              </span>
              <span
                class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
                >Next</span
              >
            </button>
          </div>
          
            
        
            
                
          // Initialization for ES Users
          import {
            Carousel,
            Ripple,
            initTWE,
          } from "tw-elements";
          
          initTWE({ Carousel, Ripple });
          
            
        

    Related resources

    Tutorials:

    containers fullscreen background image flexbox arbitrary values text spacing masks carousel rounded corners sizing

    Extended Docs:

    animations figures headings images mask footer carousel gallery jumbotron modal video background image background position box sizing center grid items display flex position spacing text bold text size visibility hidden

    Generators and builders:

    Form drag & drop Typography SVG icon Instagram Filters button card table flexbox logo grid footer

    Design System (Figma):

    introduction size matters let it breathe user experience do not start with the roof primary questions secondary questions project personality design system plan the process principles tips and tricks
    • Basic example
    • Full page carousel
    • Related resources
    Get useful tips & free resources directly to your inbox along with exclusive subscriber-only content.
    Join our mailing list now
    © 2024 Copyright: MDBootstrap.com

    Access restricted

    To view this section you must have an active PRO account

    Log in to your account or purchase an TWE subscription if you don't have one.

    Buy TWE PRO