---
id: "packages/active-grid/api/use-responsive-columns"
title: "Use responsive columns"
description: "useResponsiveColumns, UseResponsiveColumnsOptions: generated from the source of active-grid."
url: "/packages/active-grid/api/use-responsive-columns"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:use-responsive-columns"
---

# Use responsive columns

Exported by `@workspace/active-grid`. Generated from the package source; part of [the index of every export](/packages/active-grid/api).

## Functions, hooks and constants

**useResponsiveColumns**: `<TData extends Record<string, unknown>>(publicGrid: Grid<TData>, scrollElement: HTMLElement \| null, options: UseResponsiveColumnsOptions) => void`

Watches the grid container width via ResizeObserver and auto-toggles
column visibility based on `meta.responsivePriority` breakpoints.

Only manages columns that have a `responsivePriority` — user-toggled
visibility of other columns is not affected.

## Types

**UseResponsiveColumnsOptions**

```ts
interface UseResponsiveColumnsOptions {
  enabled: boolean;
  breakpoints?: Record<number, number>;
}
```
