elefant-sdk-chat-widget
v1.0.3
Published
A simple and easy-to-use chat widget component for React applications, built with TypeScript and Vite.
Readme
elefant-sdk-chat-widget
A simple and easy-to-use chat widget component for React applications, built with TypeScript and Vite.
Installation
To install the package, you can use npm or yarn:
npm install elefant-sdk-chat-widgetor
yarn add elefant-sdk-chat-widgetUsage
To use the chat widget in your React application, import the component and its CSS file.
import React from 'react';
import ChatWidget from 'elefant-sdk-chat-widget'; // The main component
import 'elefant-sdk-chat-widget/dist-sdk/chat-widget.css'; // Styles for the widget
function MyApp() {
return (
<div>
{/* Your application content */}
<ChatWidget /> {/* You may need to pass props here depending on the widget's API */}
</div>
);
}
export default MyApp;Props
(Details about available props for the ChatWidget component can be added here as the API is defined.)
Configuration Options
| Option | Type | Required | Description |
|-------------|---------|----------|----------------------------------------------|
| id | string | No | Its purpose is to allow the SDK user to specify the ID of an existing HTML element on their page where they want to display the chat widget. |
| isOpen | boolean | No | Hint to the widget to attempt to open initially. Default: false. |
