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

xontable

v0.2.4

Published

A spreadsheet-like React table component with Excel-style editing, selection, clipboard, fill handle, validation, filters, select dropdowns, checkbox cells, and column groups.

Readme

xontable

A spreadsheet-like React table component with Excel-style editing, selection, clipboard, fill handle, validation, filters, select dropdowns, checkbox cells, and column groups.

Install

npm install xontable

Quick Start

import React, { useState } from "react";
import { XOnTable, type ColumnDef } from "xontable";
import "xontable/styles";

type Row = { id: string; name: string; qty: string };

const columns: ColumnDef<Row>[] = [
  { key: "name", label: "Name", editable: true },
  { key: "qty", label: "Qty", type: "number", editable: true },
];

export default function App() {
  const [rows, setRows] = useState<Row[]>([
    { id: "1", name: "Rice", qty: "10" },
  ]);

  return <XOnTable columns={columns} rows={rows} onChange={setRows} />;
}

Styles (Required)

Always import the styles once in your app:

import "xontable/styles";

Props

  • columns: Column definitions
  • rows: Data rows
  • onChange(nextRows, meta): Updated rows with change meta
  • readOnly: Disable editing
  • theme: "light" | "dark"
  • showStatusBar: Show validation summary bar
  • darkThemeColors: Override dark theme colors

Column Definition

type ColumnDef<Row> = {
  key: keyof Row | string;
  label: string;
  width?: number;
  editable?: boolean;
  type?: "text" | "number" | "date" | "select" | "checkbox";
  validator?: (value: string, row: Row) => string | null;
  group?: string;
  groupCollapsible?: boolean;
  options?: { value: string; label: string }[];
  getOptions?: (row: Row) => Promise<{ value: string; label: string }[]>;
  dependsOn?: string; // for cascading selects
};

Editing

  • Single click selects
  • Enter or double-click to edit
  • Typing starts edit with typed character
  • Enter commits, Esc cancels, Tab commits and moves

Copy / Paste

  • TSV compatible with Excel/Google Sheets
  • Use Ctrl/Cmd+C to copy selection
  • Use Ctrl/Cmd+V to paste into table

Fill Handle

  • Drag the dot at bottom-right of active cell
  • Fills down or across with repeated value

Validation

Per-column validation:

{ key: "qty", label: "Qty", type: "number", validator: (v) => v ? null : "Required" }

Status Bar

<XOnTable showStatusBar />

Select Dropdowns

{ key: "city", label: "City", type: "select", options: [
  { value: "tokyo", label: "Tokyo" }
] }

Checkbox Cells

{ key: "active", label: "Active", type: "checkbox" }

Column Groups

const columns: ColumnDef<Row>[] = [
  { key: "name", label: "Name", group: "User" },
  { key: "active", label: "Active", type: "checkbox", group: "User" },
  { key: "group", label: "Group", type: "select", group: "Account Details" },
  { key: "subgroup", label: "Subgroup", type: "select", group: "Account Details" },
  { key: "city", label: "City", type: "select", group: "Login info" },
];

Theme

<XOnTable theme="dark" />

Dark Theme Colors (Props)

<XOnTable
  theme="dark"
  darkThemeColors={{ bg: "#111318", headBg: "#1c1f26", accent: "#7aa2ff" }}
/>

Requirements

  • React 19+
  • Peer deps: react, react-dom

Troubleshooting

Error: Could not resolve "./styles/xontable.css"

  • Ensure you installed the latest version and it was built/published correctly.
  • Clear Vite cache: delete node_modules/.vite and run npm run dev -- --force.

License

MIT