DocsExamples

Examples

Persistent View Example

An example of Shadcn Table that saves the view to localStorage and restores it on reload.

With persistViewSettings: true, Shadcn Table stores the view in localStorage and restores it on reload. Change a few settings or drag a column header, then reload the page. Learn more in the View Settings Guide.

Try it

  1. Turn on Row numbers above the table, then reload the page. The row numbers are still there.
  2. Drag the Status header before Name and reload. The new order is kept.
  3. Open View settings and click Reset view. The table returns to its first look.
Storybook