Guides

Open and close the chat

Open the chat from your own buttons with open(), close() and toggle().

Updated October 18, 2026

open() opens the chat, close() closes it and toggle() switches between the two. Every SDK has these three methods.

<!-- Once the chat has loaded, window.zean has its methods --><button type="button" onclick="window.zean.open()">Help</button>

On a website

  • The chat has its own round button, the launcher, bottom right or bottom left as set in App settings > Appearance. Your buttons come in addition to it.
  • With @zean-chat/react and @zean-chat/vue, a call made before the chat has loaded waits until it is ready.
  • With the Install code alone, window.zean.open exists once the chat has loaded. Call it from a click, not when the page loads.

In a React Native app

  • The chat has no floating button: it only opens with open() or toggle().
  • It shows in a modal over your screens, with Expo Router, React Navigation or no navigation.
  • On iPhone, it opens as a sheet the Contact swipes down to close. On Android and iPad, it fills the screen, and Android’s back button closes it.
  • useZean() works in any component, even before ZeanChat has started: the call waits for the chat.

Every method of each SDK is in the reference.