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

@lumifyai/widget

v1.1.0

Published

Self-contained AI search widget for any website. Add intelligent search to your site with a single script tag.

Downloads

15

Readme

@lumifyai/widget

A self-contained, zero-config AI search widget for any website. Add intelligent search to your site with a single script tag.

npm version License: MIT

Quick Start

Add this script tag to your website:

<script 
  src="https://www.lumify.ai/api/v1/js/lumify-widget.js"
  data-api-key="YOUR_API_KEY"
  data-app-id="YOUR_APP_ID">
</script>

That's it! A search button will appear in the bottom-right corner of your page.

Installation

CDN (Recommended)

<script src="https://www.lumify.ai/api/v1/js/lumify-widget.js"></script>

npm

npm install @lumifyai/widget

unpkg

<script src="https://unpkg.com/@lumifyai/widget"></script>

jsdelivr

<script src="https://cdn.jsdelivr.net/npm/@lumifyai/widget"></script>

Configuration

All configuration is done via data-* attributes on the script tag:

Required

| Attribute | Description | |-----------|-------------| | data-api-key | Your Lumify API key | | data-app-id | Your application ID |

Display Options

| Attribute | Default | Description | |-----------|---------|-------------| | data-mode | "floating" | "floating" | "inline" | "trigger" | | data-theme | "auto" | "light" | "dark" | "auto" | | data-position | "bottom-right" | "bottom-right" | "bottom-left" | "top-right" | "top-left" | | data-accent-color | "#6366f1" | Any CSS color value | | data-z-index | 9999 | CSS z-index for the widget |

Button Options

| Attribute | Default | Description | |-----------|---------|-------------| | data-button-icon | "search" | "search" | "chat" | "help" | "none" | | data-button-text | "" | Optional text next to the button |

Text Customization

| Attribute | Default | Description | |-----------|---------|-------------| | data-modal-title | "Search" | Title in the modal header | | data-placeholder | "Ask anything..." | Input placeholder text | | data-empty-text | "Ask a question to get started" | Empty state message |

Behavior Options

| Attribute | Default | Description | |-----------|---------|-------------| | data-keyboard-shortcut | "true" | Enable Cmd/Ctrl+K shortcut | | data-show-branding | "true" | Show "Powered by Lumify" footer |

Popular Questions

Show commonly asked questions when users focus on the search input:

| Attribute | Default | Description | |-----------|---------|-------------| | data-popular-questions | "false" | Enable popular questions | | data-popular-questions-max | 5 | Maximum questions to show (1-10) | | data-popular-questions-cache | "localStorage" | "localStorage" | "sessionStorage" | "none" | | data-popular-questions-ttl | 86400 | Cache lifetime in seconds | | data-popular-questions-fallback | [] | JSON array of fallback questions |

Mode-Specific Options

| Attribute | Description | |-----------|-------------| | data-trigger-selector | CSS selector for trigger mode | | data-container-selector | CSS selector for inline mode container |

Examples

Floating Button (Default)

<script 
  src="https://www.lumify.ai/api/v1/js/lumify-widget.js"
  data-api-key="YOUR_API_KEY"
  data-app-id="YOUR_APP_ID">
</script>

Dark Theme with Custom Color

<script 
  src="https://www.lumify.ai/api/v1/js/lumify-widget.js"
  data-api-key="YOUR_API_KEY"
  data-app-id="YOUR_APP_ID"
  data-theme="dark"
  data-accent-color="#10b981">
</script>

Documentation Site

<script 
  src="https://www.lumify.ai/api/v1/js/lumify-widget.js"
  data-api-key="YOUR_API_KEY"
  data-app-id="YOUR_APP_ID"
  data-modal-title="Search Docs"
  data-placeholder="Search documentation..."
  data-empty-text="Type a question to search the docs">
</script>

Trigger Mode (Attach to Existing Button)

<button id="my-search-btn">Search</button>

<script 
  src="https://www.lumify.ai/api/v1/js/lumify-widget.js"
  data-api-key="YOUR_API_KEY"
  data-app-id="YOUR_APP_ID"
  data-mode="trigger"
  data-trigger-selector="#my-search-btn">
</script>

Inline Mode

<div id="search-container"></div>

<script 
  src="https://www.lumify.ai/api/v1/js/lumify-widget.js"
  data-api-key="YOUR_API_KEY"
  data-app-id="YOUR_APP_ID"
  data-mode="inline"
  data-container-selector="#search-container">
</script>

With Popular Questions

<script 
  src="https://www.lumify.ai/api/v1/js/lumify-widget.js"
  data-api-key="YOUR_API_KEY"
  data-app-id="YOUR_APP_ID"
  data-popular-questions="true"
  data-popular-questions-max="5">
</script>

Live Examples

Visit lumify.ai/api/v1/examples to see interactive demos.

Platform Guides

API Reference

For programmatic control, the widget exposes a global LumifyWidget object:

// Open the search modal
LumifyWidget.open();

// Close the search modal
LumifyWidget.close();

// Toggle the search modal
LumifyWidget.toggle();

// Perform a search
LumifyWidget.search('your query');

// Destroy the widget
LumifyWidget.destroy();

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

License

MIT © Lumify

Support