DocsExamples

Examples

Custom Headless Example

A custom headless example of Shadcn Table which shows how you can use the useShadcnTable hook to build with your own UI components

For advanced use cases where you want to be in 100% control of your UI components, you can use Shadcn Table in a more headless way, kind of like how you would use stock TanStack Table.

The power and flexibility here is almost limitless, as you can combine some already built-in Shadcn Table components alongside your own custom components. For the ST components to work properly, all you need to do is pass the table object returned from the useShadcnTable hook.

To make your own wrapper the full-screen element, spread containerProps from useST_FullScreenContainer(table) on it: it adds the full-screen classes, and Esc leaves full screen.

Try it

  1. Type Ohio in Search. Only rows from Ohio remain.
  2. Tick a row. 1 of 12 row(s) selected shows.
  3. Click page 2. The next five rows show.
Storybook