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

flotable

v0.1.11

Published

Open-source, ERP-focused table component — zero runtime dependencies

Downloads

245

Readme

FloTable

npm version license zero dependencies

An open-source, zero-dependency table component built for ERP-style applications. Handles sorting, filtering, pagination, and rich column types out of the box — with full style customization and no runtime baggage.

Live Demo


Features

  • Zero runtime dependencies — only React as a peer dependency
  • 7 built-in column types — text, number, date, boolean, badge, currency, link
  • Quick filters — inline per-column filter pills in the header
  • Sorting — single-column sorting with visual indicators
  • Pagination — built-in page controls with configurable page size
  • Custom renderers — override any column with a render function
  • Two data modes — controlled (data prop) or self-managed (request prop for async fetching)
  • Full style control — CSS custom properties, classNames API, and styles prop for every table slot
  • Framework-agnostic styling — ships plain CSS in @layer flotable, works with Tailwind, CSS Modules, or vanilla CSS

Installation

npm install flotable

FloTable requires React 18+ as a peer dependency.


Quick Start

import { FloTable } from 'flotable';
import 'flotable/dist/flotable.css';

const columns = [
  { key: 'name',   header: 'Name',   type: 'text' as const },
  { key: 'email',  header: 'Email',  type: 'text' as const },
  { key: 'role',   header: 'Role',   type: 'badge' as const, badgeColors: { Admin: '#e0f2fe', User: '#f0fdf4' } },
  { key: 'salary', header: 'Salary', type: 'currency' as const, currency: 'USD' },
];

const data = [
  { name: 'Alice', email: '[email protected]', role: 'Admin', salary: 95000 },
  { name: 'Bob',   email: '[email protected]',   role: 'User',  salary: 72000 },
];

function App() {
  return (
    <FloTable
      columns={columns}
      data={data}
      totalRows={data.length}
      page={1}
      onPageChange={(p) => console.log('Page:', p)}
    />
  );
}

Request Mode (Async Data Fetching)

<FloTable
  columns={columns}
  pageSize={20}
  request={async ({ page, pageSize, sortState, quickFilters }) => {
    const res = await fetch(`/api/users?page=${page}&size=${pageSize}`);
    const json = await res.json();
    return { data: json.rows, totalRows: json.total };
  }}
/>

Column Types

| Type | Description | Extra Props | |------|-------------|-------------| | text | Plain text | — | | number | Formatted number | locale | | date | Formatted date string | locale | | boolean | Checkmark / cross icon | — | | badge | Colored pill for enum values | badgeColors | | currency | Formatted money value | currency, locale | | link | Clickable URL | — |

Any column can use a custom render function to override the default renderer.


Styling & Customization

FloTable ships plain CSS wrapped in @layer flotable. Every visual token uses a CSS custom property with a fallback, so you can theme the entire table without touching source files.

CSS Custom Properties

Override tokens on the root element or via the styles prop:

.my-table {
  --flotable-border-color: #e5e7eb;
  --flotable-header-bg: #f9fafb;
  --flotable-row-hover-bg: #f3f4f6;
  --flotable-font-size: 14px;
}

classNames API

Pass custom class names to any table slot:

<FloTable
  classNames={{
    root: 'my-table',
    header: 'my-header',
    row: 'my-row',
    cell: 'my-cell',
    pagination: 'my-pagination',
    filterBar: 'my-filters',
  }}
  // ...
/>

Tailwind CSS Integration

If your app uses Tailwind, declare the flotable layer before your Tailwind import so utility classes passed via classNames reliably override component defaults:

/* globals.css */
@layer flotable;         /* lowest priority — component defaults */
@import "tailwindcss"; /* utilities layer beats flotable */

Props Reference

Common Props

| Prop | Type | Description | |------|------|-------------| | columns | ColumnDef<T>[] | Column definitions (required) | | pageSize | number | Rows per page (default: 10) | | filterDefs | FilterDef[] | Explicit filter pill definitions | | autoFilters | boolean | Auto-generate filter pills from filterable columns | | showSearch | boolean | Show a global search input in the filter bar | | classNames | FloTableClassNames | Custom CSS classes for each table slot | | styles | FloTableStyles | Inline styles / CSS custom properties for each slot |

Data Mode Props

| Prop | Type | Description | |------|------|-------------| | data | T[] | Current page rows | | totalRows | number | Total row count across all pages | | page | number | Active page (1-based) | | onPageChange | (page: number) => void | Page navigation callback | | sortState | SortState<T> \| null | Current sort state | | onSortChange | (sort: SortState<T> \| null) => void | Sort change callback | | quickFilters | QuickFilterState | Active filter values | | onFilterChange | (filters: QuickFilterState) => void | Filter change callback |

Request Mode Props

| Prop | Type | Description | |------|------|-------------| | request | FloTableRequestFn<T> | Async function called on mount and on every state change |


Project Structure

packages/flotable/     # The published npm package
apps/demo/           # Next.js demo app (not published)

Contributing

See CONTRIBUTING.md for setup instructions, code style rules, and the PR workflow.


License

MIT — Copyright (c) 2026 Fladeed