0.1.48 • Published 3 years ago

@namiq/chat-widget v0.1.48

Weekly downloads
896
License
-
Repository
-
Last release
3 years ago

NamiQ Chat Widget

Use to embed NamiQ chat widget to your web site.

  1. Installation

    npm install @namiq/chat-widget --save or yarn add @namiq/chat-widget

  2. Usage

  • Import
    import NamiQChatWidget from '@namiq/chat-widget';
  • Insert to HTML
    <div id="chat-widget"></div>
  • Init widget
    NamiQChatWidget.init({
      selector: '#chat-widget',
      socketUrl: '<YOUR_SOCKET_URL>',
    } as any);
    Important Chat widget only work in client side. If you are using server sider rendering (SSR) please wrap widget to forece it render in client side.
  1. Options
Props/paramsDefault valueDescription
selectorundefinedWhere chat widget will be render.
initPayloadundefinedPayload sent to server when conversation starts
socketUrlundefinedSocket URL
apiKeyundefinedRequest API key
socketPath/socket.ioSocket Path
showCloseButtontrueShow close button in header
showFullScreenButtonfalseShow full screen button in header
hideWhenNotConnectedtrueHide widget when server is not available
languageenWidget text language (not bot language)
defaultProductID-1Product ID send to server when conversation starts
logoUrlNamiQ Logo URLLogo URL
mainColor#3366ffPrimary color
conversationBackgroundColor#ffffffBackground of conversation area
userTextColor#FBFBFFColor of message from user
userBackgroundColor#6F54FFBackground of message from user
assistTextColor#0D0054Color of message from bot or agent
assistBackgroundColor#EDEAFFBackground of message from bot or agent
MethodParamsDescription
openChatNoneOpen Chat widget programmatic.
closeChatNoneClose Chat widget programmatic.
toggleChatNoneToggle Chat widget programmatic.
hideChatNoneHide Chat widget programmatic.
toggleInputDisabledNoneToggle Disable Chat Input programmatic.
showChatNoneShow Chat widget programmatic.
setProductIdidUpdate Product ID value.
openBannerhtmlOpen widget banner by provide a HTML string or plaintext.

#Login Object:

{
  "consumerName": "User full name",
  "consumerPhone": "User Phone",
  "consumerEmail": "User Email"
}
0.1.46

3 years ago

0.1.47

3 years ago

0.1.48

3 years ago

0.1.45

3 years ago

0.1.43

3 years ago

0.1.44

3 years ago

0.1.41

3 years ago

0.1.42

3 years ago

0.1.40

3 years ago

0.1.39

3 years ago

0.1.38

3 years ago

0.1.37

3 years ago

0.1.31

3 years ago

0.1.32

3 years ago

0.1.33

3 years ago

0.1.34

3 years ago

0.1.35

3 years ago

0.1.36

3 years ago

0.1.30

3 years ago

0.1.27

3 years ago

0.1.28

3 years ago

0.1.29

3 years ago

0.1.25

3 years ago

0.1.26

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.20

3 years ago

0.1.21

3 years ago

0.1.22

3 years ago

0.1.23

3 years ago

0.1.24

3 years ago

0.1.16

3 years ago

0.1.17

3 years ago

0.1.18

3 years ago

0.1.19

3 years ago

0.1.12

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.6

3 years ago

0.1.4

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.1.0

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.32

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.29

3 years ago

0.0.28

3 years ago

0.0.25

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago