
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@poserjs/react-table-csv
Advanced tools
React component for exploring CSV data with filers, grouping, sorting, and CSV export/import.
ReactTableCSV is a lightweight React component for exploring tabular data with a rich, spreadsheet‑like UI. It parses CSV (via PapaParse), renders a flexible table, and supports filtering, multi‑column sorting, grouping with reducers, pinning, splitting, per‑column styling, row numbers, and persistent settings (export/import/localStorage). It also ships with an optional dashboard wrapper powered by duckdb-wasm to query one or more datasets (or attached DuckDB database files) and render multiple views.
header: true, numeric typing, BOM/Excel‑friendly export).>, <, >=, <=, =, <>) with per‑column type (auto/text/number).cnt (non-empty only), rowcnt (all rows), unique cnt (non-empty unique), unique rowcnt (all unique)sum, avg, min, max, min - max, concat, unique concat, first, last.localStorage, Copy URL with embedded defaultSetting query param.duckdb-wasm (and support for attaching external DuckDB database files).px, %, and vh units.unlimited."use client";
import React from "react";
import { ReactTableCSV } from "@poserjs/react-table-csv";
const csv = `Name,Department,Salary\nAlice,Engineering,120000\nBob,Sales,90000`;
export default function Page() {
return (
<main>
<ReactTableCSV
csvString={csv}
downloadFilename="data.csv"
storageKey="react-table-csv-key"
defaultSettings={{ theme: "lite", showFilterRow: true }}
/>
</main>
);
}
// Load from a remote file
// <ReactTableCSV csvURL="/path/to/data.csv" />
// Or pass pre-parsed PapaParse output
// const parsed = Papa.parse(csvText, { header: true });
// <ReactTableCSV csvData={parsed} />
Use ReactDashboardCSV to register one or more CSV datasets and define views that render as tables. Dataset keys become DuckDB table names. Whole DuckDB database files can also be attached via the dbs prop and referenced in SQL using the provided keys as database names.
Set db to 'duckdb' (default) to enable SQL queries via duckdb-wasm, or 'none' to render datasets directly without DuckDB.
Peer dependency: @duckdb/duckdb-wasm (installed by the app). The component handles multiple versions of the API.
import { ReactDashboardCSV } from "@poserjs/react-table-csv";
export default function Page() {
return (
<ReactDashboardCSV
db="duckdb" // or 'none'
layout={[2, 1]} // optional: number of tables per row
dbs={{
stats: { dbURL: "/stats.duckdb" },
}}
datasets={{
capitals: { title: "US State Capitals", csvURL: "/us-state-capitals.csv", format: { type: 'csv', header: true } },
cities: { title: "US Cities (multi‑year)", csvURL: "/us-cities-top-1k-multi-year.csv", format: { type: 'csv', header: true } },
// Or: raw CSV string
// inlineData: { csvString: "col1,col2\nA,1\nB,2" },
// Or: pre-parsed data (Papa.parse result or { headers, data })
// preParsed: { csvData: { headers: ["A","B"], data: [{ A: 1, B: 2 }] } },
}}
views={{
byInitial: {
title: "States by Initial",
sql: `SELECT substr(t.state,1,1) AS Initial, t.state AS StateName, t.capital AS CapitalCity FROM capitals AS t ORDER BY 1, 2`,
props: { downloadFilename: "capitals-by-initial.csv", defaultSettings: { tableMaxWidth: "480px" } },
},
topCities2014: {
title: "Top US Cities by Population (2014)",
sql: `SELECT State, City, year AS Year, Population FROM cities WHERE year = 2014 ORDER BY Population DESC LIMIT 15`,
props: { /* any ReactTableCSV props */ },
},
}}
/>
);
}
Notes
csvURL, csvString, or csvData should be provided per dataset.SELECT * FROM "my-table".toJSON() internally and serializes Date values to ISO strings for stable display/export.csvString?: string CSV text to render.csvURL?: string URL to fetch CSV data from. Non-OK responses surface an error with the HTTP status and message.csvData?: object Result of Papa.parse ({ data, meta: { fields } }) to use directly.
One of csvString, csvURL, or csvData must be provided.downloadFilename?: string Filename for exports. Default "data.csv".storageKey?: string localStorage key for settings. Default "react-table-csv-key".defaultSettings?: string | object Either a JSON string or a plain object with the same schema as exported settings. Used as defaults and as fallback if localStorage is missing/corrupt.title?: string Optional title displayed in a themed header above the table.collapsed?: boolean Render the table initially collapsed with a toggle in the header.maxHeight?: string Limit table height (e.g., '400px', '50vh'). Use 'unlimited' for no limit.maxWidth?: string Limit table width (e.g., '400px', '80%'). Use 'unlimited' for no limit.fontSize?: number Font size for table values in pixels. Default 13.localStorage and included when exporting settings.datasets?: Record<string, { title?: string; csvURL?: string; csvString?: string; csvData?: any; format?: { type?: 'csv' | 'json'; header?: boolean; separator?: string; escape?: string; columns?: string[] } }>
csvURL, csvString, or csvData must be set for each dataset.format defaults to CSV with header: true, separator: ',', and escape: '"'. When header is false, provide columns names.dbs?: Record<string, { title?: string; dbURL: string }>
stats.my_table.views?: Record<string, { title?: string; sql?: string; dataset?: string; props?: ReactTableCSVProps }>
db="duckdb" (default): each view runs its sql against the registered datasets and renders a table. If sql is omitted, the view shows SELECT * from the specified dataset, or from the only dataset if exactly one is provided.db="none": DuckDB is not loaded. Each view must reference a dataset (or the only dataset is used) and the component passes that dataset directly to ReactTableCSV (via csvURL, csvString, or csvData). In this mode, omit sql.title shows above the table; optional collapsed renders the view initially collapsed with a toggle.layout?: number[] Optional array indicating how many views to place per row, e.g., [2, 1, 3]. Extra views beyond the array are rendered one per row.{ version, theme, columnStyles, columnOrder, hiddenColumns, filters, dropdownFilters, filterMode, showFilterRow, pinnedAnchor, showRowNumbers, customize, tableMaxHeight, tableMaxWidth, fontSize }Notes about settings
defaultSettings can be provided as a string or as a plain object.Call resetSettings() to revert the table to its initial configuration. The reset also turns off customize mode (or respects a customize value from provided defaults) and returns the applied settings object.
See the CONTRIBUTING.md file for details.
Licensed under the MIT License. See the LICENSE file for details.
FAQs
React component for exploring CSV data with filers, grouping, sorting, and CSV export/import.
We found that @poserjs/react-table-csv demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.