---
title: "MarkerCustomAnimationOptions | 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.

# Type Alias MarkerCustomAnimationOptions

MarkerCustomAnimationOptions: [MarkerAnimationBase](https://docs.maptiler.com/sdk-js/api-reference/types/MarkerAnimationBase/) & {  
    custom: (alpha: number, marker: [Marker](https://docs.maptiler.com/sdk-js/api-reference/classes/Marker/)) \=> void;  
    magnitude?: never;  
    preset?: never;  
}

Configures a marker's `enter`/`exit`/`idle` animation via a custom per-frame callback instead of a preset.

#### Type Declaration

-   ##### custom: (alpha: number, marker: [Marker](https://docs.maptiler.com/sdk-js/api-reference/classes/Marker/)) \=> void
    
    Called every frame with the already-eased progress (`0`–`1`, `easing` already applied) and the marker being animated. For `enter`, `0` is the starting (hidden) state and `1` is fully shown; for `exit`, `0` is fully shown and `1` is the end (hidden) state; for `idle`, `alpha` resets to `0` at the start of every loop iteration.
    
-   ##### `Optional`magnitude?: never
    
-   ##### `Optional`preset?: never
