# certara-carousel



<!-- Auto Generated Below -->


## Overview

A carousel that is unopinionated about the contents of each slide. Compose slides with
`certara-carousel-item` and put any markup inside them.

## Properties

| Property   | Attribute  | Description                                                                                                                                                                                                    | Type     | Default     |
| ---------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| `interval` | `interval` | Milliseconds between automatic advances. Leave unset (or `0`) to disable auto-rotation.  Auto-rotation pauses while the carousel is hovered or focused, and never starts when the user prefers reduced motion. | `number` | `0`         |
| `label`    | `label`    | Accessible name for the carousel. Also names the slide marker list.                                                                                                                                            | `string` | `undefined` |


## Events

| Event                   | Description                                           | Type                                     |
| ----------------------- | ----------------------------------------------------- | ---------------------------------------- |
| `certaraCarouselChange` | Fired when a different slide becomes the current one. | `CustomEvent<CarouselChangeEventDetail>` |


## Methods

### `goTo(index: number) => Promise<boolean>`

Show a specific slide. Slides before the current one animate backwards and slides after it animate forwards.

#### Parameters

| Name    | Type     | Description                           |
| ------- | -------- | ------------------------------------- |
| `index` | `number` | Zero-based index of the slide to show |

#### Returns

Type: `Promise<boolean>`

true when the carousel moved, otherwise false

### `next() => Promise<boolean>`

Show the following slide, wrapping to the first slide from the last.

#### Returns

Type: `Promise<boolean>`

true when the carousel moved, otherwise false

### `prev() => Promise<boolean>`

Show the preceding slide, wrapping to the last slide from the first.

#### Returns

Type: `Promise<boolean>`

true when the carousel moved, otherwise false


## Slots

| Slot | Description                      |
| ---- | -------------------------------- |
|      | `certara-carousel-item` elements |


----------------------------------------------


