0.4.9 • Published 7 months ago
@patt-rick/react-quickchat v0.4.9
@patt-rick/react-quickchat
A simple React package to enable customer and client conversations within your app. QuickChat provides a chatbot interface, but all responses are manually handled, making it ideal for businesses that want direct, real-time customer interaction.
Features
- Easy to integrate into any React app
- Customer and client chat interface
- Manual responses for personalized support
- Lightweight and optimized
Installation
Install the package via npm:
npm install @patt-rick/react-quickchator with yarn:
yarn add @patt-rick/react-quickchatUsage
Import and use the QuickChat component in your React app:
import React from 'react';
import { Chat } from '@patt-rick/react-quickchat'
function App() {
return (
<Chat
primaryColor=// any hex color or rgb (optional)
clientDetails={{
clientName: // name of client,
clientId: // any id relating to client,
clientOrgName: // name of organisation of client
}}
adminDetails={{
adminOrgName: // name of admin,
adminOrgId: //admin org id'
}}
/>
);
}Props
| Prop Name | Type | Description |
|---|---|---|
theme | "light" | "dark" | Set the chat UI theme |
position | "bottom-right" | "bottom-left" | Adjust the chat icon position |
onMessageSend | (message: string) => void | Callback when a message is sent |
Styling
You can customize the chat interface using CSS or pass styles as props.
Contributing
Contributions are welcome! Feel free to submit issues and pull requests on GitHub.
License
This project is licensed under the MIT License.