RayCraftDocs
v1.0.3 raycraft.dev
On this page

ScrollSpy

Free

An in-page contents list that highlights the heading currently at the top of the screen. It finds the headings with a CSS selector (headings need an id), marks the current link with aria-current and links with plain fragments, so it works without scripts too. Call RefreshAsync after the headings change.

Example

ScrollSpy control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
OffsetintDistance from the top, in pixels, at which a heading counts as current (default 80).
SelectorstringCSS selector of the headings to list (default main h2[id], main h3[id]).
StylestringInline style added to the root element.

Package

ScrollSpy is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.