# How to restrict the movement of the Window inside the viewport

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>5.1.0</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® Kendo UI for Vue</td>
	    </tr>
    </tbody>
</table>

## Description

The Kendo UI for Vue Window component can be dragged anywhere on the screen by the end user. How to restrict the end user from dragging it beyond a container viewport?

## Solution

You can achieve that by using the Window position to determine if it is inside the set boundaries of the desired area and to restrict its movement inside them.
In the [onMove](https://www.telerik.com/kendo-vue-ui/components/dialogs/api/windowprops#onmove) event, you can get the left and top CSS positions of the Window component. You can use them to control the left and top positions of the Window, by setting them to state variables at a specific condition, and passing them to the [left](https://www.telerik.com/kendo-vue-ui/components/dialogs/api/windowprops#left) and [top](https://www.telerik.com/kendo-vue-ui/components/dialogs/api/windowprops#top) properties of the Window component.

### Runnable example

To test the following example, drag around the Window:

[Demo Source](https://demos.telerik.com/kendo-vue-ui/knowledge-base/window-restrict-movement-inside-viewport/source.txt)
