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.
Properties
Section titled "Properties"animationType
Section titled "animationType"The animation type.
animationType: HorizontalTransitionAnimation = 'slide' Defined in src/components/carousel/carousel.ts:311
disableLoop
Section titled "disableLoop"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
disablePauseOnInteraction
Section titled "disablePauseOnInteraction"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
hideIndicators
Section titled "hideIndicators"Whether the indicator controls (dots) are hidden.
hideIndicators: boolean = false Defined in src/components/carousel/carousel.ts:227
hideNavigation
Section titled "hideNavigation"Whether the navigation buttons are hidden.
hideNavigation: boolean = false Defined in src/components/carousel/carousel.ts:218
indicatorsOrientation
Section titled "indicatorsOrientation"The position of the indicator controls (dots).
indicatorsOrientation: CarouselIndicatorsOrientation = 'end' Defined in src/components/carousel/carousel.ts:245
interval
Section titled "interval"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
maximumIndicatorsCount
Section titled "maximumIndicatorsCount"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
vertical
Section titled "vertical"Whether the carousel has vertical alignment.
vertical: boolean = false Defined in src/components/carousel/carousel.ts:236
tagName
Section titled "tagName"The tagName read-only property of the Element interface returns the tag name of the element on which it's called.
tagName: "igc-carousel" = 'igc-carousel' Defined in src/components/carousel/carousel.ts:107
Accessors
Section titled "Accessors"current
Section titled "current"The index of the current active slide.
get current(): number Defined in src/components/carousel/carousel.ts:325
Returns number
indicatorsLabelFormat
Section titled "indicatorsLabelFormat"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
isPaused
Section titled "isPaused"Whether the carousel is in paused state.
get isPaused(): boolean Defined in src/components/carousel/carousel.ts:337
Returns boolean
isPlaying
Section titled "isPlaying"Whether the carousel is in playing state.
get isPlaying(): boolean Defined in src/components/carousel/carousel.ts:332
Returns boolean
slides
Section titled "slides"The slides of the carousel.
get slides(): IgcCarouselSlideComponent[] Defined in src/components/carousel/carousel.ts:315
Returns IgcCarouselSlideComponent[]
slidesLabelFormat
Section titled "slidesLabelFormat"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
Section titled "total"Total number of slides.
get total(): number Defined in src/components/carousel/carousel.ts:320
Returns number
Methods
Section titled "Methods"Removes focus from the carousel.
blur(): void Defined in src/components/carousel/carousel.ts:734
Returns void
connectedCallback
Section titled "connectedCallback"connectedCallback(): void Defined in src/components/carousel/carousel.ts:428
Returns void
disconnectedCallback
Section titled "disconnectedCallback"disconnectedCallback(): void Defined in src/components/carousel/carousel.ts:437
Returns void
focus
Section titled "focus"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>
pause
Section titled "pause"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>
select
Section titled "select"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
- slide:
IgcCarouselSlideComponent - animationDirection:
"prev" | "next"