# RowMetrics (@salmonui/core/virtual)

> The RowMetrics interface of @salmonui/core/virtual: Vertical metrics of the visible row model. Offsets are in virtual px.

Canonical: https://salmonui.dev/docs/reference/core/virtual/RowMetrics

```ts
import type { RowMetrics } from '@salmonui/core/virtual';
```

Entry index: https://salmonui.dev/docs/reference/core/virtual (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/core/virtual.md).

## Reference

Kind: interface

```ts
interface RowMetrics {
    readonly count: number;
    readonly totalHeight: number;
    offsetOf(index: number): number;
    heightOf(index: number): number;
    indexAt(offset: number): number;
}
```

Vertical metrics of the visible row model. Offsets are in virtual px.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `count` | `readonly count: number;` |  |  |
| `totalHeight` | `readonly totalHeight: number;` |  |  |
| `offsetOf` | `offsetOf(index: number): number;` |  | Top offset of the row at `index` (`index === count` returns `totalHeight`). |
| `heightOf` | `heightOf(index: number): number;` |  |  |
| `indexAt` | `indexAt(offset: number): number;` |  | Index of the row that contains `offset`, clamped to `[0, count - 1]`; 0 when empty. |
