# GridState

**Category:** Base Components/Collections/Grid/GridState

## API

### Overview

`GridState` manages the state for a [`Grid`](./?path=/story/base-components-collections-grid--grid) component. It wraps a `CollectionState` for data, a `ToolbarCollectionState` for the toolbar, and tracks grid-specific UI state like size presets and sections. Created by [`useGridCollection`](./?path=/story/common-hooks--usegridcollection).

### Description

`GridState` is the return value of the [`useGridCollection()`](./?path=/story/base-components-collections-grid-usegridcollection--usegridcollection) hook.

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `collection` | `CollectionState<T, F>` | Yes | - | Underlying [CollectionState](./?path=/story/common-state--collectionstate) instance |
| `toolbar` | `ToolbarCollectionState<T, F>` | Yes | - | Underlying [ToolbarCollectionState](./?path=/story/common-state--toolbarcollectionstate) instance |
| `onAddItemActionComplete` | `(items: T[]) => void` | Yes | - | Reset active filters & sorting and adds new items to the collection. @param items - new items to add to the collection |

