# Table Of Contents In SidePanel

**URL:** <https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919>\
**Category:** Plugs and Libraries\
**Created:** [February 24, 2026, 8:26pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919 "2026-02-24T20:26:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [February 24, 2026, 8:26pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/1 "2026-02-24T20:26:40Z")

</div>

### 🧑‍💻 If your workflow is relying strong on Table of Contents & Headings Navigation & Folding/Unfolding them, I might have a treat for you!

Here is a proof of concept(for now) I've been tinkering with in my spare time:

It's not finished yet, but here are some of the features so far:

What it does:

- Renders the Table of Contents from your current page's headings, pinned as a right-hand sidebar panel
- Clicking any heading navigates you directly to that position in the document
- Mirrors fold state one-directionally with the editor, collapsing or expanding a Heading in the TOC folds or unfolds the corresponding section in the document.
- ~~Ancestor headings and their connecting spine lines highlight on hover, keeping the hierarchy visually clear~~
- Reloads automatically whenever you switch to a new page, always in sync without manual refresh

It's still a work in progress, there's polish left to do and a few edge cases to iron out.  
I'll be cleaning up the code and posting the full plug once it's a bit more stable.

Feedback and ideas very welcome, drop a comment below! 🙏

---

<div class="post-metadata">

**Author:** ![cladv](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/c/4bbf92/32.png) [@cladv](https://community.silverbullet.md/u/cladv)\
**Post date:** [February 25, 2026, 12:50am UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/2 "2026-02-25T00:50:57Z")

</div>

> [@Mr.Red](#):
>
> Feedback and ideas very welcome, drop a comment below! 🙏

Hi. Very nice!.

I noticed that when Im on mobile, most of the time I dislike the TOC and frontmatter, because they always are at top. I disabled the entire TOC and created a special function to "force" the TOC on specific pages where is usefull for me.

Not quite sure how much space left for the editor/page when having TOC as side panel. Pretty sure that on laptop or big screens will be ok (and nice).

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [February 28, 2026, 10:13pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/3 "2026-02-28T22:13:11Z")

</div>

# 📚 Library Release: TOC in SidePanel

Hey everyone! I just released the **Table of Contents for the Sidepanel.**

## What it does

- Renders a live, interactive TOC for the current page in the left or right (or bottom) side panel

- Tree-style branch lines with expand/collapse per section

- Syncs folding with the editor, collapse a heading in the TOC and it folds in the editor too

- Toolbar with expand all, collapse all, and refresh buttons

- Persists across page navigation, the panel stays open as you move between pages until you turn it off

## Links

- [🗂 **My Repository**](https://github.com/Mr-xRed/silverbullet-libraries/blob/main/Repository/Mr-xRed.md)
- [**📄 TOCInSidePanel.md**](https://github.com/Mr-xRed/silverbullet-libraries/blob/main/TOCInSidePanel.md)
- `https://github.com/Mr-xRed/silverbullet-libraries/blob/main/TOCInSidePanel.md`

Feedback and bug reports are welcome. Hope you find it useful! 🙌

---

<div class="post-metadata">

**Author:** ![Mike](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@Mike](https://community.silverbullet.md/u/Mike)\
**Post date:** [March 2, 2026, 12:43pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/4 "2026-03-02T12:43:18Z")

</div>

Very nice! Feels to me like a side panel is a logical place for a TOC, so you can easily jump on the page.

One question - is it possible to follow the default Silverbullet theming 'out of the box'? I'm using the Nord theme with very minimal changes compared to 'out of the box' Silverbullet and the TOC side panel does not fit with the theme at all.

I'll admin that I'm not super comfortable with CSS theming (aka it confuses the hell out of me).

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [March 2, 2026, 2:22pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/5 "2026-03-02T14:22:27Z")

</div>

Absolutely, I’ll be adding that later, but first I wanted to iron out the functionality and features and as last to bind the color variables to existing ones from the main.css/theme space-styles.

---

<div class="post-metadata">

**Author:** ![Mike](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@Mike](https://community.silverbullet.md/u/Mike)\
**Post date:** [March 2, 2026, 2:26pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/6 "2026-03-02T14:26:52Z")

</div>

Great!

One potential bug:

1. Toggle the TOC
2. System: Reload

Now there are two overlapping TOC panels - this is not directly visible, but I have to close the window twice to disable the side-TOC again.

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [March 2, 2026, 2:55pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/7 "2026-03-02T14:55:59Z")

</div>

They are not two overlapping panels. It’s the same issue like with other panel Addons/Libraries/Plugs with toggle feature. When refreshing or reloading. The state of the toggle button somehow isn’t persistent when it’s reloaded. So it’s just the toggle command acting weird when persistent after reload. This happens with all toggleble plugs in sidepanel. A workaround would be to assume that the panel is toggle’d on even after reload. But that’s like saying that the panel is toggled on without knowing its actual state.

---

<div class="post-metadata">

**Author:** ![ezeldenonce](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/e/fbc32d/32.png) [@ezeldenonce](https://community.silverbullet.md/u/ezeldenonce)\
**Post date:** [April 7, 2026, 4:03am UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/8 "2026-04-07T04:03:03Z")

</div>

@Mr.Red Wow, this was the only feature I miss from the Obsidian. Awesome work, mate. Is it possible to disable top level TOC when toggling side TOC?

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [April 7, 2026, 10:13am UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/9 "2026-04-07T10:13:54Z")

</div>

its technically possible, but the library will override the system/std.widget.toc, so the widget wont be system toc wont be controlled by the system, but by the library. so if the toc is disabled on a page using disableTOC:true in the forntmatter, and the TOC in sidepanel is closed, the toc will appear. until you reload the page.

---

<div class="post-metadata">

**Author:** ![ezeldenonce](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/e/fbc32d/32.png) [@ezeldenonce](https://community.silverbullet.md/u/ezeldenonce)\
**Post date:** [April 7, 2026, 11:35am UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/10 "2026-04-07T11:35:45Z")

</div>

I have completely disabled native TOC widget and use yours as primary one by adding following in the `CONFIG.md`. Thanks for this awesome work again

```space-lua
--priority: 9

-- Disable TOC widget
function widgets.toc(options)
    return
end

```

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [April 7, 2026, 11:59am UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/11 "2026-04-07T11:59:59Z")

</div>

> [@ezeldenonce](#):
>
> I have completely disabled native TOC widget

yeah, that is how i use the librar too, I by default disable the System TOC.

---

<div class="post-metadata">

**Author:** ![ryanwwest](https://community.silverbullet.md/user_avatar/community.silverbullet.md/ryanwwest/32/3526_2.png) [@ryanwwest](https://community.silverbullet.md/u/ryanwwest)\
**Post date:** [May 7, 2026, 8:12pm UTC](https://community.silverbullet.md/t/table-of-contents-in-sidepanel/3919/12 "2026-05-07T20:12:14Z")

</div>

This is awesome! I was wondering if it would be possible to dynamically scroll to and highlight which section/subsection the cursor is currently in as you peruse the file?  
(also, is this thread the correct way for bug reports and FRs? Issues isn't open in that centralized repo)
