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
- Scroll down inside the table. Raquel Kohler, already pinned, sticks to the top.
- Click
Pinon another row. It sticks too when it scrolls out of view. - Click
Pinon Raquel Kohler again. She scrolls away with the rest.
Related guides
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.
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.