The carousel presents a set of slides by sequentially displaying a subset of one or more.

Element
igc-carousel
Slots
default — The slides of the carousel.
indicator — Renders the custom indicators of the carousel. An indicator element sets this slot itself.
previous-button — Renders content inside the previous button.
next-button — Renders content inside the next button.
CSS Parts
navigation — The wrapper container of each carousel navigation button.
previous — The wrapper container of the carousel previous navigation button.
next — The wrapper container of the carousel next navigation button.
dot — The carousel dot indicator container.
active — The carousel active dot indicator container.
label — The label container of the carousel indicators.
indicators — The wrapper of the indicators, or of the label that replaces them.
start — The wrapping container of all carousel indicators when indicators-orientation is set to start.
indicator — Added to the two state wrappers of each default dot indicator, with `active` or `inactive`.
inactive — The wrapper of the inactive state of each default dot indicator.

The animation type.

animationType: HorizontalTransitionAnimation = 'slide'

Defined in src/components/carousel/carousel.ts:311

Whether the carousel stops at the first and the last slide instead of looping.

disableLoop: boolean = false

Defined in src/components/carousel/carousel.ts:195

Whether the carousel keeps playing when the user hovers over it or moves the focus into it.

disablePauseOnInteraction: boolean = false

Defined in src/components/carousel/carousel.ts:209

Whether the indicator controls (dots) are hidden.

hideIndicators: boolean = false

Defined in src/components/carousel/carousel.ts:227

Whether the navigation buttons are hidden.

hideNavigation: boolean = false

Defined in src/components/carousel/carousel.ts:218

The position of the indicator controls (dots).

indicatorsOrientation: CarouselIndicatorsOrientation = 'end'

Defined in src/components/carousel/carousel.ts:245

The duration in milliseconds between changing the active slide. A positive value starts the automatic rotation.

interval: number | undefined

Defined in src/components/carousel/carousel.ts:292

The maximum number of indicator controls (dots) that can be shown. With more slides, a label shows instead of the dots.

maximumIndicatorsCount: number = 10

Defined in src/components/carousel/carousel.ts:302

Whether the carousel has vertical alignment.

vertical: boolean = false

Defined in src/components/carousel/carousel.ts:236

The tagName read-only property of the Element interface returns the tag name of the element on which it's called.

MDN Reference

tagName: "igc-carousel" = 'igc-carousel'

Defined in src/components/carousel/carousel.ts:107

The index of the current active slide.

get current(): number

Defined in src/components/carousel/carousel.ts:325

Returns number

get indicatorsLabelFormat(): any

Defined in src/components/carousel/carousel.ts:254

The format of the aria-label of the carousel indicators. Each {0} changes to the number of the corresponding slide.

set indicatorsLabelFormat(value: string): void

Defined in src/components/carousel/carousel.ts:254

Parameters

  • value: string

Returns void

Whether the carousel is in paused state.

get isPaused(): boolean

Defined in src/components/carousel/carousel.ts:337

Returns boolean

Whether the carousel is in playing state.

get isPlaying(): boolean

Defined in src/components/carousel/carousel.ts:332

Returns boolean

The slides of the carousel.

get slides(): IgcCarouselSlideComponent[]

Defined in src/components/carousel/carousel.ts:315

Returns IgcCarouselSlideComponent[]

get slidesLabelFormat(): any

Defined in src/components/carousel/carousel.ts:274

The format of the aria-label of the carousel slides, and of the label that shows when the number of slides is greater than maximumIndicatorsCount. Each {0} changes to the number of the slide, and each {1} to the total number of slides.

set slidesLabelFormat(value: string): void

Defined in src/components/carousel/carousel.ts:274

Parameters

  • value: string

Returns void

Total number of slides.

get total(): number

Defined in src/components/carousel/carousel.ts:320

Returns number

Removes focus from the carousel.

blur(): void

Defined in src/components/carousel/carousel.ts:734

Returns void

connectedCallback(): void

Defined in src/components/carousel/carousel.ts:428

Returns void

disconnectedCallback(): void

Defined in src/components/carousel/carousel.ts:437

Returns void

Sets focus on the carousel.

focus(options: FocusOptions): void

Defined in src/components/carousel/carousel.ts:727

Parameters

  • options: FocusOptions

Returns void

Switches to the next slide, runs any animations, and returns whether the operation was successful.

next(): Promise<boolean>

Defined in src/components/carousel/carousel.ts:760

Returns Promise<boolean>

Pauses the rotation of the carousel slides.

pause(): void

Defined in src/components/carousel/carousel.ts:751

Returns void

Resumes playing of the carousel slides.

play(): void

Defined in src/components/carousel/carousel.ts:742

Returns void

Switches to the previous slide, runs any animations, and returns whether the operation was successful.

prev(): Promise<boolean>

Defined in src/components/carousel/carousel.ts:773

Returns Promise<boolean>

Switches to the passed-in slide, runs any animations, and returns whether the operation was successful.

select(slide: IgcCarouselSlideComponent, animationDirection: "prev" | "next"): Promise<boolean>

Defined in src/components/carousel/carousel.ts:787

Parameters

Returns Promise<boolean>