
Product
Introducing Data Exports
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.
bit-docs-html-toc
Advanced tools
A table of contents for use with bit-docs-generate-html.



To use, add bit-docs-html-toc to your bit-docs dependencies in package.json:
{
...
"bit-docs": {
"dependencies": {
"bit-docs-html-toc": "$VERSION"
}
}
}
Where $VERSION is the latest version on npm.
In your template add a <bit-toc> element:
<bit-toc></bit-toc>
<bit-toc> supports the following attributes:
By default, all heading tags children of the first article tag on the page will
be collected to create the table of contents; if you want to use a different element
just do:
<bit-toc
heading-container-selector="#my-custom-selector"
>
</bit-toc>
The table of contents will be injected into this element at run time.
By default, only h2 elements are collected. You
can change to include <h3> elements by setting depth like:
<bit-toc depth="2"></bit-toc>
Alternatively, the number of child headers that will be included in the TOC, use the
@outline tag like so:
@outline 2
If you want <li>'s to be within an <ol> instead of a <ul>, this
can be configured like:
<bit-toc child-tag="ol"></bit-toc>
Call .highlight() to force an update of the active or completed
class names on the <li> elements:
document.querySelector("bit-toc").highlight()
This happens automatically when the heading-container-selector
element is scrolled.
FAQs
table of contents bit-docs plugin
The npm package bit-docs-html-toc receives a total of 47 weekly downloads. As such, bit-docs-html-toc popularity was classified as not popular.
We found that bit-docs-html-toc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.

Research
/Security News
Docker and Socket have uncovered malicious Checkmarx KICS images and suspicious code extension releases in a broader supply chain compromise.