DocsExamples

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

  1. Scroll the table right. State stays on the left and City on the right.
  2. Click First Name and choose Pin to start. It joins State on the left.
  3. Click State and choose Unpin. It goes back among the other columns.
Storybook