DocsExamples

Examples

Expanding Tree Example

A Shadcn Table example demonstrating expandable sub-rows in a tree structure

Shadcn Table supports showing rows in a expanding tree structure. This example is the simplest implementation of this feature where each row of data potentially has a special subRows property that contains an array of sub rows. You don't have to follow this exact structure, but this is how ST will expect to find your sub rows by default.

Learn more about how to customize this in the expanding sub-rows feature guide.

Try it

  1. Click the arrow on Dylan Murray. His sub-rows hide.
  2. Open search and type Jordan. Matching sub-rows show with their parent rows.
Storybook