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

@teamco/anthill-layout-embed

v0.11.1

Published

Embed Anthill Layout on any website — React component or script tag

Readme

Publish to NPM

@teamco/anthill-layout-embed

Embed Anthill Layout on any website. Works as a React component or a plain <script> tag.

Install

npm i @teamco/anthill-layout-embed

Usage

React

import { WidgetLayout } from '@teamco/anthill-layout-embed';
import '@teamco/anthill-layout-embed/style.css';

// Load by layout ID
<WidgetLayout layoutId="abc-123" />

// Load from URL
<WidgetLayout layoutUrl="https://cdn.example.com/my-layout.json" />

// Pass layout JSON directly
<WidgetLayout layout={myLayoutData} />

Script tag (no build tools)

<script src="https://unpkg.com/@teamco/anthill-layout-embed/dist/embed.js"></script>

<div data-widget-layout="abc-123"></div>

Or load from a URL:

<div data-widget-layout-url="https://cdn.example.com/my-layout.json"></div>

The script finds all [data-widget-layout] and [data-widget-layout-url] elements and renders them automatically.

Programmatic (vanilla JS)

AntHillLayout.mount(document.getElementById('my-container'), {
  layoutUrl: 'https://cdn.example.com/my-layout.json',
  theme: { colorPrimary: '#1a73e8' },
});

Props

| Prop | HTML attribute | Description | | ----------- | ------------------------ | --------------------------------------------- | | layoutId | data-widget-layout | Layout ID, fetched from API | | layout | -- | Inline layout JSON (React only) | | layoutUrl | data-widget-layout-url | URL to a layout JSON file | | fullPage | data-full-page | Stretch to full viewport | | theme | data-theme | Theme object (JSON string in HTML) | | apiBase | data-api-base | API base URL (optional, defaults to built-in) | | apiKey | data-api-key | API anon key (optional, defaults to built-in) | | onLoad | -- | Callback after layout loads (React only) | | onError | -- | Callback on error (React only) |

Priority when multiple sources are provided: layout > layoutUrl > layoutId.

Theming

Pass a theme object to customize the look:

<WidgetLayout
  layoutId="abc-123"
  theme={{
    colorPrimary: '#1a73e8',
    colorBg: '#ffffff',
    colorText: '#1f1f1f',
    colorBorder: '#e8e8e8',
    fontFamily: 'Inter, sans-serif',
    fontSize: 14,
    borderRadius: 8,
    spacing: 4,
  }}
/>

Or override CSS variables directly:

.al-root {
  --al-color-primary: #1a73e8;
  --al-color-bg: #ffffff;
  --al-font-family: Inter, sans-serif;
}

CSS variables

| Variable | Default | Description | | -------------------- | ----------------- | -------------------- | | --al-color-primary | #1677ff | Primary accent color | | --al-color-bg | #ffffff | Background color | | --al-color-text | #1f1f1f | Text color | | --al-color-border | #e8e8e8 | Border color | | --al-font-family | system font stack | Font family | | --al-font-size | 14px | Base font size | | --al-border-radius | 6px | Border radius | | --al-spacing | 0px | Gap between panels |

Display modes

Container (default) -- fills its parent element. Set width/height on the parent:

<div style="width: 800px; height: 600px;">
  <div data-widget-layout="abc-123"></div>
</div>

Full page -- stretches to the entire viewport:

<WidgetLayout layoutId="abc-123" fullPage />
<div data-widget-layout="abc-123" data-full-page="true"></div>

Bundle sizes

| Build | File | Size (gzip) | React | | ----------------- | ---------------- | ----------- | --------------- | | ESM (npm) | dist/index.mjs | ~3 KB | peer dependency | | IIFE (script tag) | dist/embed.js | ~176 KB | bundled | | CSS | dist/embed.css | ~0.7 KB | -- |

License

MIT