HtmlForgeX

API Reference

Class

TablerScrollSpy

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element

ScrollSpy container modeled after Tabler's demo. Renders a left vertical nav that highlights the current section while scrolling the right content pane.

Inheritance

Constructors

Methods

AddSection 2 overloads
public TablerScrollSpy AddSection(String title, Action<ElementContainer> content) #
Returns: TablerScrollSpy

Adds a section with a generated id based on the title.

Parameters

title System.String requiredposition: 0
content System.Action{HtmlForgeX.ElementContainer} requiredposition: 1
public TablerScrollSpy AddSection(String id, String title, Action<ElementContainer> content) #
Returns: TablerScrollSpy

Adds a section with an explicit id.

Parameters

id System.String requiredposition: 0
title System.String requiredposition: 1
content System.Action{HtmlForgeX.ElementContainer} requiredposition: 2
public TablerScrollSpy AutoStackSections(Boolean enable = true) #
Returns: TablerScrollSpy

Enables automatic vertical spacing between elements inside the content area using Bootstrap's vstack+gap utilities. On by default for comfortable spacing without per-component margins.

Parameters

enable System.Boolean = true optionalposition: 0
GetAuxiliaryChildren() #

Ensure nested section content receives the Document reference early so libraries can register.

public TablerScrollSpy IntraSectionGap(TablerSpacing spacing) #
Returns: TablerScrollSpy

Sets the small gap used within each section (between heading and its content) when automatic stacking is enabled. Defaults to Small (gap-2).

Parameters

spacing HtmlForgeX.TablerSpacing requiredposition: 0
public TablerScrollSpy LeftWidth(TablerColumnNumber width) #
Returns: TablerScrollSpy

Sets the left navigation column width (default: col-sm-2).

Parameters

width HtmlForgeX.TablerColumnNumber requiredposition: 0
public TablerScrollSpy Mode(ScrollSpyMode mode) #
Returns: TablerScrollSpy

Selects how scrolling behaves: ContainerScroll (default), CardBodyScroll, or PageScroll.

Parameters

mode HtmlForgeX.TablerScrollSpy.ScrollSpyMode requiredposition: 0
public TablerScrollSpy Offset(Int32 px) #
Returns: TablerScrollSpy

Sets the Bootstrap ScrollSpy offset in pixels.

Parameters

px System.Int32 requiredposition: 0
public TablerScrollSpy ScrollHeight(String cssHeight) #
Returns: TablerScrollSpy

Sets the CSS height for the scroll area when using ContainerScroll or CardBodyScroll. Examples: "75vh" (default), "60vh", "500px", "calc(100vh - 12rem)".

Parameters

cssHeight System.String requiredposition: 0
public TablerScrollSpy SectionGap(TablerSpacing spacing) #
Returns: TablerScrollSpy

Sets the vertical gap (0..5) between top-level items inside the content area when automatic stacking is enabled. Defaults to the document's DefaultStackGap.

Parameters

spacing HtmlForgeX.TablerSpacing requiredposition: 0
public TablerScrollSpy Settings(Action<TablerScrollSpySettings> configure) #
Returns: TablerScrollSpy

Groups less-common options under a single fluent entry point to keep IntelliSense lean.

Parameters

configure System.Action{HtmlForgeX.TablerScrollSpySettings} requiredposition: 0
public TablerScrollSpy StickyNav(Boolean sticky = true) #
Returns: TablerScrollSpy

Sets whether the left nav is sticky.

Parameters

sticky System.Boolean = true optionalposition: 0
public override String ToString() #
Returns: String

Render the ScrollSpy layout and content.

public TablerScrollSpy UsePills(Boolean pills = true) #
Returns: TablerScrollSpy

Uses nav-pills styling (true) or plain vertical nav (false).

Parameters

pills System.Boolean = true optionalposition: 0
public TablerScrollSpy WrapContentInCard(Boolean enabled = true, Boolean large = true) #
Returns: TablerScrollSpy

Wraps content sections in a card (default true). If set, uses a large card body by default.

Parameters

enabled System.Boolean = true optionalposition: 0
large System.Boolean = true optionalposition: 1