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

@tailgrid/core

v0.2.0

Published

Framework-agnostic core for TailGrid - sorting, filtering, pagination

Readme

@tailgrid/core

Framework-agnostic core for TailGrid - the AI-native data grid for modern web apps.

Installation

npm install @tailgrid/core
# or
pnpm add @tailgrid/core

Usage

import { createTailGrid } from '@tailgrid/core';

const grid = createTailGrid({
  data: users,
  columns: [
    { id: 'name', header: 'Name', accessorKey: 'name' },
    { id: 'email', header: 'Email', accessorKey: 'email' },
    { id: 'role', header: 'Role', accessorKey: 'role' },
  ],
  enableSorting: true,
  enableFiltering: true,
  enablePagination: true,
});

// Get paginated rows
const rows = grid.getPaginatedRows();

// Sort by column
grid.toggleSort('name');

// Filter
grid.setColumnFilter({ id: 'role', operator: 'equals', value: 'admin' });

// Pagination
grid.nextPage();

Features

  • Sorting - Single and multi-column sorting
  • Filtering - Column filters and global search
  • Pagination - Client-side pagination with configurable page sizes
  • Selection - Row selection with multi-select support
  • Column Resizing - Drag-to-resize columns
  • Built on TanStack Table - Leverages battle-tested table logic

API

createTailGrid(options)

Creates a new TailGrid instance.

Options

| Option | Type | Description | |--------|------|-------------| | data | T[] | Array of data | | columns | TailGridColumn<T>[] | Column definitions | | enableSorting | boolean | Enable sorting | | enableFiltering | boolean | Enable filtering | | enablePagination | boolean | Enable pagination | | enableRowSelection | boolean | Enable row selection |

Instance Methods

Sorting

  • getSorting() - Get current sort state
  • setSorting(sorting) - Set sort state
  • toggleSort(columnId) - Toggle sort on column
  • clearSorting() - Clear all sorting

Filtering

  • getFilters() - Get current filter state
  • setColumnFilter(filter) - Set column filter
  • setGlobalFilter(value) - Set global search
  • clearFilters() - Clear all filters

Pagination

  • getPaginationInfo() - Get pagination details
  • setPageIndex(index) - Go to page
  • setPageSize(size) - Change page size
  • nextPage() / previousPage() - Navigate pages

Selection

  • getSelectedRows() - Get selected rows
  • toggleRowSelection(id) - Toggle row selection
  • clearSelection() - Clear selection

License

MIT - Part of the TailGrid project.