Usage
Headless column visibility and ordering management for Table. Provides filtered columns, toggle helpers, and pre-built MultiSelector options for a column picker UI.
tsimport {useTableColumnSettings} from '@astryxdesign/core/Table'
Parameters
| Param | Type | Description |
|---|---|---|
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 with a column visibility picker in the toolbar. Toggle columns on and off.
Use with shadcn
Already using the shadcn registry workflow? Install the real Astryx package and a local public re-export. Component implementation source stays in Astryx. How compatibility works.
This install URL expires with the draft preview.Install the editable showcase compositionbashnpx shadcn@latest add https://astryx-pxujcw3w9-fbopensource.vercel.app/r/hooks/use-table-column-settings.json
bashnpx shadcn@latest add https://astryx-pxujcw3w9-fbopensource.vercel.app/r/examples/table/column-settings.json