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

@shadow-js/table

v1.0.4

Published

A headless data table with sorting, filtering, pagination, selection and grouping

Downloads

1,209

Readme

@shadow-js/table

npm CI License: MIT Node.js TypeScript

Headless data table for ShadowJS 1.0.0, built on signals. The core has columns, sorting (multi and custom), column and global filtering, pagination, row selection, controlled state and manual (server-side) modes. Grouping with aggregation, sub rows, pinning, sizing, header rows, faceting, visibility and column order are opt-in features, each a subpath, so a table ships only what it uses. It renders no markup: render the rows with your own components, or copy the data-table item of @shadow-js/ui.

Install

npm install @shadow-js/table

Quick start

import { createColumnHelper, createTable } from "@shadow-js/table";
import { expect, it } from "vitest";

interface Person {
  id: string;
  name: string;
  age: number;
}

const helper = createColumnHelper<Person>();
const people: Person[] = [
  { id: "1", name: "Ada", age: 36 },
  { id: "2", name: "Grace", age: 85 },
];

it("sorts and reads rows", () => {
  const table = createTable({
    data: people,
    columns: [helper.accessor("name", { header: "Name" }), helper.accessor("age", { header: "Age" })],
    getRowId: (row) => row.id,
  });
  table.getColumn("age")?.toggleSorting(true);
  expect(table.getRowModel().rows.map((row) => row.getValue("name"))).toEqual(["Grace", "Ada"]);
});

API

  • createTable(options): the table. Its slice accessors (sorting(), rowSelection(), ...) and actions (setSorting, nextPage, ...). Pass the features it uses in features.
  • Features: grouping (@shadow-js/table/grouping), expanding, pinning, sizing, layout (header rows, getStart), faceting, visibility and ordering; full (@shadow-js/table/full) lists all of them. locale (@shadow-js/table/locale) is separate because it needs the locale option: text sorts and filters follow the language of the data (Intl.Collator, numbers inside text by value, Turkish case rules). A member of a feature the table lacks throws a TypeError that names the feature and its import.
  • createColumnHelper<TData>(): typed accessor, display and group column definitions.
  • The row models: getRowModel(), getCoreRowModel(), getFilteredRowModel(), getGroupedRowModel(), getSortedRowModel(), getExpandedRowModel(), getSelectedRowModel().
  • Types: ColumnDef, Column, Row, Cell, Header, TableState, TableOptions.

Links

  • Reference: /reference/table/ on the documentation site.

Production error codes

A production build keeps a short code instead of the development explanation, so message text never reaches user bundles. Search this table for the code. In the explanation, … stands for a value the development message names. A code followed by a word names the option, feature or member at fault.

| Code | Development explanation | | --- | --- | | TABLE_FEATURE | … needs the … feature: import { … } from "@shadow-js/table/…" and pass createTable({ features: […] }), or use the full list from "@shadow-js/table/full". | | TABLE_DUPLICATE | two different "…" features were passed. | | TABLE_LOCALE | the locale feature needs the locale option: createTable({ features: [locale], locale: "de" }). |

Dependencies

  • Runtime: none.
  • Peers: @shadow-js/core and @shadow-js/web ^1.0.3: reactive table state and the renderer for table components.

Types

  • Names from the root: ColumnDef, TableState, TableOptions, Column, Row, Cell, Header.
  • Type tests in test-types/ are compile-time checks; npm run typecheck:types runs them.

Support

  • Node.js >=22.12.0. ESM only: use import; require is not supported.
  • Browsers: not applicable; the package does not touch the DOM.
  • Versioning: every @shadow-js/* package releases together at one version. Upgrade them as one set.
  • Documentation: ShadowJS documentation.

Using, changing and contributing

  • Use the package (a person or a coding agent that builds with it): this README, and SKILL.md, the short page an agent reads first.
  • Change the package (fix a bug, add a feature): AGENTS.md says how the repository is laid out, how to implement and test a change, and how a pull request is reviewed. It is written for people and coding agents alike.
  • Take part: CONTRIBUTING.md is the short guide; SECURITY.md is for vulnerabilities.