# computeRange (@salmonui/core/virtual)

> The computeRange function of @salmonui/core/virtual: Visible range for a scroll offset and viewport extent, widened by overscan items on each side. Works for rows and columns.

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

```ts
import { computeRange } 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: function

```ts
function computeRange(metrics: Metrics, offset: number, extent: number, overscan: number): VirtualRange;
```

Visible range for a scroll offset and viewport extent, widened by
`overscan` items on each side. Works for rows and columns.
