---
title: "AnimationTimeline | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface AnimationTimeline

The **`AnimationTimeline`** interface of the Web Animations API represents the timeline of an animation. This interface exists to define timeline features, inherited by other timeline types:

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline)

interface AnimationTimeline {  
    [currentTime](#currenttime): [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null;  
    [duration](#duration): [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.AnimationTimeline))

-   AnimationTimeline
    -   [DocumentTimeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DocumentTimeline/)

##### Index

### Properties[](#properties)

[currentTime](#currenttime) [duration](#duration)

## Properties[](#properties-1)

### `Readonly`currentTime[](#currenttime)

currentTime: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null

The **`currentTime`** read-only property of the Web Animations API's AnimationTimeline interface returns the timeline's current time in milliseconds, or null if the timeline is inactive.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/currentTime)

### `Readonly`duration[](#duration)

duration: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/) | null

The **`duration`** read-only property of the Web Animations API's AnimationTimeline interface returns the maximum value for this timeline or null.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationTimeline/duration)
