Dark Themes
Light Themes
Carousel with slides only
Carousel with Indicators
Carousel with captions
							
							
						
Details
Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-interval="".

Name type default description
interval number 5000 The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
keyboard boolean true Whether the carousel should react to keyboard events.
pause string | nullr "hover" If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to null, hovering over the carousel won't pause it.
ride string false Autoplays the carousel after the user manually cycles the first item. If "carousel", autoplays the carousel on load.
wrap boolean true Whether the carousel should cycle continuously or have hard stops.
Methods
Methods Description
.carousel(options)

Initializes the carousel with an optional options object and starts cycling through items.

$('.carousel').carousel({ interval: 2000 })
.carousel('cycle') Cycles through the carousel items from left to right.
.carousel('pause') Stops the carousel from cycling through items.
.carousel(number) Cycles the carousel to a particular frame (0 based, similar to an array).
.carousel('prev') Cycles to the previous item.
.carousel('next') Cycles to the next item.
Events

Bootstrap's carousel class exposes two events for hooking into carousel functionality.

Both events have the following additional properties:

  • direction:The direction in which the carousel is sliding (either "left" or "right").
  • relatedTarget:The DOM element that is being slid into place as the active item.

All carousel events are fired at the carousel itself (i.e. at the <div class="carousel">).

Event Type Description
slide.bs.carousel This event fires immediately when the slide instance method is invoked.
slid.bs.carousel This event is fired when the carousel has completed its slide transition.
$('#myCarousel').on('slide.bs.carousel', function () { // do something… })
Initial active element required

The .active class needs to be added to one of the slides. Otherwise, the carousel will not be visible.

Settings

Customize Theme layout, sidebars, and color schemes. This is for demonstration purpose. All options are available via code.

Fixed Position
Sidebar
Header
Footer
Layout
Amazing sidebars for your smart admin, Get second version of sidebar here.
Color schemes
Dark Themes
Light Themes