> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.chrisp.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.

---

# Hide the chatbox

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

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

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

---

# Show the chatbox again

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

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

---

# 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****.