custom-features
What it does
This skill shows how to build a reusable feature, or plugin, that adds new state or behavior to TanStack Table. It is for advanced developers whose needs the built-in features do not cover.
When to use it
- ✓When you need reusable state or behavior that must be added to table objects.
- ✓When built-in options and typed meta cannot handle your renderer or app settings.
- ✓When you are writing a plugin that must register lifecycle hooks and table methods correctly.
Skill link
https://github.com/TanStack/table/blob/main/packages/table-core/skills/custom-features/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“The built-in TanStack Table features do not cover what I need. How do I write my own plugin?”
5 new skills a week. 1 minute to read.
How it works
It walks through declaring the feature, preserving user state, adding table and object methods during lifecycle hooks and registering the plugin with a stable feature object.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Author a custom feature
Read core and feature architecture first. Use a plugin for reusable state or behavior that must augment Table objects. Built-in options and typed tableMeta/columnMeta are usually enough for renderer callbacks and application configuration.
Implementation workflow
- Identify the state, options, and object methods the behavior owns. If it only passes callbacks or renderer data, read scoped meta typing and use meta instead.
- Before declaring plugin types or writing lifecycle hooks, read the complete plugin example. It enumerates all 10 public FeatureMaps, the API assignment helpers, lifecycle ordering, and the advanced row-model maps.
- Declare the feature key in
Plugins. Merge only FeatureMaps with matching runtime implementations; declarations alone install no behavior. - Preserve user state after defaults in
getInitialState; connect state updaters in default options. Install table methods withassignTableAPIsand object methods withassignPrototypeAPIsinside the corresponding lifecycle hooks. - Keep the feature object and
tableFeatures({ customFeature })result stable. Register the plugin throughtableFeaturesso inference and composition include it. - Verify the advertised state, options, methods, and resets on a constructed table. Each declared API must exist at runtime; reset behavior must respect the state owner.
Lifecycle boundaries
Use initTableInstanceData for mutable data owned by one table and resetTableInstanceData for clearing its transient contents. All feature initialization finishes before any constructTableAPIs hook. Keep method installation separate from data allocation.
Prototype methods are shared across the table's rows, columns, cells, or headers. Read per-object values through the method's current instance, and use the supported instance-data hooks for mutable fields. Read the example's installation rules before adding memoized methods or advanced row-model/cache wiring.
Common failures
- Types without matching runtime hooks advertise APIs that do not exist.
- Ad hoc mutation of constructed instances bypasses feature registration and inferred composition.
- Treating the density example as the only extension pattern misses column definitions and the other public FeatureMaps. Choose the maps required by the behavior; advanced row-model declarations also require runtime pipeline/cache wiring.
Installed API discovery
Inspect node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts, the exported *_FeatureMap interfaces in dist/types/, and assignTableAPIs/assignPrototypeAPIs in dist/utils.d.ts. Follow declarations under dist/features/ for comparable stock lifecycle signatures.
FAQ
When should I not write a custom feature?
The skill says that if the behavior only passes callbacks or renderer data, you should use typed meta instead.
Does declaring a feature type install its behavior?
No. The skill says declarations alone install nothing, so runtime implementations must match the declared types.
Where should the plugin be registered?
Through the tableFeatures call, so that type inference and composition include it.
Details
Original description by the author
Implement a Table v9 plugin when built-ins and typed meta are insufficient. Covers FeatureMaps, runtime lifecycle hooks, prototypes, and a complete checked example.
repo: TanStack/table
Popularity
- GitHub stars
- 29k
- Ranking position
- #9835
- License
- MIT
- Updated
- 10/21/2026
Comments
- …
More skills from this repository
getting-started
29kTeaches your agent how to build and show a data table with TanStack Table in Alpine.js, covering setup, reactive data and rendering rows.
table-state
29kTeaches your agent how to read and control table state in Alpine.js, such as the current page, so the screen updates when that state changes.
devtools
29kTeaches your agent how to register Angular tables with the TanStack Devtools panel, so developers can inspect each table while they build the app.
getting-started
29kTeaches your agent how to create and show a TanStack table in Angular, covering the injectTable setup, template rendering and updates to row data.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.