---
title: "JavaScript SDK: Widget control"
description: "Control the widget and start feedback workflows with the Gleap JavaScript SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/418-javascript-sdk-widget-control
collection: "JavaScript"
updated: 2026-11-01
language: en
---

# JavaScript SDK: Widget control

Control the widget and start feedback workflows with the Gleap JavaScript SDK. Follow the integration code examples.

In some situations you might want to take full control over showing or hiding the Gleap widget. This can be achieved with the following methods.

### Open the Gleap widget

```javascript
Gleap.open();
```

### Close the Gleap widget

```javascript
Gleap.close();
```

> **Info:** If you want to reset the route in the widget just add Gleap.close(true);

### Widget open status

It's possible to request the widget open status with the following method.

```javascript
const isOpened = Gleap.isOpened();
```

## Related

- [JavaScript SDK setup](https://docs.gleap.ai/en/articles/393-javascript-sdk-setup.md)
- [JavaScript SDK: Code snippet](https://docs.gleap.ai/en/articles/394-javascript-sdk-code-snippet.md)
- [JavaScript SDK: User identity](https://docs.gleap.ai/en/articles/395-javascript-sdk-user-identity.md)
- [JavaScript SDK: Callbacks](https://docs.gleap.ai/en/articles/396-javascript-sdk-callbacks.md)
- [JavaScript SDK: AI chatbar](https://docs.gleap.ai/en/articles/397-javascript-sdk-ai-chatbar.md)
