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

@thor-commerce/ui

v0.1.1

Published

Reusable React components for Thor Commerce apps

Readme

@thor-commerce/ui

Reusable React components for Thor Commerce dashboard surfaces and embedded apps. The package builds on Primer React so first-party and third-party apps share the dashboard's layout, controls, empty states, tables, and interaction patterns.

Host-owned navigation is intentionally out of scope. Embedded apps supply their main content with AppPage, Section, forms, tables, and the other exports; Thor Dashboard continues to own the surrounding top bar and sidebar.

Install

pnpm add @thor-commerce/ui @primer/react @primer/octicons-react react-hook-form recharts

Import the package stylesheet once next to the app's existing global styles:

import '@thor-commerce/ui/styles.css';

The app must already render Primer's ThemeProvider and BaseStyles, as Thor's React Router app template does.

Example

import {
  AppPage,
  DataTable,
  Section,
  type Column,
} from '@thor-commerce/ui';
import { Button } from '@primer/react';

const columns: Column<{ id: string; name: string }>[] = [
  { id: 'name', header: 'Name', field: 'name', rowHeader: true },
];

export function ProductsPage() {
  return (
    <AppPage
      title="Products"
      actions={<Button size="small">Create product</Button>}
    >
      <Section title="Products" flush>
        <DataTable columns={columns} data={[{ id: '1', name: 'T-shirt' }]} />
      </Section>
    </AppPage>
  );
}

Buttons remain Primer components. Use size="small" for dashboard actions, variant="primary" plus loading for controls that commit a write, and type="button" for every non-submit button inside a form.

Component groups

  • Layout: AppPage, Section, Card, BorderGrid, Scrollable, and Backdrop.
  • Data: DataTable, DataGrid, ResourceList, sortable containers, table primitives, pagination, filters, and URL-state hooks.
  • Inputs: SearchInput, DatetimeInput, WeightInput, ColorPicker, DropZone, Switch, and PaneSelectPanel.
  • Content and feedback: EmptyContentState, ActionConfirmationDialog, Toast, TimelineEvents, Avatar, Thumbnail, Image, Icon, and CountryFlag.

All public components and their TypeScript types are exported from the package root. Consumer applications do not import package internals or source paths.

Local dashboard development

The repository is a pnpm workspace and Dashboard depends on this package with workspace:*. Run pnpm dev at the repository root. During development, the package resolves directly to its source and Vite handles updates, so no npm release or second watcher is needed to develop and test a component change.

Useful package commands:

pnpm build:ui
pnpm --filter @thor-commerce/ui typecheck
pnpm --filter @thor-commerce/ui pack

Releasing

Every public package change gets a changeset:

pnpm changeset
pnpm version-packages
pnpm release

version-packages applies the requested semantic version bump and updates the changelog. release builds and publishes the public package with npm provenance. The publishing environment needs npm access to the @thor-commerce scope.

The repository's Release packages GitHub workflow automates this flow on main: it maintains the Changesets version PR, then publishes after that PR is merged. It requires an NPM_TOKEN repository secret with scope publish access.