# DataGridViewport (@salmonui/data-grid)

> The DataGridViewport interface of @salmonui/data-grid: api.getViewport(): body scroll offsets in virtual px, body extent and rendered rows.

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridViewport

```ts
import type { DataGridViewport } from '@salmonui/data-grid';
```

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

## Reference

Kind: interface

```ts
interface DataGridViewport {
    readonly top: number;
    readonly left: number;
    readonly width: number;
    readonly height: number;
    readonly rows: VirtualRange;
}
```

`api.getViewport()`: body scroll offsets in virtual px, body extent and rendered rows.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `top` | `readonly top: number;` |  |  |
| `left` | `readonly left: number;` |  | Positive in RTL too. |
| `width` | `readonly width: number;` |  |  |
| `height` | `readonly height: number;` |  | Body extent (viewport height without header and footer rows). |
| `rows` | `readonly rows: VirtualRange;` |  |  |
