1.0.0 • Published 4 months ago

smc-chat v1.0.0

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

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

PropertyTypeDefaultDescription
userNamestring'Anonymous'User's display name
theme'light' | 'dark''light'Widget theme
position'left' | 'right''right'Widget position
headerTextstring'Chat Assistant'Header title
welcomeMessagestring'Welcome...'Initial bot message
botNamestring'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