Nested Headers

Group related columns under parent headers for clearer structure.

Group columns with children

Add a children array to a parent column. The parent is a header group (no cell data); leaf columns hold the values and can use sorting, filtering, and other column props as usual. Parent width spans its children.

TypeScript
{
label: "Test Scores",
children: [
{ accessor: "math", label: "Math", width: 80, type: "number" },
{ accessor: "science", label: "Science", width: 80, type: "number" },
{ accessor: "english", label: "English", width: 80, type: "number" },
],
}

Multiple levels

Nest further by adding children on a child column.

TypeScript
{
label: "Academics",
children: [
{
label: "STEM",
children: [
{ accessor: "math", label: "Math", width: 80, type: "number" },
{ accessor: "science", label: "Science", width: 80, type: "number" },
],
},
{ accessor: "english", label: "English", width: 80, type: "number" },
],
}

Example

Props

Nested Headers Configuration

PropertyRequiredDescriptionExample
ColumnDef.children
Optional
Child columns grouped under this parent header. Creates a hierarchical header structure.