useTableStickyColumns@astryxdesign/core v0.5.2 · useTableStickyColumns

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-sticky-columns.json

Usage

Hook that returns a TablePlugin which pins a contiguous run of columns to the start and/or end edge of the table. Pinned columns get cumulative offsets and a soft, scroll-aware shadow over the scrolling content. An empty config ({}) is a valid no-op that pins nothing.

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

Parameters

ParamTypeDescription
startKeys
string[]

Column keys pinned to the start (inline-start / left in LTR) edge: the contiguous run from the first column through the last listed key.

endKeys
string[]

Column keys pinned to the end (inline-end / right in LTR) edge: the contiguous run from the first listed key through the last column.

Examples

Common configurations, variations, and states.
useTableStickyColumns — Pinned Columns
Open in Playground

A Table using useTableStickyColumns to pin the Name column to the start edge and Status to the end edge. Scroll horizontally; pinned columns stay in view with a soft shadow over the scrolling content.