# Kadal UI > Kadal UI is a set of open-source React components for power users, starting with a data grid built on TanStack Table v9 and shadcn/ui: sorting, filtering, grouping, virtualisation, inline editing, keyboard navigation and more. One command copies the source into your project. MIT. Components you own. Kadal UI is a shadcn registry, not an npm dependency: one command copies the TypeScript source into your project (components/ui/data-grid/ by default) and adds TanStack Table and TanStack Virtual to your package.json. From then on the code is yours to change; updates arrive as a diff you review. React 19, TypeScript, Tailwind v4, shadcn/ui on Base UI. Works with Next.js, Vite, Astro, Remix and TanStack Start. Install: `npx shadcn@latest add @kadal/data-grid` (or `npx @kadal/ui add data-grid`, which points components.json at the registry first). Update: `npx shadcn@latest add @kadal/data-grid --diff` shows what changed between your copy and the registry. Licence: MIT, no paid tier, no licence keys. Source: https://github.com/kadalcc/ui. Issues: https://github.com/kadalcc/ui/issues. Discussions: https://github.com/kadalcc/ui/discussions. Discord: https://discord.gg/pdWcSbxNKa. The npm package https://www.npmjs.com/package/@kadal/ui is only the CLI; the components ship through the registry. Made by Kadal (Chennai, Tamil Nadu, India). Postal address: Awfis OMR, No. 111 (Old No. 141), Rajiv Gandhi Road, Old Mahabalipuram Road, Kottivakkam Village, Chennai, Tamil Nadu 600041, India. Contact: hello@kadal.cc. ## Registry items (`npx shadcn@latest add @kadal/`) - data-grid (ui): A power-user data grid on TanStack Table v9 and shadcn/ui (Base UI): typed columns, sorting, faceted and typed filters, fuzzy search, pagination, selection and bulk actions, row actions, visibility, pinning, drag reorder, resizing, tree data, grouping with aggregation, virtualization, inline editing, cell selection with keyboard navigation and clipboard, export, density, row pinning, persisted and saved views. - data-grid-url-state (hook): Keeps the grid's filters, search and page in the URL with nuqs, so a view can be shared and survives a refresh. - data-grid-demo-data (lib): The seeded demo dataset the Kadal UI examples use: people with statuses, plans, money, dates and tags. ## Examples (`npx shadcn@latest add @kadal/`; each also opens in the playground) - data-grid-demo: Data Grid: everything on. The kitchen-sink example from the docs: every feature on one grid. - data-grid-basic: Data Grid: basic. Columns, data, done. - data-grid-virtualized: Data Grid: 50,000 rows. Virtualized rows with no pager. - data-grid-tree: Data Grid: tree data. Nested rows with the expander column. - data-grid-server: Data Grid: server-side with TanStack Query. Paging, sorting and filtering on the server; the grid renders one page. - data-grid-composed: Data Grid: your own layout. The parts, arranged your way. - data-grid-url-state-example: Data Grid: URL state. Filters, search and page in the URL. - data-grid-cell-selection: Data Grid: cell selection. Spreadsheet ranges with a live count and a copy-as-TSV button. - data-grid-columns: Data Grid: columns. Most column kinds on one grid, with a group header, a custom cell and a plain TanStack def. - data-grid-custom-part: Data Grid: custom toolbar part. A Reset everything button built with useDataGridContext. - data-grid-density: Data Grid: density. Controlled density from a toggle outside the grid. - data-grid-editing: Data Grid: inline editing. Typed editors per kind, validation, async save errors and an edit log. - data-grid-export: Data Grid: export. The Export menu plus a custom raw-CSV button through the api, with export: false and an export function. - data-grid-filtering: Data Grid: filtering. Every filter kind, an enum with icons and colours, a facet filter applied at start. - data-grid-grouping: Data Grid: grouping and aggregation. Grouped by team with aggregates, a custom aggregatedCell and footer totals. - data-grid-i18n: Data Grid: i18n. French labels and fr-FR formatting. - data-grid-keyboard: Data Grid: keyboard. A plain grid with the keys to try. - data-grid-pagination: Data Grid: pagination. 300 rows, 25 a page, custom size options, opened on page 3. - data-grid-persistence: Data Grid: persistence. The view survives a reload (sessionStorage) and saved views. - data-grid-pinning: Data Grid: column pinning. Checkbox and Name pinned to the start, the actions menu to the end. - data-grid-reordering: Data Grid: column reordering. Drag headers or use Move left/right; a starting order and a non-draggable column. - data-grid-resizing: Data Grid: column resizing. size, minSize, maxSize, a fixed column, and double-click to fit. - data-grid-row-actions: Data Grid: row actions. A row menu with pin-to-top, onRowClick and row tinting. - data-grid-row-pinning: Data Grid: row pinning. Pin rows to the top or bottom from a row-actions menu. - data-grid-search: Data Grid: global search. Fuzzy search with a column excluded and a query applied at start. - data-grid-selection: Data Grid: selection and bulk actions. Checkboxes, ranges, per-row rules, bulk actions that change local state. - data-grid-sorting: Data Grid: sorting. Initial sort, an unsortable column, a custom sort by string length, shift-click multi-sort. - data-grid-states: Data Grid: loading and empty states. Loaded, refetching, first load, error and empty, switched by buttons. - data-grid-theming: Data Grid: theming. Striped, compact, brand header and tinted selected rows with Tailwind classes. - data-grid-visibility: Data Grid: column visibility. Columns hidden at start, one that cannot be hidden, the View popover. ## Docs - [Introduction](https://ui.kadal.cc/docs/): Kadal UI is a set of open-source React components for power users, starting with a data grid on TanStack Table v9 and shadcn/ui. One command copies the source into your project. - [Installation](https://ui.kadal.cc/docs/installation/): Add the Kadal UI data grid to a React project with the shadcn CLI or the @kadal/ui CLI, what gets installed, and how to update. - [Your first grid in 5 minutes](https://ui.kadal.cc/docs/quick-start/): From an installed data grid to a page with your own data, typed columns, editing and a bulk action, in five short steps. - [Type safety](https://ui.kadal.cc/docs/type-safety/): How the Kadal UI data grid stays typed end to end: column keys checked against your row type, values flowing into format, validate and onEdit, TanStack v9's feature-typed table, and per-table column meta. - [Theming and styling](https://ui.kadal.cc/docs/theming/): The Kadal UI data grid is Tailwind classes over your shadcn theme tokens. Which tokens it uses, dark mode, density, the class and data-attribute hooks, and where to edit the styles in your copy. - [Overview](https://ui.kadal.cc/docs/data-grid/): What the Kadal UI data grid is, its parts, the two ways to render it, what is on by default and how to turn each thing off. - [Columns](https://ui.kadal.cc/docs/data-grid/columns/): The typed column builder, every column kind and what it sets by default, the flat options, custom cells and headers, group headers and plain TanStack defs. - [Sorting](https://ui.kadal.cc/docs/data-grid/sorting/): Click a header to sort and shift-click to add a second key; the sort functions, per-column options, an initial sort and server-side sorting. - [Filtering](https://ui.kadal.cc/docs/data-grid/filtering/): Facet, text, number range, date range and boolean filters from the column header, chips in the toolbar, custom filter functions and the filter value shapes. - [Global search](https://ui.kadal.cc/docs/data-grid/search/): The toolbar search box: fuzzy matching across every searchable column, what counts as a match, which columns take part, and the plain-substring and off modes. - [Pagination](https://ui.kadal.cc/docs/data-grid/pagination/): Page size and the size choices, the pager's parts, starting on a page, turning paging off, how expanded rows and auto-reset behave, and server-side row counts. - [Row selection and bulk actions](https://ui.kadal.cc/docs/data-grid/selection/): The checkbox column, shift-click ranges, selecting the page, single mode, per-row rules, the selected count, and the bulk-actions bar with your buttons. - [Row actions](https://ui.kadal.cc/docs/data-grid/row-actions/): A menu per row with col.actions and a Base UI dropdown, why the column is stable, pinning a row from its menu, onRowClick and getRowClassName for tinting rows. - [Column visibility](https://ui.kadal.cc/docs/data-grid/visibility/): The View popover with search, show all and reset, hiding a column from its menu, columns that cannot be hidden, starting hidden, and persistence. - [Column pinning](https://ui.kadal.cc/docs/data-grid/pinning/): Pin columns to the start or end of the grid so they stay in view while the rest scrolls sideways, from the column menu or from initialState. - [Column reordering](https://ui.kadal.cc/docs/data-grid/reordering/): Drag a header to move a column, or use Move left and Move right in its menu; which columns stay put, and how to set and remember an order. - [Column resizing](https://ui.kadal.cc/docs/data-grid/resizing/): Drag a header's edge to resize a column, double-click the edge to fit the content, and set size, minSize and maxSize per column. - [Expanding and tree data](https://ui.kadal.cc/docs/data-grid/expanding/): Nested rows from getSubRows, the expander column, indentation by depth, expand and collapse all, and how selection, filtering and paging treat sub-rows. - [Grouping and aggregation](https://ui.kadal.cc/docs/data-grid/grouping/): Group rows by one or more columns from the toolbar or a header, with group rows that carry a count and each column's aggregate, and footers for grand totals. - [Virtualisation](https://ui.kadal.cc/docs/data-grid/virtualization/): Render only the rows in view with TanStack Virtual: the 200-row threshold, the height the grid needs, what keeps working, and when to page on a server instead. - [Inline editing](https://ui.kadal.cc/docs/data-grid/editing/): Edit cells in place with typed editors per column kind, validation, async saves that keep the editor open on failure, and Enter, Tab and Escape that behave like a spreadsheet. - [Cell selection and clipboard](https://ui.kadal.cc/docs/data-grid/cell-selection/): Spreadsheet-style cell focus and ranges in the Kadal UI data grid: click, drag, Shift-click and ⌘-click to select, ⌘C to copy the cells as tab-separated text. - [Keyboard navigation](https://ui.kadal.cc/docs/data-grid/keyboard/): Every keyboard shortcut in the Kadal UI data grid, how focus moves between cells, editors and headers, and what the live region announces. - [Export](https://ui.kadal.cc/docs/data-grid/export/): Download the Kadal UI data grid as CSV or JSON, or copy it as TSV, from the toolbar menu or the api, with formatted or raw values and selected rows only. - [Density](https://ui.kadal.cc/docs/data-grid/density/): Three row heights, compact, comfortable and spacious, from the toolbar menu or a controlled prop, with a CSS variable and a data attribute for your own styling. - [Row pinning](https://ui.kadal.cc/docs/data-grid/row-pinning/): Pin a row to the top or bottom of the grid from a row-actions menu; sticky rendering, pinned rows that survive filters and pages, and how they behave with virtualisation. - [Loading and empty states](https://ui.kadal.cc/docs/data-grid/states/): The loading bar and spinner, the error state with Retry, the empty and filtered-empty states with Clear, and how to replace them with your own. - [Saved views and persistence](https://ui.kadal.cc/docs/data-grid/persistence/): Remember how a user likes to see the Kadal UI data grid (columns, sort, widths, pinning, order, grouping, density, page size) in localStorage or your own storage, and let them save named views. - [URL state](https://ui.kadal.cc/docs/data-grid/url-state/): Keep the Kadal UI data grid's filters, search and page in the URL with nuqs so a view can be shared and survives a refresh, or plug in any state source with a DataGridStateAdapter. - [Server-side data](https://ui.kadal.cc/docs/data-grid/server-side/): Let a server page, sort and filter: the server option, reading state back through the table escape hatch, the TanStack Query pattern, facets, and a cursor-paged variant. - [Accessibility](https://ui.kadal.cc/docs/data-grid/accessibility/): The ARIA roles and attributes the Kadal UI data grid emits, what it announces, how far the keyboard reaches, reduced motion and contrast, and the gaps that remain. - [Internationalisation](https://ui.kadal.cc/docs/data-grid/i18n/): Translate every string in the Kadal UI data grid with the labels option, format numbers and dates with locale and Intl, and what happens in right-to-left layouts. - [Composition and custom layouts](https://ui.kadal.cc/docs/data-grid/composition/): Build the grid from its parts with useDataGrid and DataGridRoot, every exported part and its props, and how to write a part of your own with useDataGridContext. - [API reference](https://ui.kadal.cc/docs/data-grid/api/): Every prop of DataGrid, every option of useDataGrid, the DataGridApi it returns, the parts, the column builder, the types to import and the named sort, filter and aggregation functions. - [CLI reference](https://ui.kadal.cc/docs/cli/): Every command and flag of @kadal/ui, the small CLI that wraps shadcn with the Kadal registry: init, add, list, docs, diff, info and mcp. - [AI agents and MCP](https://ui.kadal.cc/docs/ai-agents/): Let Claude Code, Cursor or any MCP client add the Kadal UI data grid to a project and use it well: the shadcn MCP server, the kadal-ui Agent Skill, and llms.txt. - [Compared with other grids](https://ui.kadal.cc/docs/compare/): How the Kadal UI data grid compares with TanStack Table, the shadcn data-table recipe, AG Grid, MUI X Data Grid, Glide Data Grid and others, and when to pick each. - [FAQ](https://ui.kadal.cc/docs/faq/): Answers about the Kadal UI data grid: licensing, why it is source and not a package, updates, Radix versus Base UI, React and Tailwind versions, Next.js, bundle size and support. - [Contributing](https://ui.kadal.cc/docs/contributing/): How to report a bug, propose a change and send a pull request to Kadal UI: the setup, the layout of the repository, how the registry is built, and what a good pull request includes. ## CLI (`npx @kadal/ui `) - init: point this project's components.json at the @kadal registry (runs `shadcn init -b base` first if there is no components.json) - add : copy items into your source, e.g. `npx @kadal/ui add data-grid` - list: everything in the registry - docs : the docs page for an item (--open opens it) - diff : what changed between your copy and the registry - info: how this project is set up - mcp [--client ]: set up the shadcn MCP server so an AI agent can add items - Options: -y/--yes, -o/--overwrite, --dry-run, --path , --cwd , --json, -h/--help, -v/--version Reference: https://ui.kadal.cc/docs/cli/. For agents and MCP: https://ui.kadal.cc/docs/ai-agents/. ## More - [Playground](https://ui.kadal.cc/playground/): edit an example in the browser and copy the code - [Changelog](https://ui.kadal.cc/changelog/): every change to the registry, by version - [Sponsor](https://ui.kadal.cc/sponsor/): GitHub Sponsors at https://github.com/sponsors/pmithunish; monthly tiers Supporter $3, Backer $10, Patron $25, Bronze $100, Silver $250, Gold $500; one-time $10 or $50. Sponsorships fund the time; the code stays MIT. ## More from Kadal - [Kadal Deck](https://deck.kadal.cc): Build a slide deck with AI, then present it with your phone as the remote. - [Kadal Store](https://store.kadal.cc): Printable planners, music, sound effects, shaders and 3D. Pay once, keep the files. - [Sanket](https://sanket.kadal.cc): Indian Sign Language recognition that runs in your browser and uploads nothing. - [Ooru](https://ooru.kadal.cc): A three-word address for every 12.5 m of Chennai, and a live map of power cuts. - [Kadal Studio](https://work.kadal.cc): The studio behind these: we build AI products end to end, for your team too. - [kadal.cc](https://kadal.cc): Everything we have shipped, as a sea you swim down through. - [pmithunish.com](https://pmithunish.com): Mithunish Prabhakaran, who builds all of it. ## Legal - [Terms](https://ui.kadal.cc/terms/): code MIT, docs text CC BY 4.0, no accounts or payments - [Privacy](https://ui.kadal.cc/privacy/): no analytics, no cookies; a theme and package-manager preference in localStorage