Cell Renderer

Render custom cell UI — badges, links, progress bars, and other interactive content — with cellRenderer.

Add a cell renderer

Set cellRenderer on a column. Return text, or framework UI (components / DOM nodes). Prefer valueFormatter for plain text formatting.

React TSX
const StatusCell = ({ value }) => {
const status = String(value);
const color = status === "active" ? "#10B981" : "#6B7280";
return <span style={{ color, fontWeight: 600 }}>{status}</span>;
};
const columns: ReactColumnDef[] = [
{ accessor: "status", label: "Status", width: 120, cellRenderer: StatusCell },
];

Wrap formatted values

Pair with valueFormatter, then read formattedValue in the renderer when you only need custom chrome around already-formatted text.

TypeScript
{
accessor: "salary",
label: "Salary",
type: "number",
valueFormatter: ({ value }) =>
typeof value === "number" ? `$${value.toLocaleString()}` : "",
cellRenderer: ({ formattedValue }) => (
<strong>{formattedValue}</strong>
),
}

Example

Badges, links, progress, and more. Use Code or StackBlitz for the full example.

Props

Cell Renderer Configuration

PropertyRequiredDescriptionExample
ColumnDef.cellRenderer
Optional
Custom cell content. Framework adapters accept components or render functions; vanilla returns string/number/null or a DOM Node.

Renderer arguments

CellRendererProps

PropertyRequiredDescriptionExample
accessor
Required
The column accessor/key for the cell being rendered
colIndex
number
Required
The column index (0-based)
row
Required
The complete row object containing all data for this row
rowIndex
number
Required
The row index (0-based)
rowPath
(string | number)[]
Optional
Array path through the nested data structure to reach this row. Each element is either a number (array index) or string (property name). Useful for accessing nested/hierarchical data.
theme
Required
Current theme of the table
Required
The raw cell value
formattedValue
string | number | string[] | number[] | boolean | null | undefined
Optional
The formatted cell value (output from valueFormatter if defined). Use this for display purposes when you need both raw and formatted values.