Skip to content

Table Of Contents: Allow user to collapse Table of Contents #10272

Open
@foxtrotravi

Description

@foxtrotravi

Have you read the Contributing Guidelines on issues?

Description

Here is something similar implemented in Mkdocs: squidfunk/mkdocs-material#3428

Currently, we have collapsable sidebar but there is no option to collapse the "Table Of Contents".

Has this been requested on Canny?

https://docusaurus.io/feature-requests/p/can-the-table-of-contents-be-collapsible

Motivation

The motivation of this proposal is to allow users to enter full screen mode / focus mode for reading docs and not get distracted by sidebar / table of contents.

API design

squidfunk/mkdocs-material#3428 (comment)

Have you tried building it?

No, not yet but I will try to swizzle the component for "Table Of Contents". If that works, I will add a comment here or raise a pull request myself.

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions