Free
Pro

Gallery Carousel

A flexible and responsive carousel component supporting slides, crossfade transitions, autoplay, and indicators, modeled after the CoreUI Angular Carousel.

free

Slides Only

The simplest way to use the carousel is by passing an array of slide URLs.


HTML

Modular Structure

Use base-carousel-item for more control over slide content.


HTML

Captions

Add rich captions to slides using base-carousel-caption.


HTML

Crossfade & Dark Variant

Enable transition="crossfade" and [dark]="true" for light backgrounds.


HTML

Horizontal Carousel

A responsive, CSS grid-based horizontal carousel that automatically displays multiple items per row.

Example Grid

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7

HTML

Installation

Run the following command to add this component to your project:

bash

npx base-ui-cli add slider

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.

bash

npx -y base-ui-mcp

Base UI provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx base-ui-cli add slider
// Paths are relative to aliases.components (default: src/app/components)
import { CarouselCaptionComponent } from './slider/carousel-caption/carousel-caption.component';
import { CarouselItemComponent } from './slider/carousel-item/carousel-item.component';
import { GallerySliderComponent } from './slider/gallery-slider.component';
import { SliderDirective } from './slider/slider.directive';

@Component({
  selector: 'app-your-component',
  imports: [
    CarouselCaptionComponent,
    CarouselItemComponent,
    GallerySliderComponent,
    SliderDirective
  ],
  template: `...`
})
export class YourComponent {}

API for slider — generated from JSDoc in the library source.

API reference for slider
APIMemberTypeDefaultDescription
base-carousel-captionA caption overlay for a gallery slider or carousel item, typically positioned over the image.
base-carousel-itemclassstring''Additional CSS classes to merge into the host element.
base-carousel-itemintervalnumber-1Optional override for the auto-play interval when this specific slide is active.
base-gallery-slider, base-carouselclassstring''Additional CSS classes to merge into the host element.
base-gallery-slider, base-carouselactiveIndexnumber0The zero-based index of the currently active slide.
base-gallery-slider, base-carouselanimatebooleantrueWhether transitions are animated.
base-gallery-slider, base-carouseldarkbooleanfalseApplies a dark-themed visual overlay/buttons.
base-gallery-slider, base-carouseldirection'next' | 'prev''next'Defines the transition direction explicitly.
base-gallery-slider, base-carouselintervalnumber5000Milliseconds before auto-advancing to the next slide. Set to 0 to disable.
base-gallery-slider, base-carouselpause'hover' | false'hover'Whether to pause autoplay on hover.
base-gallery-slider, base-carouseltouchbooleantrueWhether touch swipe navigation is enabled.
base-gallery-slider, base-carouseltransition'slide' | 'crossfade''slide'The animation transition style.
base-gallery-slider, base-carouselwrapbooleantrueWhether the carousel loops back to the start when reaching the end.
base-gallery-slider, base-carouselslidesstring[][]Optional array of image source URLs for a quick image-only slider.
base-gallery-slider, base-carousel(itemChange)numberEmitted whenever the active slide index changes.
[baseSlider](slideAction)booleanThe slideAction output property.