1.0.0 • Published 4 months ago
smc-chat v1.0.0
Stoxkart Chat Widget
A customizable and responsive chat widget that can be integrated into any web project.
Installation
npm install stoxkart-chat-widget
Usage
Basic Integration
<chat-widget user-name="John"></chat-widget>
Custom Configuration
<chat-widget
user-name="John"
theme="dark"
position="left"
header-text="Support Chat"
welcome-message="Hello! How can we help?"
bot-name="Assistant"
></chat-widget>
Properties
Property | Type | Default | Description |
---|---|---|---|
userName | string | 'Anonymous' | User's display name |
theme | 'light' | 'dark' | 'light' | Widget theme |
position | 'left' | 'right' | 'right' | Widget position |
headerText | string | 'Chat Assistant' | Header title |
welcomeMessage | string | 'Welcome...' | Initial bot message |
botName | string | 'Bot' | Bot's display name |
Framework Integration
React
import 'stoxkart-chat-widget';
function App() {
return <chat-widget user-name="User"></chat-widget>;
}
Angular
// app.module.ts
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import 'stoxkart-chat-widget';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
Vue
<template>
<chat-widget :user-name="userName"></chat-widget>
</template>
<script>
import 'stoxkart-chat-widget';
</script>
1.0.0
4 months ago