1.3.0 • Published 5 months ago

dm-chat-embed-sandbox v1.3.0

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

Chat Embed

A lightweight, embeddable chat component built with Vite, React, TypeScript, Zustand, React Query, Tailwind CSS, and Axios. This package allows you to easily integrate a chat interface into any website.

Features

  • Real-time chat interface
  • State management with Zustand
  • Data fetching with React Query
  • Styling with Tailwind CSS
  • HTTP requests with Axios
  • Type-safe with TypeScript

Installation

To install the package, run:

npm install dm-chat-embed

or

yarn add dm-chat-embed

Usage

  1. Import the chat component into your project:
import { ChatEmbed } from "dm-chat-embed";
  1. Add the ChatEmbed component to your application:
function App() {
  return (
    <div>
      <h1>Welcome to My Website</h1>
      <ChatEmbed />
    </div>
  );
}
  1. Configure the chat component (optional):
<ChatEmbed apiKey="####" />

Configuration Options

PropTypeDefault ValueDescription
apiKeystring""Generated API key.

Development Setup

  1. Clone the repository:
git clone https://github.com/your-username/dm-chat-embed.git
  1. Install dependencies:
npm install

or

yarn install
  1. Start the development server:
npm run dev

or

yarn dev
  1. Build the project:
npm run build

or

yarn build

Technologies Used

  • Vite: Fast build tool for modern web development.
  • React: JavaScript library for building user interfaces.
  • TypeScript: Adds static typing to JavaScript.
  • Zustand: Lightweight state management library.
  • React Query: Data fetching and caching library.
  • Tailwind CSS: Utility-first CSS framework.
  • Axios: Promise-based HTTP client.