📄 tanstack/table/v8/docs/api/core/column

File: column.md | Updated: 11/15/2025

Source: https://tanstack.com/table/v8/docs/api/core/column



TanStack

Table v8v8

Search...

+ K

Auto

Log In

TanStack StartRC

Docs Examples GitHub Contributors

TanStack Router

Docs Examples GitHub Contributors

TanStack Query

Docs Examples GitHub Contributors

TanStack Table

Docs Examples Github Contributors

TanStack Formnew

Docs Examples Github Contributors

TanStack DBbeta

Docs Github Contributors

TanStack Virtual

Docs Examples Github Contributors

TanStack Paceralpha

Docs Examples Github Contributors

TanStack Storealpha

Docs Examples Github Contributors

TanStack Devtoolsalpha

Docs Github Contributors

More Libraries

Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide

Documentation

Framework

React logo

React

Version

v8

Search...

+ K

Menu

Getting Started

Core Guides

Feature Guides

Core APIs

Feature APIs

Enterprise

Examples

Framework

React logo

React

Version

v8

Menu

Getting Started

Core Guides

Feature Guides

Core APIs

Feature APIs

Enterprise

Examples

On this page

Column APIs

Copy Markdown

These are core options and API properties for all columns. More options and API properties are available for other table features .

Column API
----------

All column objects have the following properties:

### id

tsx

id: string


id: string

The resolved unique identifier for the column resolved in this priority:

  • A manual id property from the column def
  • The accessor key from the column def
  • The header string from the column def

### depth

tsx

depth: number


depth: number

The depth of the column (if grouped) relative to the root column def array.

### accessorFn

tsx

accessorFn?: AccessorFn<TData>


accessorFn?: AccessorFn<TData>

The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.

### columnDef

tsx

columnDef: ColumnDef<TData>


columnDef: ColumnDef<TData>

The original column def used to create the column.

### columns

tsx

type columns = ColumnDef<TData>[]


type columns = ColumnDef<TData>[]

The child column (if the column is a group column). Will be an empty array if the column is not a group column.

### parent

tsx

parent?: Column<TData>


parent?: Column<TData>

The parent column for this column. Will be undefined if this is a root column.

### getFlatColumns

tsx

type getFlatColumns = () => Column<TData>[]


type getFlatColumns = () => Column<TData>[]

Returns the flattened array of this column and all child/grand-child columns for this column.

### getLeafColumns

tsx

type getLeafColumns = () => Column<TData>[]


type getLeafColumns = () => Column<TData>[]

Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column.

Edit on GitHub

Table

Header Group

Partners Become a Partner

Code RabbitCode Rabbit CloudflareCloudflare AG GridAG Grid NetlifyNetlify NeonNeon WorkOSWorkOS ClerkClerk ConvexConvex ElectricElectric SentrySentry PrismaPrisma StrapiStrapi UnkeyUnkey

scarf analytics