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

ngx-prompt-kit

v21.2.0

Published

Angular components for AI chat interfaces. Schematic-based — bring your own Spartan UI.

Readme

ngx-prompt-kit

About

Port of ibelick/prompt-kit to Angular. Components for building AI chat UIs — message threads, prompt input, streaming responses, markdown rendering, code blocks, and more.

Distributed via Angular schematics: ng add and ng generate copy source into your project, where you own and edit the code. No runtime dependency on this package after generation.

Features

  • Schematic-based — Source lands in your project, no version-pinning hell
  • Spartan UI native — Composes with the helm primitives you already use
  • Signal-basedinput(), output(), model(), viewChild() throughout
  • OnPush by default — Every component uses ChangeDetectionStrategy.OnPush
  • SSR-safe — All browser APIs guarded with isPlatformBrowser / afterNextRender
  • Tailwind v4 — Utility-first styling, no CSS-in-JS
  • Accessible — ARIA labels, keyboard navigation, focus management
  • Standalone — No NgModules, just import and use
  • Tree-shakeable — Add only the components you use

Prerequisites

  • Angular 19+ (tested on Angular 21)
  • Tailwind CSS v4
  • Spartan UI installed in your workspace

Installation

ng add ngx-prompt-kit

Configure install path (optional)

ng generate ngx-prompt-kit:init

Prompts for an install path and persists it to components.json under promptKit.componentsPath. Skip this step and components default to libs/prompt-kit.

Add components

ng generate ngx-prompt-kit:message
ng generate ngx-prompt-kit:prompt-input
ng generate ngx-prompt-kit:markdown

Components land at libs/prompt-kit/<name>/ by default. Override per command with --path=<dir> or set a workspace-wide path via ng generate ngx-prompt-kit:init. The cn() utility lands alongside automatically.

Bulk install

Pick from a checklist:

ng generate ngx-prompt-kit:ui

Or skip the prompt:

ng generate ngx-prompt-kit:ui --components=message,prompt-input,markdown

Helm prerequisites must be installed separately via Spartan's CLI:

ng g @spartan-ng/cli:ui

Usage

import { Component, signal } from '@angular/core';
import { PkPromptInputImports } from 'libs/prompt-kit/prompt-input';

@Component({
  selector: 'app-chat',
  imports: [PkPromptInputImports],
  template: `
    <pk-prompt-input [(value)]="value" (submitted)="onSubmit()">
      <pk-prompt-input-textarea placeholder="Ask anything..." />
    </pk-prompt-input>
  `,
})
export class Chat {
  protected readonly value = signal('');
  protected onSubmit(): void {
    console.log('submitted:', this.value());
  }
}

See the live demo for every component with code snippets.

Notes

  • Re-running a component schematic overwrites the existing files. If you've customized them, commit your changes first.
  • You own the generated source — edit freely. Updates to this package won't push changes to your code.
  • image uses Angular's NgOptimizedImage directive when given a real src URL; falls back to a native <img> for base64/blob payloads.
  • cost-display does not bundle model pricing tables — those drift constantly. Pass inputPricePer1M / outputPricePer1M from your own source of truth.

Credit

Original React implementation by Julien Thibeaut (ibelick) — MIT-licensed.

License

MIT