Skip to content

Commit 90902be

Browse files
Add exposed functions documentation
1 parent edd4c0a commit 90902be

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ About images: `width` and `height` define the size in pixels that images in mess
4646
It is recommended to use a particular version (i.e. "webchat-<version>.js") however the file "webchat-latest.js"
4747
is also available and is updated continuously with the latest version.
4848

49+
`WebChat.toggle()`, `WebChat.open()`, and `WebChat.close` can be used to change the state of the chat box to open or closed.
50+
51+
`WebChat.show()` and `WebChat.hide()` can be used to show or hide the entire chat widget.
52+
53+
`WebChat.isOpen()` and `WebChat.isVisible()` can be used to get the open state of the chat box and the visibility state of the entire widget.
54+
4955
#### As a React component
5056

5157
Install the package from GitHub by running:
@@ -64,7 +70,7 @@ function CustomWidget = () => {
6470
interval={2000}
6571
initPayload={"/get_started"}
6672
socketUrl={"http://localhost:5500"}
67-
socketPath={"/socket.io/"}
73+
socketPath={"/socket.io/"}
6874
title={"Title"}
6975
embedded={true}
7076
params={

0 commit comments

Comments
 (0)