HtmlForgeX

API Reference

Class

TablerAccordion

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element

Accordion container composed of expandable TablerAccordionItem elements.

Inheritance

Constructors

Methods

AddItem 4 overloads
public TablerAccordion AddItem(TablerAccordionItem item) #
Returns: TablerAccordion

Adds a fully configured accordion item to the container.

Parameters

item HtmlForgeX.TablerAccordionItem requiredposition: 0
The item to add.

Returns

The current TablerAccordion instance.

public TablerAccordionItem AddItem(String title) #
Returns: TablerAccordionItem

Creates a new accordion item with the specified title.

Parameters

title System.String requiredposition: 0
The accordion item title.

Returns

The created TablerAccordionItem for further configuration.

public TablerAccordionItem AddItem(String title, Element content) #
Returns: TablerAccordionItem

Adds a new item and allows further configuration via an action.

Parameters

title System.String requiredposition: 0
The accordion item title.
item System.Action{HtmlForgeX.TablerAccordionItem} requiredposition: 1
Callback used to configure the new item.

Returns

The configured TablerAccordionItem.

AddItem(System.String title, HtmlForgeX.Element content) #

Adds a new item using the specified title and content element.

Parameters

title System.String required
The accordion item title.
content HtmlForgeX.Element required
Content to display when the item is expanded.

Returns

The created TablerAccordionItem.

public TablerAccordion AlwaysOpen(Boolean alwaysOpen = true) #
Returns: TablerAccordion

Allows multiple accordion items to be open simultaneously

Parameters

alwaysOpen System.Boolean = true optionalposition: 0
public TablerAccordion Behavior(AccordionBehavior behavior, String persistKey = null) #
Returns: TablerAccordion

Sets advanced accordion behavior using flags.

Parameters

behavior HtmlForgeX.AccordionBehavior requiredposition: 0
Behavior flags to apply.
persistKey System.String = null optionalposition: 1
Optional persistence key (overrides the generated id when set).
public TablerAccordion Color(TablerColor color) #
Returns: TablerAccordion

Sets the accordion color theme

Parameters

color HtmlForgeX.TablerColor requiredposition: 0
public TablerAccordion Debug(Boolean enabled = true) #
Returns: TablerAccordion

Enable inline debug for this accordion (adds data-hfx-debug and turns on console logging & header chips).

Parameters

enabled System.Boolean = true optionalposition: 0
public TablerAccordion EnableCopyTitleButtons(Boolean enable = true, String tooltip = "Copy") #
Returns: TablerAccordion
EditorBrowsable(2)

Enable small copy icons next to titles for all items in this accordion.

Parameters

enable System.Boolean = true optionalposition: 0
tooltip System.String = "Copy" optionalposition: 1
public TablerAccordion FullWidthLines(Boolean enabled = true) #
Returns: TablerAccordion

Controls whether the accordion section dividers visually span the full card width (edge-to-edge). When enabled, the accordion container applies negative horizontal margins to offset typical card-body padding.

Parameters

enabled System.Boolean = true optionalposition: 0
public TablerAccordion ItemHeaderSize(Int32 step) #
Returns: TablerAccordion

Sets a default font-size step (Bootstrap fs-1..fs-6) for all item headers unless overridden per-item via Int32).

Parameters

step System.Int32 requiredposition: 0
public TablerAccordion PersistState(String key = null) #
Returns: TablerAccordion
EditorBrowsable(2)

Persist open/closed state across reloads. Uses the HtmlForgeX storage helper to fall back to sessionStorage/history when localStorage is unavailable (e.g., file:// reports). If key is not provided, an auto key derived from titles is used.

Parameters

key System.String = null optionalposition: 0
RegisterLibraries() #

Registers libraries required by the accordion component.

public TablerAccordion Searchable(Boolean enable = true) #
Returns: TablerAccordion
EditorBrowsable(2)

Adds a small search box above this accordion and enables client-side filtering by header text (including inline badges and trailing header content).

Parameters

enable System.Boolean = true optionalposition: 0
public TablerAccordion SearchDebounce(Int32 milliseconds) #
Returns: TablerAccordion

Sets debounce in milliseconds for the search input (default 150ms). Applies data-hfx-acc-debounce attribute.

Parameters

milliseconds System.Int32 requiredposition: 0
public TablerAccordion SearchHelp(Boolean enable = true) #
Returns: TablerAccordion

Show a compact help hint below the search box with examples of AND / OR / NOT / phrases.

Parameters

enable System.Boolean = true optionalposition: 0
public TablerAccordion SearchHelpIcon(Boolean show = true) #
Returns: TablerAccordion

Shows a small tooltip icon next to the search box that explains the query syntax. Enabled by default.

Parameters

show System.Boolean = true optionalposition: 0
public TablerAccordion SearchPlaceholder(String placeholder) #
Returns: TablerAccordion
EditorBrowsable(2)

Sets a custom placeholder text for the accordion search box (when Boolean) is enabled).

Parameters

placeholder System.String requiredposition: 0
public TablerAccordion SearchShowOperatorsInPlaceholder(Boolean show = true) #
Returns: TablerAccordion

Controls whether the placeholder shows operator hints (AND/OR/"phrase"/-NOT). Default is off to keep it short.

Parameters

show System.Boolean = true optionalposition: 0
public TablerAccordion SectionStyle(Boolean enable = true) #
Returns: TablerAccordion

Convenience helper to switch to the Section style.

Parameters

enable System.Boolean = true optionalposition: 0
public TablerAccordion Settings(Action<AccordionSettings> configure) #
Returns: TablerAccordion

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

Parameters

configure System.Action{HtmlForgeX.AccordionSettings} requiredposition: 0
public TablerAccordion SingleOpenClosable(Boolean enable = true) #
Returns: TablerAccordion
EditorBrowsable(2)

Keeps at most one item open at a time but allows closing the last open item (implemented without using Bootstrap's data-bs-parent to permit closing the last). When enabled, sibling items close automatically on open.

Parameters

enable System.Boolean = true optionalposition: 0
public TablerAccordion Style(TablerAccordionStyle style) #
Returns: TablerAccordion

Sets the accordion visual style (e.g. Section).

Parameters

style HtmlForgeX.TablerAccordionStyle requiredposition: 0
public override String ToString() #
Returns: String

Initializes or configures ToString.

public TablerAccordion Type(TablerAccordionType accordionType) #
Returns: TablerAccordion

Sets the accordion type (Default, Flush, Tabs, Inverted, Plus)

Parameters

accordionType HtmlForgeX.TablerAccordionType requiredposition: 0

Properties

public List<TablerAccordionItem> Items { get; set; } #

Gets the accordion items that will be rendered.