# Dimensions

- category: API
- chinese: 屏幕参数
- type: API

---

## Usage

Because the weex container does not support height: 100%. When you need to get the `REM` value of the screen width, hegith and set the style, you may be use the Dimensions component.

## API

### Dimensions.get('window/screen')

catch the size of window or screen, default vertical.

```js
//catch width and height of the screen (rem)
let { height, width } = Dimensions.get('window');
```

### Dimensions.getWindowInfo(isLandscape)

When `isLandscape` is true, it returns the width of the screen.

**You need to open the current page under the container screen, otherwise the unpredictable value will appear.**

```js
// Catch width and height in horizontal screen mode
let { height, width } = Dimensions.getWindowInfo(true);
```

## The Other

- Chat with <a href="dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=kjwo3w5">@翊晨[yichen]</a> in Dingtalk desktop App <a href='https://tms.dingtalk.com/markets/dingtalk/download'>Download</a>
- DingTalk Group

<img src="https://img.alicdn.com/tfs/TB101EESpXXXXXFXpXXXXXXXXXX-1122-1362.jpg" width="260" />
