Magoo Component UI logo Magoo Component UI
← Catalog

Policy Table of Contents

policy-toc organism experimental

A numbered, sticky contents list for a legal or policy document that tracks the current section on scroll.

Also in: Navigation

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
MidScroll

Props

NameTypeReq
title string
sections array ✓

Related components

How to use

The numbered list and the active row styling are pure CSS driven by each link's data-active attribute (data-[active=true] on the rail border and text), so it renders correctly with no JavaScript and shows in screenshots. behavior.js adds optional scroll-spy: it observes the elements the hrefs resolve to and highlights the one in view, and activates a link on click. If no hrefs resolve to real elements it stays a no-op and the authored active state holds. The portable self-init reads everything from the markup and passes no props object.

Use cases

nav WCAG AA SEO 40 dir: both ai-generated