Carousel
Interactive slideshow for cycling through a series of content.
Slide 1
This is the first slide
Slide 2
This is the second slide
Slide 3
This is the third slide
Installation
Install the component
templui add carouselAdd the JavaScript to your layout
@carousel.Script()Call this template in your base layout file (e.g., in the <head> section).
API Reference
Carousel
Main carousel container component for interactive slideshows.
| Name | Type | Default |
|---|---|---|
Unique identifier for the carousel element. | | - |
Additional CSS classes to apply to the carousel. | | - |
Additional HTML attributes to apply to the carousel element. | | - |
Whether the carousel should automatically advance slides. | | |
Time in milliseconds between automatic slide transitions. | | |
Whether the carousel should loop back to the first slide after the last. | | |
Content
Container for carousel slides with smooth transitions.
| Name | Type | Default |
|---|---|---|
Unique identifier for the content element. | | - |
Additional CSS classes to apply to the content. | | - |
Additional HTML attributes to apply to the content element. | | - |
Item
Individual carousel slide container.
| Name | Type | Default |
|---|---|---|
Unique identifier for the item element. | | - |
Additional CSS classes to apply to the item. | | - |
Additional HTML attributes to apply to the item element. | | - |
Previous
Navigation button to go to the previous slide.
| Name | Type | Default |
|---|---|---|
Unique identifier for the previous button element. | | - |
Additional CSS classes to apply to the previous button. | | - |
Additional HTML attributes to apply to the previous button element. | | - |
Next
Navigation button to go to the next slide.
| Name | Type | Default |
|---|---|---|
Unique identifier for the next button element. | | - |
Additional CSS classes to apply to the next button. | | - |
Additional HTML attributes to apply to the next button element. | | - |
Indicators
Dot indicators showing current slide position and allowing direct navigation.
| Name | Type | Default |
|---|---|---|
Unique identifier for the indicators element. | | - |
Additional CSS classes to apply to the indicators. | | - |
Additional HTML attributes to apply to the indicators element. | | - |
Number of indicator dots to display (should match number of slides). | | - |