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

@intelli-inc/chat-widget

v1.0.8

Published

The AI website widget for your business website

Readme

@intelli-inc/chat-widget

A drop-in React component that adds an AI-powered chat widget to your website, powered by the Intelli AI assistant.

Installation

npm install @intelli-inc/chat-widget

or

yarn add @intelli-inc/chat-widget

or

pnpm add @intelli-inc/chat-widget

Quick Start

import { IntelliWidget } from '@intelli-inc/chat-widget'

<IntelliWidget assistantId="your_assistant_id_here" />

Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | assistantId | string | Yes | Unique identifier for your Intelli assistant instance |

Framework Guides

Next.js (App Router)

The component ships with the 'use client' directive built in, so it works out of the box in Server Component trees.

On every page (recommended)

Add the widget to your root layout so it appears site-wide:

// app/layout.tsx
import { IntelliWidget } from '@intelli-inc/chat-widget'

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <IntelliWidget assistantId={process.env.NEXT_PUBLIC_ASSISTANT_ID!} />
      </body>
    </html>
  )
}

On a single page only

If you only want the widget on a specific route, add it to that page instead of the layout:

// app/support/page.tsx
import { IntelliWidget } from '@intelli-inc/chat-widget'

export default function SupportPage() {
  return (
    <main>
      <h1>Support</h1>
      <p>Need help? Chat with our AI assistant.</p>
      <IntelliWidget assistantId={process.env.NEXT_PUBLIC_ASSISTANT_ID!} />
    </main>
  )
}

On a group of pages

Wrap the relevant routes in a route group with its own layout:

// app/(with-chat)/layout.tsx
import { IntelliWidget } from '@intelli-inc/chat-widget'

export default function ChatLayout({ children }: { children: React.ReactNode }) {
  return (
    <>
      {children}
      <IntelliWidget assistantId={process.env.NEXT_PUBLIC_ASSISTANT_ID!} />
    </>
  )
}

Any pages inside app/(with-chat)/ will show the widget; pages outside will not.

Environment variable

Create a .env.local file in your project root:

NEXT_PUBLIC_ASSISTANT_ID=your_assistant_id_here

Next.js (Pages Router)

Add the widget to _app.tsx for every page, or to a specific page component for a single page.

Every page:

// pages/_app.tsx
import type { AppProps } from 'next/app'
import { IntelliWidget } from '@intelli-inc/chat-widget'

export default function App({ Component, pageProps }: AppProps) {
  return (
    <>
      <Component {...pageProps} />
      <IntelliWidget assistantId={process.env.NEXT_PUBLIC_ASSISTANT_ID!} />
    </>
  )
}

Single page:

// pages/support.tsx
import { IntelliWidget } from '@intelli-inc/chat-widget'

export default function SupportPage() {
  return (
    <main>
      <h1>Support</h1>
      <IntelliWidget assistantId={process.env.NEXT_PUBLIC_ASSISTANT_ID!} />
    </main>
  )
}

Vite + React

// src/App.tsx
import { IntelliWidget } from '@intelli-inc/chat-widget'

function App() {
  return (
    <>
      {/* your app content */}
      <IntelliWidget assistantId={import.meta.env.VITE_ASSISTANT_ID} />
    </>
  )
}

export default App

Create a .env file:

VITE_ASSISTANT_ID=your_assistant_id_here

Vite requires the VITE_ prefix for environment variables to be exposed to client code.

Create React App

// src/App.tsx
import { IntelliWidget } from '@intelli-inc/chat-widget'

function App() {
  return (
    <>
      {/* your app content */}
      <IntelliWidget assistantId={process.env.REACT_APP_ASSISTANT_ID!} />
    </>
  )
}

export default App

Create a .env file:

REACT_APP_ASSISTANT_ID=your_assistant_id_here

Create React App requires the REACT_APP_ prefix for environment variables.

Plain React (no framework)

import React from 'react'
import ReactDOM from 'react-dom/client'
import { IntelliWidget } from '@intelli-inc/chat-widget'

const root = ReactDOM.createRoot(document.getElementById('root')!)
root.render(
  <React.StrictMode>
    <IntelliWidget assistantId="your_assistant_id_here" />
  </React.StrictMode>
)

Non-React / Plain HTML Usage

If you are not using React, use the createWidgetScripts helper to generate the required HTML script tags:

import { createWidgetScripts } from '@intelli-inc/chat-widget'

const html = createWidgetScripts('your_assistant_id_here')
// Inject `html` into your page's <body>

TypeScript

The package ships with full TypeScript support. You can import the props type directly:

import { IntelliWidget } from '@intelli-inc/chat-widget'
import type { IntelliWidgetProps } from '@intelli-inc/chat-widget'

How It Works

When the component mounts, it dynamically loads the Intelli widget script and initializes the chat interface using your assistantId. The widget appears as a chat button in the corner of your website. The component includes duplicate-script protection, so rendering it multiple times won't cause issues.

Features

  • Drop-in React component with zero configuration
  • Next.js App Router compatible ('use client' included)
  • Duplicate script injection protection
  • TypeScript support with exported prop types
  • Compatible with React 18 and React 19

License

This package is licensed under the MIT License.