useTableColumnSettings@astryxdesign/core v0.5.2 · useTableColumnSettings

Install with shadcn

Experimental compatibility. This installs the real Astryx package and creates a local public re-export; it does not copy component implementation source. How compatibility works.

This install URL expires with the draft preview.
bash
npx shadcn@latest add https://astryx-2z5i6c2u1-fbopensource.vercel.app/r/astryx-component-use-table-column-settings.json
Install the editable showcase composition
bash
npx shadcn@latest add https://astryx-2z5i6c2u1-fbopensource.vercel.app/r/astryx-example-table-column-settings-table.json

Usage

Headless column visibility and ordering management for Table. Provides filtered columns, toggle helpers, and pre-built MultiSelector options for a column picker UI.

ts
import {useTableColumnSettings} from '@astryxdesign/core/Table'

Parameters

ParamTypeDescription
columnsrequired
[]

All available columns with metadata for the settings UI. Each entry has key, label, optional isAlwaysVisible and group.

activeColumnKeysrequired
string[]

Currently active column keys, in display order. Only columns with keys in this array are shown.

onChangeActiveColumnKeysrequired
(keys: string[]) => void

Called when active columns change (toggle, reorder).

defaultColumnKeys
string[]

Default column set for "Reset to default". When omitted, reset shows all columns.

Examples

Common configurations, variations, and states.
Table — Column Settings
Open in Playground

Table with a column visibility picker in the toolbar. Toggle columns on and off.