Examples
Column Pinning Example
An example of Shadcn Table which shows how to pin columns to the start or the end so they stay in place while the rest scroll sideways.
Shadcn Table has an easy-to-enable column pinning feature. Columns can be pinned to the left or right of the table, and the column will be frozen in place while the rest of the table scrolls horizontally. See the Column Pinning Feature Guide for more information.
Try it
- Scroll the table right.
Statestays on the left andCityon the right. - Click
First Nameand choosePin to start. It joinsStateon the left. - Click
Stateand chooseUnpin. It goes back among the other columns.