> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.crisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to programmatically hide and show the chatbox

*Learn how to hide or show the Crisp chatbox from your website JavaScript.*

You can control Crisp visibility when some pages should not display the chatbox, or when your own interface decides when support should appear.

---

# ${color}[#0080dd](Hide the chatbox)

Use **chat:hide** to make the chatbox invisible on the current page.

```js
$crisp.push(["do", "chat:hide"]);
```

This hides the chatbox but does not permanently change your global chatbox settings.

---

# ${color}[#0080dd](Show the chatbox again)

Use **chat:show** to restore the chatbox visibility.

```js
$crisp.push(["do", "chat:show"]);
```

---

# ${color}[#0080dd](Important behavior)

These actions are runtime controls for the current page. If the visitor navigates to another page, your website may need to apply the same logic again.

For single-page apps, call the method when your route changes if visibility depends on the current route, account state, or user action.

| Read the [$crisp Methods documentation](https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/dollar-crisp/) for more chatbox actions such as **chat:open**, **chat:close**, and **chat:toggle**.