templUI Pro coming soon  

50% OFF Join Waitlist

Carousel

Interactive slideshow for cycling through a series of content.

Source
TailwindCSS
Vanilla JS

Installation

  1. Install the component

    templui add carousel
  2. Add the JavaScript to your layout

    @carousel.Script()
    

    Call this template in your base layout file (e.g., in the <head> section).

Examples

Autoplay

Minimal

With Images

API Reference

Required parameter
Hover for description

Content

Container for carousel slides with smooth transitions.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-

Item

Individual carousel slide container.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-

Indicators

Dot indicators showing current slide position and allowing direct navigation.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
Count
int
-