Examples
Sticky Row Selection Example
An example of Shadcn Table which shows how to pin individual rows as they get selected and have them be sticky and stay in view while scrolling.
Shadcn Table has the ability to pin rows as they are selected and keep them in view while scrolling. In this example, when rows are selected, they will initially appear to stay in place, but when the user scrolls up or down, the selected rows will stick to the top or bottom of the table. Learn more about row pinning in the Row Pinning Feature Guide.
Try it
- Scroll down inside the table. Ervin Reinger, already selected, sticks to the top.
- Tick another row. It sticks too when it scrolls out of view.
- Click
Clear selection. The rows unpin.
Related guides
Static Row Pinning Example
An example of Shadcn Table which shows how to pin individual rows to the top or bottom of the table to keep them in view while scrolling.
Row Virtualization Example
An example of a Shadcn Table with row virtualization enabled to achieve higher performance when rendering large data sets