# AggregationRowConfig

> _Since v0.1.1_

Configuration for an aggregation row (footer/header row with computed values).
Replaces the core FooterRowConfig functionality.

## Properties

| Property | Type | Description |
| -------- | ---- | ----------- |
| `id?` | <code>string</code> | Optional identifier (useful for diffing or targeted updates) |
| `position?` | <code>top &#124; bottom</code> | Position: 'top' renders above grid body, 'bottom' renders below (default: 'bottom') |
| `fullWidth?` | <code>boolean</code> | If true, row rendered as single spanning cell with label |
| `label?` | <code>string &#124; (rows: unknown[], columns: <a href="/grid/api/core/interfaces/columnconfig/">ColumnConfig</a>&lt;any&gt;[]) =&gt; string</code> | Row label. Can be a static string or a function that receives the current rows and columns for dynamic content. |
| `cells?` | <code>Record&lt;string, unknown&gt;</code> | Static or computed cell values keyed by field |
| `aggregators?` | <code>Record&lt;string, <a href="/grid/plugins/pinned-rows/types/aggregatordefinition/">AggregatorDefinition</a>&gt;</code> | Per-field aggregator configuration. Can be a simple string ('sum', 'avg', etc.), a function, or an object with aggFunc and formatter. |

### Property Details

#### label

Row label. Can be a static string or a function that receives
the current rows and columns for dynamic content.

In **full-width mode** (`fullWidth: true`), the label is displayed inline before
the aggregated values.

In **per-column mode** (`fullWidth: false`, the default), the label renders as an
overlay positioned at the left edge of the row, independent of column alignment.
It does not truncate with column width.

```ts
{ label: 'Totals', aggregators: { price: 'sum' } }
```

```ts
{ label: (rows) => `Total: ${rows.length} rows` }
```

---

#### aggregators

```ts
aggregators: {
  quantity: 'sum',  // simple built-in
  price: { aggFunc: 'sum', formatter: (v) => `$${v.toFixed(2)}` }  // with formatter
}
```

---
