A flexible and responsive carousel component supporting slides, crossfade transitions, autoplay, and indicators, modeled after the CoreUI Angular Carousel.
The simplest way to use the carousel is by passing an array of slide URLs.




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


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

Detailed description content for slide index 0.

Detailed description content for slide index 1.

Detailed description content for slide index 2.

Detailed description content for slide index 3.
Enable transition="crossfade" and [dark]="true" for light backgrounds.

This variant is perfect for light themed backgrounds.

Notice the dark indicators and controls.
A responsive, CSS grid-based horizontal carousel that automatically displays multiple items per row.
Run the following command to add this component to your project:
npx base-ui-cli add slider
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.
npx -y base-ui-mcp
Base UI provides standalone components. Import the exact elements you want to use into your component.
// 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 | Member | Type | Default | Description |
|---|---|---|---|---|
base-carousel-caption | — | — | — | A caption overlay for a gallery slider or carousel item, typically positioned over the image. |
base-carousel-item | class | string | '' | Additional CSS classes to merge into the host element. |
base-carousel-item | interval | number | -1 | Optional override for the auto-play interval when this specific slide is active. |
base-gallery-slider, base-carousel | class | string | '' | Additional CSS classes to merge into the host element. |
base-gallery-slider, base-carousel | activeIndex | number | 0 | The zero-based index of the currently active slide. |
base-gallery-slider, base-carousel | animate | boolean | true | Whether transitions are animated. |
base-gallery-slider, base-carousel | dark | boolean | false | Applies a dark-themed visual overlay/buttons. |
base-gallery-slider, base-carousel | direction | 'next' | 'prev' | 'next' | Defines the transition direction explicitly. |
base-gallery-slider, base-carousel | interval | number | 5000 | Milliseconds before auto-advancing to the next slide. Set to 0 to disable. |
base-gallery-slider, base-carousel | pause | 'hover' | false | 'hover' | Whether to pause autoplay on hover. |
base-gallery-slider, base-carousel | touch | boolean | true | Whether touch swipe navigation is enabled. |
base-gallery-slider, base-carousel | transition | 'slide' | 'crossfade' | 'slide' | The animation transition style. |
base-gallery-slider, base-carousel | wrap | boolean | true | Whether the carousel loops back to the start when reaching the end. |
base-gallery-slider, base-carousel | slides | string[] | [] | Optional array of image source URLs for a quick image-only slider. |
base-gallery-slider, base-carousel | (itemChange) | number | — | Emitted whenever the active slide index changes. |
[baseSlider] | (slideAction) | boolean | — | The slideAction output property. |
Content