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 🙏

© 2025 – Pkg Stats / Ryan Hefner

promenade

v2.0.0

Published

A build-agnostic React component for viewing components in isolation.

Readme

Promenade

A build-agnostic React component for viewing components in isolation.

Promenade provides a single React component - Promenade - and some accompanying styles. The aim is to give an isolated display environment for components, comparable to Storybook or Cosmos, without being tied to any particular build infrastructure. You only need to make a basic React app and include the provided styles, running it through whatever build process you're already using.

Usage

Installation

Just add the package as a dependency (typically a devDependency):

npm install -D promenade

Basic usage

Once Promenade is installed, create a page + React app however you normally would. Make sure the page includes the promenade.css stylesheet. Within the React app create a Promenade element, ideally as the root:

const ComponentLibrary = () => (
  <Promenade
    pavilions={[
      ['Hello World', <HelloWorld />],
      [
        'Button',
        <div>
          Click me: <Button onClick={() => console.log('Clicked'!)} />
        </div>,
      ],
    ]}
  />
)

ReactDOM.render(<ComponentLibrary />, document.getElementById('promenade'))

The pavilions prop accepts an array of tuples, each tuple being a name for the pavilion (which must be unique) and an element to render. Each pavilion will have a menu entry for its name, allowing you to select the one to view.

Controls

If a component needs variable props (comparable to Storybook's Knobs addon), you can create a function instead of a static component, which will receive a selectuion of functions for creating named controls.

<Promenade
  pavilions={[
    [
      'With controls',
      ({ bool, str, num }) => (
        <ComponentReceivingProps
          booleanProp={bool('Toggle', false)}
          numericProp={num('Counter', 0)}
          stringyProp={str('Text', 'abc')}
        />
      ),
    ],
  ]}
/>

The control creation functions take a name and a default value, and for each name a control will be created in the Control Panel that appears to the side. In addition to the basic value functions, you can also make use of the group function to form your own groupings of controls: any controls given the same group name will appear in a shared section of the control panel.

<Promenade
  pavilions={[
    [
      'With grouped controls',
      ({ group, str }) => (
        <ComponentReceivingProps
          favourite={group('Dinosaurs').str('Favourite', 'Steggy')}
          allMammals={group('Mammals', ({ str }) => [str('Toothy', 'Sabretooth'), str('Large', 'Mammoth')])}
          allDinosaurs={group('Dinosaurs', ({ str }) => [
            str('Clever', 'Raptor'),
            str('Flying', 'Pterosaur'),
            str('Large', 'Brontosaurus'),
          ])}
        />
      ),
    ],
  ]}
/>

In the above example, there would be two control groups: Dinosaurs and Mammals. Dinosaurs would contain controls for Favourite, Clever, Flying and Large, while Mammals would contain controls for Toothy and Large. If there were any other controls not in groups, they would still appear in the separate ungrouped section.