# DataGridAdaptive (@salmonui/data-grid)

> The DataGridAdaptive interface of @salmonui/data-grid: adaptive prop object form.

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

```ts
import type { DataGridAdaptive } 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 DataGridAdaptive {
    readonly target?: DataGridAdaptiveTarget;
    readonly rowLayout?: DataGridAdaptiveRowLayout;
    readonly breakpoint?: number;
    readonly defaultActive?: boolean;
}
```

`adaptive` prop object form.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `target` | `readonly target?: DataGridAdaptiveTarget;` | optional | `both` (default): adaptive at every width. `mobile`: only while the grid is narrower than `breakpoint`. `desktop`: only while it is at least `breakpoint` wide. Width is the grid's own container width (a container query), not the device or the window. |
| `rowLayout` | `readonly rowLayout?: DataGridAdaptiveRowLayout;` | optional | `vertical` renders each record as a stacked card of label/value fields. Default `horizontal`. |
| `breakpoint` | `readonly breakpoint?: number;` | optional | Container width in CSS px that separates `mobile` from `desktop`. Default 640. *Salmon* |
| `defaultActive` | `readonly defaultActive?: boolean;` | optional | Mode used for server rendering and hydration, before the container is measured (`mobile` / `desktop` targets). Default: false. Set it from a user-agent hint to avoid a desktop-to-adaptive switch after mount. *Salmon* |
