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

n8n-pretty-chat

v1.0.2

Published

Drop-in replacement for @n8n/chat with message-style conversation experience inspired by Julian Garnier's work.

Readme

n8n-pretty-chat

Drop-in replacement for @n8n/chat with message-style conversation experience inspired by Julian Garnier's work. Try Demo

alt text

Features

  • 💬 Conversational bubbles - Messages split naturally into chat-friendly chunks
  • ⌨️ Typing indicator - Animated dots between messages with proportional delays
  • 🌙 Dark mode - Automatic system preference detection
  • 📱 Mobile-first - Responsive design optimized for mobile devices
  • 🎨 Customizable - CSS variables for easy theming

Installation

CDN (Quickest)

<link href="https://cdn.jsdelivr.net/npm/n8n-pretty-chat/dist/style.css" rel="stylesheet" />
<script type="module">
  import { createChat } from 'https://cdn.jsdelivr.net/npm/n8n-pretty-chat/dist/chat.es.js';

  createChat({
    webhookUrl: 'YOUR_N8N_WEBHOOK_URL'
  });
</script>

npm

npm install n8n-pretty-chat
import 'n8n-pretty-chat/style.css';
import { createChat } from 'n8n-pretty-chat';

createChat({
  webhookUrl: 'YOUR_N8N_WEBHOOK_URL'
});

Usage

Basic

<!DOCTYPE html>
<html>
<head>
  <link href="https://cdn.jsdelivr.net/npm/n8n-pretty-chat/dist/style.css" rel="stylesheet" />
</head>
<body>
  <div id="n8n-chat" style="height: 100vh;"></div>
  
  <script type="module">
    import { createChat } from 'https://cdn.jsdelivr.net/npm/n8n-pretty-chat/dist/chat.es.js';

    createChat({
      webhookUrl: 'YOUR_N8N_WEBHOOK_URL',
      initialMessages: [
        'Hey there! 👋',
        'How can I help you today?'
      ]
    });
  </script>
</body>
</html>

With Options

const chat = createChat({
  webhookUrl: 'YOUR_N8N_WEBHOOK_URL',
  target: '#my-chat-container',
  mode: 'fullscreen', // or 'window'
  
  initialMessages: [
    'Welcome! 👋',
    'Ask me anything about our services.'
  ],
  
  theme: {
    primaryColor: '#007bff',
    botMessageBackground: '#f0f0f0',
    userMessageBackground: '#007bff',
  },
  
  i18n: {
    inputPlaceholder: 'Ask a question...',
    sendButtonText: 'Send',
    errorMessage: 'Oops! Something went wrong.'
  },
  
  typingIndicator: {
    msPerChar: 25,  // Typing speed
    baseDelay: 400  // Minimum delay
  },
  
  maxBubbleLength: 180,  // Max chars before splitting
  
  metadata: {
    source: 'website',
    page: window.location.pathname
  }
});

// Programmatic control
chat.sendMessage('Hello!');
chat.clear();
chat.destroy();

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | webhookUrl | string | required | Your n8n webhook URL | | target | string | '#n8n-chat' | CSS selector for container | | mode | 'fullscreen' \| 'window' | 'fullscreen' | Display mode | | initialMessages | string[] | ['Hey there! 👋', ...] | Welcome messages | | chatInputKey | string | 'chatInput' | Key for message in webhook payload | | chatSessionKey | string | 'sessionId' | Key for session ID | | loadPreviousSession | boolean | true | Persist session across reloads | | metadata | object | {} | Extra data to send with each message | | theme | ThemeOptions | - | Theme customization | | i18n | I18nOptions | - | Text customization | | typingIndicator | object | {msPerChar: 20, baseDelay: 300} | Typing animation speed | | maxBubbleLength | number | 200 | Max chars per bubble | | enableAnimations | boolean | true | Enable bubble animations |

Theme Options

theme: {
  primaryColor: '#e74266',        // Buttons, user messages
  backgroundColor: '#ffffff',      // Main background
  textColor: '#000000',           // Text color
  botMessageBackground: '#f0f0f0', // Bot bubble background
  userMessageBackground: '#e74266', // User bubble background
  fontFamily: 'system-ui, sans-serif',
  borderRadius: '1.25rem'
}

CSS Variables

You can also customize via CSS:

:root {
  --n8n-chat-primary: #e74266;
  --n8n-chat-bg: #ffffff;
  --n8n-chat-text: #000000;
  --n8n-chat-bot-bg: rgba(206, 206, 206, 0.5);
  --n8n-chat-user-bg: #e74266;
  --n8n-chat-user-text: #ffffff;
  --n8n-chat-border-radius: 1.25rem;
  --n8n-chat-font-family: system-ui, sans-serif;
}

Comparison with @n8n/chat

| Feature | @n8n/chat | n8n-pretty-chat | |---------|-----------|-----------------| | Message splitting | ❌ | ✅ Natural sentence/paragraph splitting | | Typing indicator | ⚠️ Single | ✅ Between each bubble | | Typing delay | ❌ Fixed | ✅ Proportional to message length | | Mobile optimized | ⚠️ Basic | ✅ Mobile-first design |

n8n Workflow Setup

  1. Create a workflow with Chat Trigger node
  2. Add your domain to Allowed Origins (CORS)
  3. Connect to your AI agent (OpenAI, Anthropic, etc.)
  4. Use the webhook URL in createChat()

License

MIT