---
title: calloutAppearanceAnimationForAnnotation(annotation)
framework: mapkitjs
role: symbol
role_heading: Interface Method
path: mapkitjs/annotationcalloutdelegate/calloutappearanceanimationforannotation
---

# calloutAppearanceAnimationForAnnotation(annotation)

Returns a CSS animation to use when the callout appears.

## Declaration

```data
calloutAppearanceAnimationForAnnotation?(annotation: Annotation): string;
```

## Parameters

- `annotation`: The annotation for the callout.

## Return Value

Return Value This method returns a string that describes the CSS animation to use for the callout appearance, just like the appearanceAnimation property of Annotation.

## Discussion

Discussion To animate a callout, MapKit JS calls this method on the annotation’s callout delegate with the annotation as a parameter. A standard callout (with or without custom content) uses a default animation if the callout doesn’t provide the appearance animation. A callout that uses a custom element can animate only if it provides the appearance animation. The default animation doesn’t apply to callouts with custom elements.

## See Also

### Customizing callout appearance

- [calloutAnchorOffsetForAnnotation(annotation, size)](mapkitjs/annotationcalloutdelegate/calloutanchoroffsetforannotation.md)
- [calloutShouldAppearForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutshouldappearforannotation.md)
- [calloutShouldAnimateForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutshouldanimateforannotation.md)
