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

@hyperlane-xyz/warp-widget

v2.0.0

Published

Embed the Hyperlane Warp bridge widget in any web app

Readme

@hyperlane-xyz/warp-widget

Embed the Hyperlane Warp bridge widget in any web app. This package wraps the hosted Warp UI in an iframe with a simple API for configuration and event handling.

Installation

pnpm add @hyperlane-xyz/warp-widget
# or
npm install @hyperlane-xyz/warp-widget

React Usage

import { HyperlaneWarpWidget } from '@hyperlane-xyz/warp-widget/react';

function App() {
  return (
    <HyperlaneWarpWidget
      config={{
        theme: { accent: '3b82f6', mode: 'dark' },
        defaults: { origin: 'ethereum', destination: 'arbitrum' },
        routes: ['USDC/arbitrum-ethereum'],
      }}
      onEvent={(event) => console.log('Widget event:', event)}
      width="420px"
      height="600px"
    />
  );
}

Vanilla JS Usage

import { createWarpWidget } from '@hyperlane-xyz/warp-widget';

const container = document.getElementById('widget-root');
if (!container) throw new Error('missing #widget-root');

const widget = createWarpWidget({
  container,
  config: {
    theme: { accent: '3b82f6', mode: 'dark' },
    defaults: { origin: 'ethereum', destination: 'base' },
  },
});

widget.on('ready', (payload) => {
  console.log('Widget ready at', payload?.timestamp);
});

// Cleanup
widget.destroy();

Configuration

Theme

Customize the widget appearance. All color values are hex without #.

| Property | Description | Default | | ------------ | ----------------------------------------------- | ----------- | | accent | Primary color (buttons, headers, links) | 9a0dff | | bg | Background color | transparent | | card | Card/surface background | ffffff | | text | Text color | 010101 | | buttonText | Button text color | ffffff | | border | Border color | bfbfbf40 | | error | Error state color | dc2626 | | mode | 'dark' or 'light' — applies preset defaults | light |

Defaults

Pre-select transfer parameters:

| Property | Description | | ------------------ | ------------------------------------------ | | origin | Origin chain name (e.g. 'ethereum') | | destination | Destination chain name (e.g. 'arbitrum') | | originToken | Origin token symbol (e.g. 'USDC') | | destinationToken | Destination token symbol |

Routes

Restrict which warp routes are available:

config: {
  routes: ['ETH/ethereum-arbitrum', 'USDC/ethereum-base'],
}

If omitted, all routes from the nexus registry are shown.

Events

The widget emits events via postMessage. Listen with onEvent (React) or widget.on() (vanilla JS).

| Event | Payload | Description | | ------- | --------------- | -------------------------- | | ready | { timestamp } | Widget loaded and rendered |

API Reference

createWarpWidget(options)

| Option | Type | Default | Description | | ----------- | ------------------ | ----------- | --------------------------- | | container | HTMLElement | required | DOM element to mount into | | config | WarpWidgetConfig | undefined | Theme, defaults, and routes | | width | string | '100%' | Iframe width | | height | string | '600px' | Iframe height |

Returns { iframe, destroy, on }.

<HyperlaneWarpWidget>

| Prop | Type | Default | Description | | ----------- | ------------------ | ----------- | --------------------------- | | config | WarpWidgetConfig | undefined | Theme, defaults, and routes | | onEvent | (event) => void | undefined | Event callback | | width | string | '100%' | Iframe width | | height | string | '600px' | Iframe height | | className | string | undefined | Container CSS class | | style | CSSProperties | undefined | Container inline styles |

License

Apache-2.0