0.0.8 • Published 10 months ago

mycheekybot v0.0.8

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

My Cheeky Bot Chatbot Widget

A reusable chatbot component for React/Next.js applications.

Installation

Install the package using npm or yarn:

npm install mycheekybot
# or
yarn add mycheekybot

Usage

Import and use the ChatbotWidget component in your application:

import React from "react";
import { ChatbotWidget } from "mycheekybot";

const MyApp = () => {
  return (
    <div>
      <h1>My Application</h1>
      <div style={{ height: "75vh" }}>
        <ChatbotWidget botId="12345" />
      </div>
    </div>
  );
};

export default MyApp;

Props

The ChatbotWidget component accepts the following props:

  • botId (string): The ID of the bot to be used.

Example with Next.js

Here’s an example of how you can use the ChatbotWidget component in a Next.JS 13+ app. The widget is compatible in both server and client components:

// app/index.js or app/index.tsx
import React from "react";
import { ChatbotWidget } from "mycheekybot";

const HomePage = () => {
  return (
    <div>
      <h1>Welcome to My Next.js App</h1>
      <div style={{ height: "75vh" }}>
        <ChatbotWidget botId="12345" />
      </div>
    </div>
  );
};

export default HomePage;

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago