mljr-ui · showcase

Table of Contents

Scroll-spy navigation for long-form content. Highlights active section via IntersectionObserver. Can auto-detect headings.

layout table-of-contents

Usage

layout.TableOfContents(layout.TOCProps{Sticky: true},
    layout.TOCItem{ID: "intro", Label: "Introduction", Level: 2},
    layout.TOCItem{ID: "usage", Label: "Usage", Level: 2},
    layout.TOCItem{ID: "api", Label: "API Reference", Level: 3},
)