# Types
Reference for the AnimationOptions and AssetReferences types used across dotlottie-io's API.

# Types

Shared types used across the `dotlottie-io` API.

## `AnimationOptions`

Passed as the third argument to `addAnimation` on [`DotLottie`](/docs/tools/dotlottie-io/api/dotlottie-class#addanimationid-jsondata-options) and [`DotLottieBuilder`](/docs/tools/dotlottie-io/api/dotlottie-builder-class#adding-content).

```typescript
interface AnimationOptions {
  name?: string; // display name in the manifest
  initialTheme?: string; // ID of the theme applied by default
  background?: string; // background colour hint
  themes?: string[]; // IDs of themes associated with this animation
}
```

V1 playback fields (`autoplay`, `loop`, `speed`, `direction`, `hover`, `intermission`, `themeColor`) are intentionally absent — playback configuration lives in the player, not the file. See [Managing Animations](/docs/tools/dotlottie-io/core-concepts/animations).

## `AssetReferences`

Returned by `assetReferences()` on both [`DotLottie`](/docs/tools/dotlottie-io/api/dotlottie-class#assetreferencesanimationid) and [`DotLottieReader`](/docs/tools/dotlottie-io/api/dotlottie-reader-class#query-methods).

```typescript
interface AssetReferences {
  images: string[];
  fonts: string[];
  audio: string[];
}
```

Filenames are bare basenames (e.g. `"image_0.png"`, `"cartoon.ttf"`), categorized by asset type. See [Querying Relationships](/docs/tools/dotlottie-io/guides/querying-relationships).

Next up: [Errors](/docs/tools/dotlottie-io/api/errors)
