Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

neotoc

ashutoshbw60MIT1.0.1TypeScript support: included

Ultra-smooth table of contents UI generator for your docs and blogs.

toc, table of contents, generator, smooth, framework-agnostic, docs, blogs

readme

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ashutoshbw/neotoc/refs/heads/main/.github/assets/readme-banner-dark.png"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ashutoshbw/neotoc/refs/heads/main/.github/assets/readme-banner-light.png"> Neotoc </picture>

Ultra-smooth table of contents generator for your docs and blogs.
Documentation | CodePen

npm version GitHub license npm monthly downloads bundle size GitHub Repo stars

🪄 Features

  • Ultra-smooth: It accurately highlights exactly where you are on the page, resulting in an ultra-smooth user experience.
  • Auto-scroll: Neotoc keeps itself in sync with your scroll, so you never have to hunt for your position.
  • Foldable: Easily fold and unfold nested sections.
  • Opinionated: Neotoc focuses on a single DOM structure and convention of style, so it stays efficient and free of bloat.
  • Ready-made styles: Get styled easily with carefully crafted base styles and color schemes.
  • Framework-agnostic: Neotoc is not tied to any particular library or framework, freeing you to use it anywhere DOM exists.
  • Zero dependencies: Built entirely from scratch, with no external dependencies.
  • Browser support: Works smoothly across all modern and popular web browsers.
  • Lightweight: The JavaScript bundle is 4.2KB, with ready-made CSS bundle weighing about 2.1KB (both minified and gzipped).
  • Accessible: Accessible with keyboards, touchscreens and screen readers.

📖 Documentation

For documentation, visit neotoc.vercel.app.

🤝 Contributing

Interested in contributing? Get started by reading CONTRIBUTING.md.

📄 License

The Neotoc is licensed under the MIT License.

🏅 Acknowledgments

The TOC tree view is inspired by GitHub’s file tree interface.