---
url: /reference/items/Indexable/js-api.md
---
# JS API
## Options
### `boundary`
* Type: `string`
* Default: `'clamp'`
Three boundary behaviors are available: `clamp`, `loop`, or `bounce`:
* **`clamp`**: stops when the index reaches `maxIndex`.
* **`loop`**: restarts from the beginning when the index reaches `maxIndex`.
* **`bounce`**: reverses direction and goes backward when the index reaches `maxIndex`.
```html {2}
...
```
### `reverse`
* Type: `boolean`
* Default: `false`
Defines the initial direction of the count.
```html {2}
...
```
### `total`
* Type: `number`
* Default: `0`
Defines the number of items to navigate through. It sets the `length` property, allowing the `Indexable` component to be used standalone without extending it. Subclasses may override the `length` getter to derive it from their content instead.
```html {2}
...
```