Tree Expanded 1 - Default expanded

Pro

Tree with defaultExpandedIds preset to open specific folders on load.

Shadcn Tree Expanded 1 component

Component data

ID
tree/tree-expanded-1
Access
pro
Created
May 23, 2026
Type
example
Libraries
Radix UI, Base UI, React Aria

Tree Expanded 1 component design & features

This example passes defaultExpandedIds to TreeProvider so the project and src folders start expanded when the tree mounts.

Preset expansion helps onboarding flows, docs sidebars, and dashboards surface important folders immediately without extra clicks.