Widget

This is the reference document for the chatjet.app widget. If you want to learn how to add a chat widget to a website, see the widget tutorial.

Usage Example

<!DOCTYPE html>
<html dir="ltr" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta 
      name="viewport" 
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"
    />
    <title>chatjet.app widget demo</title>
    <script 
      type='module' 
      src='https://unpkg.com/chatjetapp-widget@0.1.0/dist/chatjetapp-widget/chatjetapp-widget.esm.js'>
    </script>
  </head>

  <body style="background-color: #98dbcc">
    <chatjetapp-widget 
      visible="false" 
      bot="demo" 
      team="demo" 
      button-text="Let's Chat">
    </chatjetapp-widget>
  </body>
</html>

Properties and HTML Tag Attributes

PropertyAttributeDescriptionTypeDefault
bot (required)botThe bot slug to connect to.stringundefined
buttonTextbutton-textThe text to display on the button.string"Chat"
expandedexpandedWhether the chat widget is initially expanded.booleanfalse
positionpositionThe initial position of the chat widget on the screen."center" | "left" | "right"'right'
serverserverThe chatjet.app server URLstring'https://chatjet.app'
team (required)teamThe team slug to connect to.stringundefined
visiblevisibleWhether the chat widget is visible on load.booleanfalse

CSS Custom Properties

NameDescription
--button-background-colorButton background color
--button-background-color-hoverButton background color on hover
--button-border-colorButton border color
--button-border-color-hoverButton border color on hover
--button-text-colorButton text color
--button-text-color-hoverButton text color on hover
--chatjetapp-widget-z-indexZ-index of the component

Built with StencilJS.