---
name: "Animation.translateY"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "Animation.translateY - 对 Y 轴平移"
---

## Animation.translateY

> [VERSION] Base Library >= 2.21.8

### Description

Translate along the Y axis

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `translateY` | `number` | No | Translation distance on the Y axis, in px |

### Return Value

Type: `Animation`

Animation instance

### Examples

#### Y-axis translation

```ts
Page({
  data: {
    animationData: {},
  },
  onReady() {
    const animation = ty.createAnimation({ duration: 500 });
    animation.translateY(80).step();
    this.setData({ animationData: animation.export() });
  },
});
```
