npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flow-chat-widget

v1.1.4

Published

A versatile and user-friendly chat interface that allows seamless communication between users and bots.

Downloads

6

Readme


Flow Chat Widget

Author: Vijay Singh

An amazing, customizable chat widget that integrates easily into any website or web app, with features like voice input, smooth animations, and custom fonts, powered by Tailwind CSS.

Overview

This package provides a lightweight, highly customizable chat widget that can be easily integrated into any web application. It supports voice input using the react-speech library, animations, and transitions for a sleek user experience. Tailwind CSS is used for styling, allowing you to customize the widget's appearance easily.

Key Features:

  • Movable Chat Widget: Users can drag and place the chat widget anywhere on the screen.
  • Voice Input: Includes a microphone feature to input voice messages.
  • Customizable UI: Easily change fonts, colors, and sizes using Tailwind CSS.
  • Responsive Design: The chat widget is fully responsive and looks great on mobile devices.
  • Animations: Smooth transitions and animations are included out of the box.
  • Dark Mode Support: Built-in support for light and dark themes.

Installation

To use the chat widget in your project, follow these steps:

1. Install the package via npm:

npm install Flow-chat-widget

2. Add Tailwind CSS

Ensure Tailwind CSS is set up in your project. If you haven't added Tailwind yet, follow the steps below:

npm install tailwindcss postcss autoprefixer
npx tailwindcss init

Then, configure the files as follows:

  • Add the Tailwind directives in your CSS (e.g., src/styles.css):

    @tailwind base;
    @tailwind components;
    @tailwind utilities;
  • Update your tailwind.config.js to include the necessary paths:

    module.exports = {
      content: [
        './src/**/*.{js,jsx,ts,tsx}',
        './node_modules/flow-chat-widget/**/*.{js,jsx}',
      ],
      theme: {
        extend: {},
      },
      plugins: [],
    };

3. Import the widget in your code:

import ChatWidget from 'flow-chat-widget';
import 'flow-chat-widget/dist/styles.css'; // Tailwind CSS styles

const App = () => (
  <div>
    <ChatWidget />
  </div>
);

export default App;

4. Build Tailwind CSS

Make sure to build your Tailwind CSS if you're using a custom configuration.

npm run build:css

Usage

Here’s how you can use the chat widget in your application:

Basic Example:

import ChatWidget from 'flow-chat-widget';

const App = () => (
  <div>
    <ChatWidget />
  </div>
);

export default App;

Customizing the Widget:

The chat widget allows you to customize its appearance using Tailwind classes. You can modify the widget's styling, layout, and behavior by passing in props.

<ChatWidget
  customFont="font-sans"
  bgColor="bg-blue-500"
  textColor="text-white"
  animation="transition-all ease-in-out duration-300"
/>

Available Props:

| Prop Name | Type | Default | Description | |-------------|----------|-----------------|-----------------------------------------------| | customFont| string | font-sans | Sets the font for the chat widget | | bgColor | string | bg-white | Background color of the chat widget | | textColor | string | text-black | Text color of the chat messages | | animation | string | transition-all| Animation class for opening/closing the widget|


Customization Options

You can modify the appearance of the chat widget by changing the Tailwind classes. Here's how to customize various parts of the widget:

  1. Changing Colors:

    • Update the background or text color using Tailwind’s utility classes.
    <ChatWidget bgColor="bg-purple-600" textColor="text-yellow-300" />
  2. Changing Fonts:

    • You can use any custom font by passing the font class.
    <ChatWidget customFont="font-serif" />
  3. Animations:

    • You can modify the animations by passing custom transition classes.
    <ChatWidget animation="transition-transform duration-500 ease-in-out" />
  4. Voice Input:

    • Voice input is enabled by default. The microphone icon appears next to the send button.
  5. Dark Mode:

    • The widget supports dark mode by default. You can toggle between dark and light modes by setting a class like dark:bg-gray-900.
    <ChatWidget darkMode={true} />

Development

If you want to contribute to the development of this package or make modifications for your own use:

Clone the repository:

git clone https://github.com/vijaysingh1621/flow-chat-widget.git

Install dependencies:

npm install

Build the package:

Run the build script to generate the minified CSS and JavaScript files.

npm run build

Test locally:

You can test your modifications locally by linking the package.

npm link

Then, in your project where you want to test the package:

npm link flow-chat-widget

Author


License

This project is licensed under the MIT License. See the LICENSE file for more information.