Interactive Scrollspy Rail Needs plugin

The Scrollspy Rail block

A native block section whose sticky index follows the reader through named content sections. Each top-level Group becomes a section, its first heading supplies the link label, and ordinary anchor links remain useful without JavaScript.

Case scrollspy anatomy·Twenty Twenty-FivePlays best in its own window

Open in its own window Rendered by WordPress in Twenty Twenty-Five.Open this pattern

3 patterns3 designs7 settingspatternpaste/scrollspy-railRequires a block theme on WordPress 6.7 to 7.0. Classic themes and page builders are outside our supported setup. Adaptive patterns use the block theme’s colour, spacing and typography presets; styled variations declare their own colours or type.

The designs

3 patterns, 3 designs between them. Each is this one block wrapped in core blocks, so everything around it takes its colours, spacing and type from your theme.

All 36 interactive patterns

How it moves

A sticky contents rail for substantial pages, built from ordinary Group, Heading, Paragraph, Image and Table blocks. The first heading in each section names its anchor, so the editor stays recognisably WordPress and the saved content remains readable if the companion plugin is removed.

What you can set before you copy

Every one of these is an attribute of the block, so it is the same control the editor's inspector offers after you have pasted. The Motion drawer on a pattern's own page writes your values into the markup before you copy it.

SettingAttributeValuesDefault
Track the current sectionpatternpasteMotionOn or offOn
Number the sectionspatternpasteNumberedOn or offOn
Show reading progresspatternpasteProgressOn or offOn
Reading linepatternpasteLine20 to 80%, in steps of 136%
Index widthpatternpasteRailWidth160 to 360px, in steps of 4240px
Index gappatternpasteGap24 to 120px, in steps of 464px
Sticky offsetpatternpasteStick0 to 160px, in steps of 432px
Back to the interactive patterns