1.0.11 • Published 4 months ago

react-chatkit-ai v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

ChatKit JS

A lightweight, easy-to-embed chat component for your website.

Quick Start - CDN Usage

Add ChatKit to your website with a single script tag:

<script src="https://cdn.chatkit.ai/v1/chatkit.min.js"></script>

Initialize ChatKit with your API key:

<div id="chatkit-container"></div>

<script>
  ChatKit.initialize({
    apiKey: "your-api-key",
    element: "#chatkit-container",
  });
</script>

Configuration Options

OptionTypeRequiredDescription
apiKeystringYesYour ChatKit API key
elementstring | HTMLElementNoTarget element to mount the chat (selector or DOM element)

NPM Installation

For more advanced usage, you can install ChatKit via npm:

npm install react-chatkit-ai

Usage with React

import { Chat } from "react-chatkit-ai";

function App() {
  return <Chat apiKey="your-api-key" />;
}

Security Considerations

  • The API key is stored securely in localStorage
  • All communication with ChatKit servers is encrypted
  • API keys are domain-restricted by default

Support

For support, please visit https://chatkit.ai/support or email support@chatkit.ai