Velocity X Components

Long-form

Article Table of Contents

Sticky outline for long-form pages that tracks reading position automatically — the active section highlights itself as the reader scrolls, with no scroll-handler jank. Collapses to a tap-to-open "Jump to section" list on mobile instead of eating sidebar space that isn't there.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add article-toc

Built for astro.

Full docs for Article Table of Contents →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.1
Article Table of Contents
On this page

Props

NameTypeRequiredDefaultDescription
itemsTocItem[]Yes
titlestringNo'On this page'

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/article-toc/TableOfContents.astro

Using the Article Table of Contents component

Install it with velocityx add article-toc. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Long-form.