Browsers have this feature already built-in, and I would always recommend using that instead of installing an add-on. However, there does appear to be a 3rd party add-on that also does this:
I'm not personally familiar with this add-on and it appears to be the only one available at the moment, but please feel free to give it a try.
Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs