New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

saas-chat-widget

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saas-chat-widget

Embeddable chat widget for SaaS Chat

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

SaaS Chat Widget

A customizable chat widget for integrating SaaS Chat into your website or application.

Installation

NPM

npm install saas-chat-widget

Yarn

yarn add saas-chat-widget

Usage

Basic Usage

<script type="module">
  import SaaSChatWidget from 'saas-chat-widget';
  
  const chatWidget = new SaaSChatWidget({
    apiKey: 'YOUR_API_KEY',
    organization: 'your-organization',
  });
</script>

CDN Usage

<script src="https://unpkg.com/saas-chat-widget/dist/index.umd.js"></script>
<script>
  const chatWidget = new SaaSChatWidget({
    apiKey: 'YOUR_API_KEY',
    organization: 'your-organization',
  });
</script>

Script Tag with Data Attributes

<script 
  src="https://unpkg.com/saas-chat-widget/dist/index.umd.js" 
  data-api-key="YOUR_API_KEY" 
  data-organization="your-organization"
  data-primary-color="#6366f1"
  data-header-text="Chat Support"
></script>

Configuration Options

OptionTypeDefaultDescription
apiKeystringnullYour API key (required)
organizationstringnullYour organization ID or slug (required)
userIdstringauto-generatedCustom user ID for the visitor
userNamestring"Website Visitor"Name of the visitor
userEmailstringnullEmail of the visitor
apiUrlstring"https://api.saas-chat.com"API URL
socketUrlstring"https://api.saas-chat.com"Socket URL
position"right" or "left""right"Position of the widget
primaryColorstring"#6366f1"Primary color for the widget
headerTextstring"Chat Support"Text displayed in the widget header
placeholderstring"Type a message..."Placeholder text for the input field
welcomeMessagestring"Hello! How can we help you today?"Initial message shown to users
autoOpenbooleanfalseAutomatically open the chat widget on page load
debugbooleanfalseEnable debug mode for troubleshooting

Methods

open()

Opens the chat widget.

chatWidget.open();

close()

Closes the chat widget.

chatWidget.close();

destroy()

Removes the chat widget from the DOM and disconnects the socket.

chatWidget.destroy();

License

MIT

Keywords

chat

FAQs

Package last updated on 24 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts