1.0.1 • Public • Published


This gitbook plugin manages large left-nav menus by visualizing only one section at a time (the active section).

NPM Version Badge

At a Glance


The high-level points of interest are:

  • On initial display, only the top-level menu items are displayed.

  • Navigating to a section with sub-content will dynamically expand it, collapsing any prior section.

  • The active section will expose the entire sub-menu depth (i.e. all it's ancestry, not just direct children).

  • Navigating between sections continues to expand only the active section (expanding the active section while collapsing any section previously expanded).

  • Animation is used to make the user experience more intuitive (i.e. they can visually see what is happening)!

  • Sections that are composed of multiple pages are supported.

This plugin has the effect of "taming" a big unruly menu structure, by exposing only one section at a time, making it more intuitive for end-user consumption.

You can see this in action at: (one of my open source projects).

This project is a significant improvement on other similar plugins.


  1. Add the "folding-menu" plugin to your book.json file:


      "plugins": [
        ... other plugins you may be using
  2. Install the plugin using one of the following options (based on your gitbook usage):

    • For usage, plugins are automatically installed.

    • For local gitbook usage run gitbook install to install and prepare all plugins for your books:

      gitbook install
    • For technical users (ex: open source documentation), install the plugin to your devDependencies as follows:

      npm install --save-dev gitbook-plugin-folding-menu


You may optionally supply the following configuration to this plugin:


      "pluginsConfig": {
        "folding-menu": {
          "animationDuration": 500,
          "sticky":            true
  • animationDuration - The animation duration in mills ... use 0 (zero) to disable animation ... DEFAULT: 400

  • sticky - Leave the last section expanded when a the current active section has NO sub-content ... DEFAULT: false

Revision History

Release What When
v1.0.1 Added Configuration September 8, 2018
v1.0.0 Initial Release September 7, 2018

v1.0.1 - Added Configuration (September 8, 2018)

v1.0.0 - Initial Release (September 7, 2018)


DownloadsWeekly Downloads






Unpacked Size

16.7 kB

Total Files


Last publish


  • kevinast