---
name: "Animation.right"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "Animation.right - 设置 right 值"
---

## Animation.right

> [VERSION] Base Library >= 2.21.8

### Description

Set right value

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `string \| number` | Yes | right value; if a number is passed, px is used by default |

### Return Value

Type: `Animation`

Animation instance

### Examples

#### Set right

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