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

theloops-widgets

v0.5.2

Published

theloops npm packages

Downloads

1,425

Readme

TheLoops Widget Components

npm version License

A comprehensive React component library for seamlessly integrating TheLoops widgets into your applications. This package provides ready-to-use components for embedding AI-powered widgets with customizable layouts and user information.

📋 Table of Contents

✨ Features

  • 🚀 Easy-to-use React components for TheLoops widgets
  • 🎨 Customizable layout and user information
  • 🔗 Seamless integration with TheLoops workspaces
  • 📦 Lightweight and performant
  • 🔒 Secure token-based authentication
  • 📱 Responsive design support

📦 Prerequisites

  • Node.js (version 14 or higher)
  • npm or yarn package manager
  • React 16.14.0 or higher

🚀 Installation

Install the package using npm:

npm install theloops-widgets

Or using yarn:

yarn add theloops-widgets

🎯 Quick Start

import { AskIframeWidget } from 'theloops-widgets'

function App() {
  return (
    <AskIframeWidget 
      searchKeyword=""
      token="your-token"
      tokenType="JWE"
      userId="user-id"
      userName="User Name"
      userEmail="[email protected]"
      widgetId="your-widget-id"
      tenantId="your-tenant-id"
      width="1000px"
      height="900px"
    />
  )
}

📖 Usage

React Integration

Import the component in your React application:

import { AskIframeWidget } from 'theloops-widgets'

Note: The tokenType prop defaults to "JWE" which is the recommended authentication method. Only change this to "JWT" if your specific use case requires it.

Component Props

The AskIframeWidget component accepts the following required props:

| Prop | Type | Description | | -------------- | ------ | ---------------------------------------------- | | searchKeyword| string | Initial search keyword for the widget | | token | string | Authentication token for TheLoops API | | tokenType | string | Type of token - default is "JWE" (use "JWT" only if specifically required) | | userId | string | Unique identifier for the user | | userName | string | Display name of the user | | userEmail | string | Email address of the user | | widgetId | string | Unique identifier for the widget instance | | tenantId | string | Tenant identifier for multi-tenant setups | | width | string | Width of the widget (e.g., "1000px" or "100%")| | height | string | Height of the widget (e.g., "900px" or "100%")|

Example

Here's a complete example of how to use the AskIframeWidget component:

import React from 'react';
import { AskIframeWidget } from 'theloops-widgets'

function App() {
  return (
    <div className="app-container">
      <h1>My Application</h1>
      <AskIframeWidget 
        searchKeyword=""
        token="your-token"
        tokenType="JWE"
        userId="user-id"
        userName="User Name"
        userEmail="[email protected]"
        widgetId="your-widget-id"
        tenantId="your-tenant-id"
        width="1000px"
        height="900px"
      />
    </div>
  )
}

export default App;

🧩 Available Components

This package exports the following components:

  • AskIframeWidget - Main widget component for embedding TheLoops Ask widget
  • AskIframeWidgetLocal - Local version of the Ask widget for test environment

Import them as needed:

import { 
  AskIframeWidget, 
  AskIframeWidgetLocal,
} from 'theloops-widgets'

💡 Tips

  • Make sure to provide valid credentials and widget IDs from your TheLoops workspace
  • Default tokenType is "JWE" - use this unless you have a specific requirement to use "JWT"
  • Use percentage-based widths and heights for responsive layouts
  • Keep your tokens secure and never commit them to version control

🔧 Support

For issues, questions, or contributions, please contact the package maintainer or visit the repository.

📄 License

This package is licensed under the terms specified in the npm package.


Made with ❤️ by TheLoops team