DocsExamples

Examples

Detail Panel Example

A Shadcn Table example showing how to use expandable rows to show additional information about a row.

Shadcn Table has multiple types of "expanding" row features. In its simplest form, you can use the renderDetailPanel option to render a component when a row is clicked. This is useful for showing additional information about a row, such as a list of nested data. Learn more in the Detail Panel Feature Guide.

Try it

  1. Click the arrow on row 1. A panel opens.
  2. Click the arrow on row 2. Row 1's panel closes.
  3. Click the same arrow again. The panel closes.
  4. Click the greyed arrow on row 3 or 5. Nothing happens: these rows have no address.
Storybook