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

@sanity-labs/react-table-kit

v1.3.0

Published

Composable React table components and helpers for Sanity-flavored editorial UIs.

Readme

@sanity-labs/react-table-kit

Composable React table primitives and helpers for Sanity-flavored editorial UIs.

This package is the UI-first foundation for table rendering, filtering, grouping, selection, inline editing, and comment-thread helper utilities. It does not fetch data from @sanity/sdk-react; use @sanity-labs/sdk-table-kit when you want the SDK-backed integration layer.

Installation

pnpm add @sanity-labs/react-table-kit

Peer dependencies:

  • @sanity/types
  • @sanity/ui
  • react
  • react-dom
  • styled-components

Quick Start

import {DocumentTable, column} from '@sanity-labs/react-table-kit'

const columns = [
  column.string({field: 'title'}),
  column.badge({
    field: 'status',
    colorMap: {
      draft: 'caution',
      published: 'positive',
    },
  }),
]

export function ExampleTable() {
  return (
    <DocumentTable
      data={[
        {_id: 'article-1', _type: 'article', status: 'draft', title: 'First article'},
        {_id: 'article-2', _type: 'article', status: 'published', title: 'Second article'},
      ]}
      columns={columns}
    />
  )
}

column.string() is the generic text-column helper. column.title() remains available as a deprecated compatibility preset for the common title field.

Server-Backed Grouping

Use controlled serverGroup mode when your backing data source already returns rows in grouped order and needs to re-query when the user changes the active group:

import {DocumentTable, column} from '@sanity-labs/react-table-kit'

const columns = [
  column.string({field: 'title'}),
  column.custom({
    field: 'status',
    header: 'Status',
    groupable: true,
    groupValue: (rawValue) => String(rawValue ?? '').replace('-', ' '),
    groupField: 'coalesce(status, "draft")',
  }),
]

export function GroupedTable({
  groupBy,
  onGroupByChange,
  rows,
}: {
  groupBy: string | null
  onGroupByChange: (groupBy: string | null) => void
  rows: Array<{_id: string; _type: string; title: string; status: string}>
}) {
  return (
    <DocumentTable
      data={rows}
      columns={columns}
      serverGroup={{
        groupBy,
        onGroupByChange,
        groupableColumnIds: ['status'],
      }}
    />
  )
}

Notes:

  • serverGroup.groupBy is the currently active group key, or null for no grouping.
  • serverGroup.onGroupByChange is called when the user changes the group from the filter bar.
  • groupValue controls the visible group label for display-oriented columns.
  • groupField lets custom columns group by a different backend field or expression than the cell value.

Primary Exports

  • DocumentTable
  • column
  • filter
  • FilterBar
  • useDocumentTable()
  • useFilterUrlState()
  • useTableFilters()
  • TableCellChrome
  • buildCommentDocument()
  • buildCommentThreads()
  • groupUnresolvedCommentsByField()

Scripts

  • pnpm build
  • pnpm typecheck
  • pnpm lint
  • pnpm test