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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@workfloat/matchat

v0.1.4

Published

MatChat is a lightweight and customizable chat widget

Readme

MatChat - Simple Web Chat Widget

MatChat is a lightweight and customizable chat widget designed for seamless integration into any website. It supports custom themes, real-time messaging, and integration with external APIs or webhook endpoints like nodemation (n8n). Perfect for customer support, user engagement, or AI chatbot implementations.

Quick Start

1. Include CSS/JS

Add these to your HTML's <head>:

<link rel="stylesheet" href="https://cdn.yourdomain.com/matchat.css">
<script src="https://cdn.yourdomain.com/matchat.umd.js"></script>

<div id="chat-container"></div>

<script>
  const chat = new MatChat({
    container: document.getElementById('chat-container'),
    apiUrl: 'YOUR_WEBHOOK_ENDPOINT',
    position: 'bottom-right',
    title: 'Support Chat',
    welcomeMessage: 'Hello! How can we help you today?'
  });
</script>

Advanced Configuration

Webhook Setup Example

const chat = new MatChat({
  apiUrl: 'https://your-n8n-webhook.com/webhook',
  webhookConfig: {
    method: 'POST',
    headers: {
      'X-Custom-Header': 'Chat-Session'
    }
  },
});

2. Vue.js Integration

npm install @workfloat/matchat
// import
import MatChat from 'matchat'

// your other code
  data() {
    return {
      chat: null as MatChat | null,
    }
  },
  mounted() {
    this.chat = new MatChat({
      positionOffset: '20px',
      colors: {
        primary: '#3B82F6',
        text: '#1F2937'
      },
      dimensions: {
        width: '400px',
        messageMaxWidth: '280px'
      }
    });
  },
  beforeUnmount() {
    this.chat.destroy();
  }

Customization Options

| Option | Description | Type | Default | |----------------------|--------------------------------------------------|---------|------------------------------| | position | Widget position (bottom-right, top-left, etc.) | string | bottom-right | | apiUrl | Your webhook endpoint URL | string | - | | webhookConfig | Custom headers/method for webhook | object | {method: 'POST'} | | theme | Color theme (default, modern, serene, etc.) | string | serene | | colors | Custom color palette | object | (See default color settings) | | messageLimit | Character limit per message | number | 500 | | avatarUrl | Chat bot avatar image URL | string | Default avatar | | welcomeMessage | Initial greeting message | string | - | | title | Chat header title text | string | Matcha | | backgroundImage | Background image URL for chat | string | - | | messageBubbleStyle | Custom styling for message bubbles | object | (See default styles) | | dimensions | Custom width/height/sizing | object | (See default sizes) | | onWidgetOpen | Callback when chat opens | function| - | | onWidgetClose | Callback when chat closes | function| - | | onMessageSend | Custom message handler | function| - |

Methods

// Open chat programmatically
chat.openChat();

// Close chat
chat.closeChat();

// Add dynamic message
chat.addMessage('System update: 2pm maintenance', 'bot');

// Destroy instance
chat.destroy();

Event Handlers

new MatChat({
  onWidgetOpen: () => {
    console.log('Chat opened!');
  },
  onWidgetClose: () => {
    console.log('Chat closed!');
  },
  onMessageSend: (userMessage, callback) => {
    // Process message and send response
    callback('Thanks for your message!');
  }
});

Styling & Theming


:root {
    --matchat-primary-color: #6366F1;
    --matchat-primary-dark: #4F46E5;
    --matchat-secondary-color: #F9FAFB;
    --matchat-text-color: #1F2937;
    --matchat-light-text: #6B7280;
    --matchat-border-color: #E5E7EB;
    --matchat-bot-message-bg: #FFFFFF;
    --matchat-primary-rgb: 99, 102, 241;
}