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

@rowakit/table

v1.0.0

Published

Opinionated, server-side-first table component for internal/business apps

Readme

@rowakit/table

Server-side-first React table for internal & business applications. Predictable API. Thin client. No data-grid bloat.

Stability

@rowakit/table is stable as of v1.0.0.

See:

  • docs/API_STABILITY.md
  • docs/API_FREEZE_SUMMARY.md

Why @rowakit/table?

Most React table libraries grow into complex data grids. RowaKit Table is intentionally different:

  • Backend owns data logic (pagination, sorting, filtering)
  • Frontend stays thin and predictable
  • API is opinionated and stable
  • Workflow features are built-in, not bolted on

Installation

npm install @rowakit/table
# or
pnpm add @rowakit/table
# or
yarn add @rowakit/table

Import base styles:

import '@rowakit/table/styles';

Quick Start

import { RowaKitTable, col } from '@rowakit/table';
import type { Fetcher } from '@rowakit/table';
import '@rowakit/table/styles';

type User = { id: string; name: string; email: string; active: boolean };

const fetchUsers: Fetcher<User> = async ({ page, pageSize, sort }) => {
  const params = new URLSearchParams({
    page: String(page),
    pageSize: String(pageSize),
  });

  if (sort) {
    params.set('sortField', sort.field);
    params.set('sortDir', sort.direction);
  }

  const res = await fetch(`/api/users?${params}`);
  if (!res.ok) throw new Error('Failed to fetch users');

  return res.json();
};

export function UsersTable() {
  return (
    <RowaKitTable
      fetcher={fetchUsers}
      rowKey="id"
      columns={[
        col.text('name', { header: 'Name', sortable: true }),
        col.text('email', { header: 'Email' }),
        col.boolean('active', { header: 'Active' }),
        col.actions([
          { id: 'edit', label: 'Edit' },
          { id: 'delete', label: 'Delete', confirm: true },
        ]),
      ]}
    />
  );
}

Features (v1.0.0)

Core table

  • Server-side pagination, sorting, filtering
  • Typed Fetcher<T> contract
  • Built-in loading / error / empty states
  • Stale request protection

Columns

  • col.text
  • col.number
  • col.date
  • col.boolean
  • col.badge
  • col.actions
  • col.custom

UX & workflows

  • Column resizing (pointer events)
  • Double-click auto-fit
  • URL sync
  • Saved views
  • Row selection (page-scoped)
  • Bulk actions
  • Export via exporter callback

Fetcher Contract

type Fetcher<T> = (query: {
  page: number;
  pageSize: number;
  /** Deprecated (kept for backward compatibility; planned removal in v2.0.0). */
  sort?: { field: string; direction: 'asc' | 'desc' };
  /** Multi-column sorting (preferred). */
  sorts?: Array<{ field: string; direction: 'asc' | 'desc'; priority: number }>;
  filters?: Record<string, unknown>;
}) => Promise<{ items: T[]; total: number }>;

Guidelines:

  • Backend is the source of truth
  • Throw errors to trigger built-in error UI
  • Ignore stale requests (handled internally)

Row Selection

<RowaKitTable
  enableRowSelection
  onSelectionChange={(keys) => console.log(keys)}
  fetcher={fetchUsers}
  columns={[/* ... */]}
/>
  • Selection is page-scoped
  • Resets on page change

Multi-Column Sorting

Sort by multiple columns simultaneously using Ctrl+Click (Windows/Linux) or Cmd+Click (Mac) on column headers:

// Hold Ctrl/Cmd and click column headers in order
// Priority is determined by click order (first click = priority 1)

// The fetcher receives sorts array:
const fetcher = async (query: FetcherQuery) => {
  // query.sorts = [
  //   { field: 'lastName', direction: 'asc', priority: 1 },
  //   { field: 'firstName', direction: 'asc', priority: 2 },
  //   { field: 'salary', direction: 'desc', priority: 3 }
  // ]
  const res = await fetch('/api/users', {
    method: 'POST',
    body: JSON.stringify(query),
  });
  return res.json();
};

<RowaKitTable fetcher={fetcher} columns={[/* ... */]} />

Migration from deprecated sort field:

  • Old format: query.sort = { field: 'name', direction: 'asc' }
  • New format: query.sorts = [{ field: 'name', direction: 'asc', priority: 1 }]
  • Both fields coexist during transition; sort will be removed in v2.0.0

UI Indicators:

  • Single column: Standard sort arrow indicator
  • Multiple columns: Priority number displayed on sorted column headers

Bulk Actions

<RowaKitTable
  enableRowSelection
  bulkActions={[
    {
      id: 'delete',
      label: 'Delete selected',
      confirm: { title: 'Confirm delete' },
      onClick: (keys) => console.log(keys),
    },
  ]}
  fetcher={fetchUsers}
  columns={[/* ... */]}
/>

Export (CSV)

const exporter = async (query) => {
  const res = await fetch('/api/export', {
    method: 'POST',
    body: JSON.stringify(query),
  });

  const { url } = await res.json();
  return { url };
};

<RowaKitTable exporter={exporter} fetcher={fetchUsers} columns={[/* ... */]} />

Export is server-triggered and scales well for large datasets.


Roadmap & Versioning

  • Current: 1.0.0 (stable)
  • No breaking changes in 1.x (breaking changes require v2.0.0)
  • Public API stability policy applies from v1.0.0

See roadmap: docs/ROADMAP.md


Support RowaKit

If RowaKit helps your team:

Every bit of support helps sustain long-term maintenance.


License

MIT © RowaKit Contributors


Built for teams shipping internal tools, not demos.