DocsExamples

Examples

Sticky Row Pinning Example

An example of Shadcn Table which shows how to pin individual rows and have them be sticky and stay in view while scrolling.

Shadcn Table has the ability to pin rows and keep them in view while scrolling. In this example, when rows are pinned, they will initially appear to stay in place, but when the user scrolls up or down, the rows will stick to the top or bottom of the table. Learn more about row pinning in the Row Pinning Feature Guide.

Try it

  1. Scroll down inside the table. Raquel Kohler, already pinned, sticks to the top.
  2. Click Pin on another row. It sticks too when it scrolls out of view.
  3. Click Pin on Raquel Kohler again. She scrolls away with the rest.
Storybook