igx-carousel

November 19, 2025 ยท View on GitHub

A carousel component is used to browse or navigate through a collection of slides - galleries of images, cards, on-boarding tutorials or page-based interfaces. It can be used as a separate full screen element or inside another component. A walkthrough of how to get started can be found here

API Summary igx-carousel

NameTypeDescription
idstringUnique identifier of the component. If not provided it will be automatically generated.
loopbooleanShould the carousel wrap back to the first slide after it reaches the last. Defaults to true.
pausebooleanShould the carousel stop playing on user interaction. Defaults to true.
intervalnumberThe amount of time in milliseconds between slides transition.
navigationbooleanControls should the carousel render the left/right navigation buttons. Defaults to true.
indicatorsbooleanControls should the carousel render the indicators. Defaults to true.
verticalbooleanControls should the carousel be rendered in vertical alignment. Defaults to false.
gesturesSupportbooleanControls should the gestures should be supported. Defaults to true.
maximumIndicatorsCountnumberThe number of visible indicators. Defaults to 10.
indicatorsOrientationCarouselIndicatorsOrientationControls the orientation of the indicators. Defaults to end.
animationTypeCarouselAnimationTypeControls what animation should be played when slides are changing. Defaults to slide.
totalnumberThe number of slides the carousel currently has.
currentnumberThe index of the slide currently showing.
isPlayingbooleanReturns whether the carousel is paused/playing.
isDestroyedbooleanIf the carousel is destroyed (ngOnDestroy was called)
slideChangedeventEmitted on slide change
slideAddedeventEmitted when a slide is being added to the carousel
slideRemovedeventEmitted whe a slide is being removed from the carousel
carouselPausedeventEmitted when the carousel is pausing.
carouselPlayingeventEmitted when the carousel starts/resumes playing.
play()voidEmits carouselPlaying event and starts the transition between slides.
stop()voidEmits carouselPaused event and stops the transition between slides.
prev()voidSwitches to the previous slide. Emits slideChanged event.
next()voidSwitches to the next slide. Emits slideChanged event.
add(slide: IgxSlide)voidAdds a slide to the carousel. Emits slideAdded event.
remove(slide: IgxSlide)voidRemoves an existing slide from the carousel. Emits slideRemoved event.
get(index: number)IgxSlide or voidReturns the slide with the given index or null.
select(slide: IgxSlide, direction: Direction)voidSwitches to the passed-in slide with a given direction. Emits slideChanged event.
select(index: number, direction: Direction)voidSwitches to slide by index with a given direction. Emits slideChanged event.

Keyboard navigation

  • Navigation buttons
    • Space/Enter key - navigates to the next/previous slide.
  • Indicators
    • ArrowLeft key - navigates to the previous (next in Right-to-Left mode) slide.
    • ArrowRight key - navigates to the next (previous in Right-to-Left mode) slide.
    • Home key - navigates to the first (last in Right-to-Left mode) slide.
    • End key - navigates to the last (first in Right-to-Left mode) slide.

Templates

The IgxCarousel supports templating indicators and navigation buttons

Defining item template:

<igx-carousel #carousel>
        ...
    <ng-template igxCarouselIndicator let-slide>
        <igx-icon *ngIf="slide.active">brightness_7</igx-icon>
        <igx-icon *ngIf="!slide.active">brightness_5</igx-icon>
    </ng-template>
</igx-carousel>

Defining next button template:

<igx-carousel #carousel>
        ...
    <ng-template igxCarouselNextButton let-disabled>
        <button type="button" igxButton="fab" igxRipple="white" [disabled]="disabled">
            <igx-icon>add</igx-icon>
        </button>
    </ng-template>
</igx-carousel>

Defining previous button template:

<igx-carousel #carousel>
        ...
    <ng-template igxCarouselPrevButton let-disabled>
        <button type="button" igxButton="fab" igxRipple="white" [disabled]="disabled">
            <igx-icon>remove</igx-icon>
        </button>
    </ng-template>
</igx-carousel>

API Summary igx-slide

NameTypeDescription
indexnumberThe index of the slide inside the carousel.
directionDirectionThe direction in which the slide should transition. Possibly values are NONE, NEXT, PREV
activebooleanWhether the current slide is active, i.e. the one being currently displayed by the carousel.

Usage

<igx-carousel [interval]="interval" [pause]="shouldPause" [loop]="shouldLoop">
    <igx-slide *ngFor="let slide of slides;" [active]="slide.active">
        <img [src]="slide.image">
    </igx-slide>
</igx-carousel>