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

@coditashq/chizzle-ai

v1.0.0

Published

A generative ai chat bot

Readme

Chat Bot LitElement

Attributes you can pass to the Custom element tag

| AttributeName | Required | Default | Description | |-----------------|----------------|------------------|-------------------------------------------------------------------------------------------------------------| | chat-bot-id | Yes | Empty String | We need this ID for authentication and the chat bot to work. | | chat-bot-name | No | Empty String | You can name your chat bot using this attribute. | | chat-bot-logo | No | Default Bot Logo | You can provide a different logo for the chat bot UI. | | user-name | No | 'User' | You can provide a different name for the user. | | is-modal | No | FALSE | Used for displaying chat bot as a modal or a popup UI. By default the chat bot will be visible as a small popup on the right side of the screen. |

ANGULAR Usage

STEP 1

Install Web Components Polyfills & Our Lit Component with 2 simple commands.

Here we are assuming you have an Angular application already setup.

We will instll the following packages using npm.

npm install --save @webcomponents/webcomponentsjs

npm install --save @coditashq/chizzle-ai

Then you can use the webcomponents-loader.js, which allows loading a minimum polyfill bundle.

STEP 2

Update the Angular Configuration

You can load the polyfills using a <script> tag into the index.html file. However, the Angular way to do it is by adding a new asset and script configurations into >your angular.json file as follows:

"architect": {
 "build": {
   ...
   "options": {
     ...
     "assets": [
       "src/favicon.ico",
       "src/assets",
       {
         "glob": "{*loader.js,bundles/*.js}",
         "input": "node_modules/@webcomponents/webcomponentsjs",
         "output": "node_modules/@webcomponents/webcomponentsjs"
       }
     ],
     "scripts": [
       "node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"
     ]
     ...
   },
   "configurations": {
     ...
   },
     ...
 },
}

Both input and output properties must be relative to the project's root path. The same applies to the script imported.

STEP 3

Add the CUSTOM_ELEMENTS_SCHEMA schema in app.module.ts for our lit component to work in the Angular application.

// app.module.ts

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
 declarations: [AppComponent],
 imports: [BrowserModule, AppRoutingModule],
 providers: [],
 bootstrap: [AppComponent],
 schemas: [CUSTOM_ELEMENTS_SCHEMA], // <-- update the schemas array like this
})
export class AppModule {}

The important part here is to import the CUSTOM_ELEMENTS_SCHEMA from the @angular/core package, and then use it in the schemas property as follows:

STEP 4

Import the Web Component in Angular project

Before using any Web Component in an Angular component, we'll need to make sure to import its definition as follows.

// app.component.ts

import { Component } from '@angular/core';

import '@coditashq/chizzle-ai/dist'; // <-- import the web component

@Component({
 selector: 'corp-root',
 templateUrl: './app.component.html',
 styleUrls: ['./app.component.css'],
})
export class AppComponent {}

Next is the final step.

STEP 5 (Final Step)

Use the Custom Lit Element

The next step is to use custom lit element <chat-bot> as part of any template. In this case, let's use it in our app.component.html file:

<chizzle-ai
 chat-bot-name="Site Assistant"
 user-name="Visitor"
 chat-bot-id="xxxx-xxxx-xxxx-xxxx-xxxx"
 chat-bot-logo="https://cdn.pixabay.com/photo/2012/04/14/16/11/planet-34450_1280.png"
></chizzle-ai>

You should now see the chat bot working once you serve your Angular application.

REACT Usage

STEP 1

Install the following packages with 2 simple npm commands.

The @lit-labs/react package provides utilities to create React wrapper components for web components, and custom hooks from reactive controllers.

npm install @lit-labs/react

npm install --save @coditashq/chizzle-ai

The @lit-labs/react package provides two main exports:

createComponent() creates a React component that wraps an existing web component. The wrapper allows you to set props on the component and add event listeners to the >component like you would any other React component.

useController() lets you use a Lit reactive controller as a React hook.

More info can be found here - https://lit.dev/docs/frameworks/react/

STEP 2

createComponent()

Import React, a custom element class, and createComponent.

import React from 'react';
import { createComponent } from '@lit-labs/react';
import { ChatBot } from "@coditashq/chizzle-ai/dist/chat-bot.js";

const ChizzleAI = createComponent({
 react: React,
 tagName: "chizzle-ai",
 elementClass: ChatBot,
});

Create the wrapper react component as shown above.

STEP 3 (Final Step)

Use the wrapper component

After defining the React wrapper component, you can use it just as you would any other React component.

<ChizzleAI
  chat-bot-name="Site Assistant"
  user-name="Visitor"
  chat-bot-id="xxxx-xxxx-xxxx-xxxx-xxxx"
  chat-bot-logo="https://cdn.pixabay.com/photo/2012/04/14/16/11/planet-34450_1280.png"
/>

You should now see the chat bot working once you serve your React application.