{"library":"sphinx-togglebutton","title":"Sphinx Toggle Button","type":"library","description":"Sphinx Toggle Button is a Sphinx extension that enables users to add toggle functionality to documentation, allowing them to collapse or expand sections of content and admonitions. The library is actively maintained, with frequent patch releases addressing fixes and minor releases introducing new features. The current version is 0.4.5.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install sphinx-togglebutton"],"cli":null},"imports":["extensions = ['sphinx_togglebutton'] # in conf.py"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/executablebooks/sphinx-togglebutton","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sphinx-togglebutton/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"# conf.py\nextensions = [\n    'sphinx_togglebutton',\n    # ... other extensions\n]\n\n# example.rst or example.md\n\n.. note:: Click to toggle\n   :class: dropdown\n\n   This content is initially hidden and can be toggled by clicking the admonition title.\n\n\n.. toggle:: Show/Hide Arbitrary Content\n\n   This entire block of content, including paragraphs and other directives,\n   will be hidden behind a toggle button.\n\n   - Item 1\n   - Item 2\n","lang":"python","description":"To enable sphinx-togglebutton, add 'sphinx_togglebutton' to the `extensions` list in your Sphinx project's `conf.py` file. Once enabled, you can make admonitions collapsible by adding `:class: dropdown` to them, or hide arbitrary blocks of content using the `.. toggle::` directive.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"0.4.5","pypi_latest":"0.4.5","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":5.6,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"92.7M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":5.1,"import_time_s":null,"mem_mb":null,"disk_size":"93M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"101.9M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":5.2,"import_time_s":null,"mem_mb":null,"disk_size":"102M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"102.1M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":5.9,"import_time_s":null,"mem_mb":null,"disk_size":"103M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"102.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":5.8,"import_time_s":null,"mem_mb":null,"disk_size":"102M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"92.0M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"sphinx-togglebutton","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":6.2,"import_time_s":null,"mem_mb":null,"disk_size":"93M"}]}}