Editable Table
A spreadsheet-style table: click any cell to edit in place, Enter moves down, Tab moves across, Escape cancels, rows add and delete with motion, and number columns total in the footer.
- Category: Charts
- Licence: Charcoal UI Pro
- Built with: React 19, Tailwind CSS 4, Motion
- Dependencies: motion, clsx, tailwind-merge
Examples
Editable Table
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
columns | { key; header; type?: "text" | "number"; align? }[] | — | |
rows | { id: string; [key]: string | number }[] | — | |
onChange | (rows) => void | — | |
totals | boolean | true |
About Editable Table
Editable Table lets you click any cell to edit it in place. Enter moves down, Tab moves across, Escape cancels, rows add and delete with motion, and number columns total in the footer.
Editable Table is an animated chart for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.
When to use Editable Table
- Budgets and line items.
- Inventory and pricing sheets.
- Bulk editing in admin tools.
- Lightweight spreadsheets inside apps.
How it works
Only the active cell becomes an input, so the table stays fast. Number columns are parsed as numbers on commit, totals recompute from the data, and every change goes to your onChange handler.
Each chart has a text alternative, hover tooltips are mirrored by keyboard focus where data points are interactive, and colour is never the only way a value is shown. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.
Customizing Editable Table
Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.
The Customize panel next to the preview lets you change totals live, and the Code tab updates to match, so the snippet you copy already carries your values.
- columns.
- rows.
- totals (boolean, default true).
Goes well with Editable Table
These charts pieces share its tokens and motion language, so they sit together on one page without clashing.
- Donut Chart: An animated React donut chart: segments draw in and thicken on hover
- Activity Heatmap: A React contribution heatmap with four shades, tooltips and keyboard navigation
- Sparkline: An animated React sparkline with fill, trend colour and a pulsing end dot
- Line Chart: An animated React line chart with a snapping crosshair and multi-series tooltips
- Area Chart: An animated React area chart with a comparison series and a target line
Install Editable Table
npx shadcn@latest add @charcoal/editable-tableEditable Table is part of Charcoal UI Pro. One seat unlocks all 393 Pro components, 112 landing-page sections and 100 full templates, for every personal and client project, with updates included. Add the @charcoal registry once with your access token, then the command above copies editable-table.tsx into components/ui and installs clsx, tailwind-merge.
You own the file you install: no runtime package, no lock-in, nothing to keep in sync. Change it however your product needs.
See Charcoal UI Pro pricing · Pro setup
Frequently asked questions
- How do I install Editable Table?
- Editable Table is part of Charcoal UI Pro. Add the @charcoal registry to components.json with your access token, then run npx shadcn@latest add @charcoal/editable-table. It copies editable-table.tsx into components/ui and installs motion, clsx, tailwind-merge.
- Is Editable Table free for commercial use?
- Editable Table needs a Charcoal UI Pro seat, monthly or a one-time lifetime price. A seat covers unlimited personal and commercial projects, including client work, and every future Pro component.
- Does Editable Table work with Next.js?
- Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
- Can an AI coding agent install Editable Table?
- Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Editable Table's props and get_install_command returns the exact command.