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

@hardlydifficult/storybook-components

v0.0.37

Published

Opinionated React components for internal tools. The goal is expressive client code, not maximum flexibility.

Readme

@hardlydifficult/storybook-components

Opinionated React components for internal tools. The goal is expressive client code, not maximum flexibility.

Installation

npm install @hardlydifficult/storybook-components

Design Principles

  • Layout components use the same header vocabulary: title, description, actions.
  • Tables are row-first. If rows already look like table data, they should render without extra wiring.
  • Defaults should match the obvious case. Extra props exist to clarify intent, not to make every decision configurable.

Quick Start

import {
  Badge,
  Button,
  DataTable,
  Page,
  Section,
  Stack,
} from "@hardlydifficult/storybook-components";

const team = [
  { id: "1", name: "Alice", role: "Engineer", status: "Active" },
  { id: "2", name: "Bob", role: "Designer", status: "Away" },
];

export function Example() {
  return (
    <Page
      title="Team"
      description="The page shell handles spacing and header layout."
      actions={<Button size="sm">Invite</Button>}
    >
      <Stack gap="md">
        <Section
          title="Members"
          description="`Section` uses the same header prop names as `Page`."
        >
          <DataTable
            rows={team}
            columns={[
              "name",
              "role",
              {
                key: "status",
                cell: (member) => (
                  <Badge
                    variant={member.status === "Active" ? "success" : "default"}
                  >
                    {String(member.status)}
                  </Badge>
                ),
              },
            ]}
          />
        </Section>
      </Stack>
    </Page>
  );
}

Components

Page

Use Page for the outer app shell.

<Page
  title="Deployments"
  description="Recent production activity"
  actions={<Button size="sm">Ship</Button>}
>
  {content}
</Page>

Section

Use Section to group related content inside a page.

<Section
  title="Queue"
  description="Last 30 minutes"
  actions={
    <Button variant="ghost" size="sm">
      Refresh
    </Button>
  }
>
  {content}
</Section>

DataTable

DataTable assumes rows have an id. Columns are optional:

  • Omit columns to infer them from the first row.
  • Use string keys for straightforward columns.
  • Use { key, label?, cell? } when one column needs custom rendering.
  • Selection callbacks return the selected rows, not just their ids.
<DataTable rows={rows} />

<DataTable
  rows={rows}
  columns={[
    "name",
    "role",
    { key: "status", cell: (row) => <Badge>{String(row.status)}</Badge> },
  ]}
  selectable
  onSelectionChange={(selectedRows) => {
    console.log(selectedRows);
  }}
/>

Local Development

npm install
npm --workspace @hardlydifficult/storybook-components run storybook

Build

npm --workspace @hardlydifficult/storybook-components run build
npm --workspace @hardlydifficult/storybook-components run lint