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

@investtal/ui-table

v9.0.0

Published

A flexible table component with support for basic table layouts and data-driven tables.

Readme

Table Component

A flexible table component with support for basic table layouts and data-driven tables.

Components

Table

Basic table components for building custom table layouts:

  • Table - Main table wrapper with overflow handling
  • TableHeader - Table header section
  • TableBody - Table body section
  • TableFooter - Table footer section
  • TableRow - Table row
  • TableHead - Table header cell
  • TableCell - Table data cell
  • TableCaption - Table caption

DataTable

A data-driven table component that automatically renders data arrays with customizable columns and cell rendering.

Usage

Basic Table

import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@investtal/table"

function BasicTable() {
  return (
    <Table>
      <TableHeader>
        <TableRow>
          <TableHead>Name</TableHead>
          <TableHead>Email</TableHead>
          <TableHead>Role</TableHead>
        </TableRow>
      </TableHeader>
      <TableBody>
        <TableRow>
          <TableCell>John Doe</TableCell>
          <TableCell>[email protected]</TableCell>
          <TableCell>Admin</TableCell>
        </TableRow>
        <TableRow>
          <TableCell>Jane Smith</TableCell>
          <TableCell>[email protected]</TableCell>
          <TableCell>User</TableCell>
        </TableRow>
      </TableBody>
    </Table>
  )
}

DataTable

import { DataTable } from "@investtal/table"

interface User {
  id: number
  name: string
  email: string
  role: string
  status: "active" | "inactive"
}

const users: User[] = [
  { id: 1, name: "John Doe", email: "[email protected]", role: "Admin", status: "active" },
  { id: 2, name: "Jane Smith", email: "[email protected]", role: "User", status: "active" },
]

function UsersTable() {
  return (
    <DataTable
      data={users}
      columns={[
        { key: "id", header: "ID" },
        { key: "name", header: "Name" },
        { key: "email", header: "Email" },
        { key: "role", header: "Role" },
        {
          key: "status",
          header: "Status",
          render: (value) => (
            <span className={`px-2 py-1 rounded text-xs ${
              value === "active" ? "bg-green-100 text-green-800" : "bg-red-100 text-red-800"
            }`}>
              {String(value)}
            </span>
          ),
        },
      ]}
    />
  )
}

Features

  • Flexible Layout: Use individual table components for custom layouts
  • Data-Driven: DataTable component for automatic rendering of data arrays
  • Custom Rendering: Custom cell rendering with render functions
  • Responsive: Built-in overflow handling for mobile devices
  • Accessible: Proper semantic HTML structure
  • Stylable: Customizable with Tailwind CSS classes

Props

DataTable Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | data | TData[] | - | Array of data objects to render | | columns | Column[] | - | Column definitions | | className | string | - | Additional CSS classes | | emptyMessage | string | "No data available" | Message to show when data is empty |

Column Definition

interface Column<TData> {
  key: keyof TData
  header: string
  render?: (value: TData[keyof TData], row: TData) => React.ReactNode
}

Future Enhancements

  • Sorting functionality
  • Pagination support
  • Row selection
  • Column filtering
  • Advanced styling options
  • Integration with TanStack Table for advanced features