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

@foomo/contentfultree

v1.0.0

Published

<p align="center"> <img alt="sesamy" src=".github/assets/contentfultree.png"/> </p>

Readme

@foomo/contentfultree

A React component that displays a navigable tree of Contentful entries and their references inside a Contentful App.

Features

  • Recursively loads and displays entry hierarchies from Contentful
  • Expand/collapse child nodes on demand
  • Click-to-edit opens entries in a slide-in panel
  • Publishing status indicators (draft, changed, published)
  • Configurable icon registry with built-in SVG icons
  • Multi-locale support

Installation

pnpm add @foomo/contentfultree

Peer dependencies

| Package | Version | |---------|---------| | react | >= 18 | | @contentful/app-sdk | >= 4 | | contentful-management | >= 12 |

Tailwind CSS setup

This library uses Tailwind CSS utility classes for styling. It does not ship its own CSS — the consumer's Tailwind build generates the styles.

Add the @source directive to your CSS entry point so Tailwind scans the library's output:

@import "tailwindcss";
@source "../node_modules/@foomo/contentfultree/dist";

Usage

import { ContentTree } from '@foomo/contentfultree'

const ContentTreePage = ({ sdkInstance, cma }) => (
  <ContentTree
    sdkInstance={sdkInstance}
    cma={cma}
    rootType="siteRoot"
    nodeContentTypes={['nodes', 'homepages']}
    titleFields={['name', 'title']}
    locales={['de', 'fr', 'en']}
    iconRegistry={{
      siteRoot: 'WORLD',
      contentPage: 'PAGE',
      frontendApp: 'APP',
      shopCategory: 'CART',
      folder: 'FOLDER',
      shortcut: 'SHORTCUT',
      shopBrands: 'LOVE',
    }}
  />
)

Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | sdkInstance | PageAppSDK | Yes | Contentful App SDK instance | | cma | PlainClientAPI | Yes | Contentful Management API client | | rootType | string | Yes | Content type ID of the root entries | | nodeContentTypes | string[] | Yes | Field names that contain child references | | titleFields | string[] | Yes | Field names to use as the display title (first match wins) | | locales | string[] | Yes | Locale codes to support (first is the default) | | indentation | number | No | Base indentation depth in em (default: 1) | | iconRegistry | Record<string, IconId> | No | Maps content type IDs to icon identifiers |

Available icons

WORLD PAGE APP CART FOLDER LOVE SHORTCUT

Entries with content types not in the registry display a default circle icon.

Development

pnpm install
pnpm build       # compile with tsc
pnpm dev         # watch mode
pnpm lint        # biome check
pnpm rebuild     # clean + build

License

Distributed under MIT License, please see license file within the code for more details.

Made with ♥ foomo by bestbytes