---
name: "movable-area"
mode: "component"
versionRequirements:
  - { name: "Base Library", version: "2.10.0" }
title: "movable-area - Movable area for movable-view"
---

## movable-area

> [VERSION] Base Library >= 2.10.0

### Description

Movable area container, used with movable-view.

### Props

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `scale-area` | `boolean` | No | `false` | When the inner movable-view supports pinch zoom, set this to make the gesture’s active area the entire movable-area |

### Examples

#### Basic usage

*index.tyml*

```xml
// index.tyml
<movable-area style="width:300px;height:300px;">
  <movable-view direction="all" x="0" y="0" style="width:80px;height:80px;">Drag</movable-view>
</movable-area>
```

*index.tyss*

```css
movable-area {
  background-color: #f5f5f5;
}
movable-view {
  background-color: #1989fa;
  color: #fff;
  text-align: center;
  line-height: 80px;
}
```

*index.js*

```javascript
Page({});
```

#### Scaling modes

*index.tyml*

```xml
// index.tyml
<movable-area scale-area style="width:300px;height:300px;">
  <movable-view direction="all" scale scale-min="0.5" scale-max="4" style="width:80px;height:80px;">Zoom</movable-view>
</movable-area>
```

*index.tyss*

```css
movable-area {
  background-color: #f5f5f5;
}
movable-view {
  background-color: #1989fa;
  color: #fff;
  text-align: center;
  line-height: 80px;
}
```

*index.js*

```javascript
Page({});
```
