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

@kenzi-wealth/widget

v0.13.2

Published

The Kenzi Widget for smart conversations, AI-enabled analysis and investment intelligence for your investment portfolio.

Downloads

224

Readme

Kenzi Widget

This is the Kenzi widget for smart conversations, AI-enabled analysis and investment intelligence for your investment portfolio.

See more on our website: https://kenziwealth.com/ or reach out for a demo on [email protected].

Requirements

  • React 18 or 19 (react and react-dom)
  • A bundler that supports ES modules (Vite, webpack, esbuild, etc.)

Installation

npm install @kenzi-wealth/widget
yarn add @kenzi-wealth/widget
pnpm add @kenzi-wealth/widget

Quick Start

Render the <Widget /> component anywhere in your app. CSS is bundled and injected automatically — no separate stylesheet import is needed.

import { Widget } from '@kenzi-wealth/widget'

const App = () => <Widget />

This renders the chat prompt input and intelligence card. When a user submits a message, the chat dialog opens with the conversation.

API

<Widget />

The main chat widget. Renders the prompt input, intelligence card, and chat dialog. Place it once in your component tree.

Widget accepts no props. All programmatic control is handled through useKenzi or KenziTrigger.

import { Widget } from '@kenzi-wealth/widget'

const App = () => (
	<main>
		<h1>My App</h1>
		<Widget />
	</main>
)

<KenziTrigger />

A button that opens the chat dialog when clicked. Renders a native <button type="button"> element with no default styling, so it can be styled freely.

Props

| Prop | Type | Default | Description | | ----------- | ----------------------- | -------- | ---------------------------------------------- | | children | JSX.Element \| string | "Chat" | Custom label for the trigger button. | | className | string | — | Optional CSS class name applied to the button. |

Examples

With a custom label:

import { Widget, KenziTrigger } from '@kenzi-wealth/widget'

const App = () => (
	<>
		<KenziTrigger>Ask Kenzi</KenziTrigger>
		<Widget />
	</>
)

With custom styling:

<KenziTrigger className="my-chat-button">
	<img src="/chat-icon.svg" alt="" /> Chat with us
</KenziTrigger>

With no children (renders "Chat" by default):

<KenziTrigger />

useKenzi()

A React hook for programmatic control of the chat widget. Must be called within a component tree that also renders <Widget />.

Return value

type UseKenzi = {
	isOpen: boolean
	open: () => void
	close: () => void
}

| Property | Type | Description | | -------- | ------------ | ----------------------------------------------------------------------- | | isOpen | boolean | Reactive — whether the chat dialog is currently open. | | open | () => void | Opens the chat dialog with a view transition. No-op if already open. | | close | () => void | Closes the chat dialog with a view transition. No-op if already closed. |

Both open and close are stable references (they do not change between renders), so they are safe to pass as props or use in dependency arrays.

Examples

Toggle button:

import { useKenzi } from '@kenzi-wealth/widget'

const ChatToggle = () => {
	const { isOpen, open, close } = useKenzi()

	return (
		<button onClick={isOpen ? close : open}>
			{isOpen ? 'Close chat' : 'Open chat'}
		</button>
	)
}

Open on an external event:

import { useEffect } from 'react'
import { useKenzi } from '@kenzi-wealth/widget'

const AutoOpen = ({ shouldOpen }: { shouldOpen: boolean }) => {
	const { open } = useKenzi()

	useEffect(() => {
		if (shouldOpen) open()
	}, [shouldOpen, open])

	return null
}

Full integration:

import { Widget, KenziTrigger, useKenzi } from '@kenzi-wealth/widget'

const OpenChatButton = () => {
	const { open } = useKenzi()

	return (
		<button type="button" onClick={open}>
			Open programmatically
		</button>
	)
}

const App = () => (
	<>
		<KenziTrigger>Ask Kenzi</KenziTrigger>
		<OpenChatButton />
		<Widget />
	</>
)