HtmlForgeX

API Reference

Class

TablerDropdown

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element

Tabler dropdown component for menus and navigation

Inheritance

Constructors

public TablerDropdown(String toggleText) #

Initializes a new instance of the TablerDropdown class

Parameters

toggleText System.String requiredposition: 0
The text displayed on the dropdown toggle button

Methods

public TablerDropdown Alignment(TablerDropdownAlignment alignment) #
Returns: TablerDropdown

Set dropdown menu alignment

Parameters

alignment HtmlForgeX.TablerDropdownAlignment requiredposition: 0
public TablerDropdown ButtonSize(TablerButtonSize size) #
Returns: TablerDropdown

Set button size for dropdown toggle

Parameters

size HtmlForgeX.TablerButtonSize requiredposition: 0
public TablerDropdown ButtonVariant(TablerButtonVariant variant) #
Returns: TablerDropdown

Set button variant for dropdown toggle

Parameters

variant HtmlForgeX.TablerButtonVariant requiredposition: 0
public static TablerDropdown Create(String toggleText, Action<TablerDropdown> configure) #
Returns: TablerDropdown

Create dropdown with fluent configuration

Parameters

toggleText System.String requiredposition: 0
configure System.Action{HtmlForgeX.TablerDropdown} requiredposition: 1
public TablerDropdown Custom(Action<HtmlTag> configure) #
Returns: TablerDropdown

Add custom content

Parameters

configure System.Action{HtmlForgeX.HtmlTag} requiredposition: 0
public TablerDropdown Dropend(Boolean dropend = true) #
Returns: TablerDropdown

Make dropend (opens to the right)

Parameters

dropend System.Boolean = true optionalposition: 0
public TablerDropdown Dropstart(Boolean dropstart = true) #
Returns: TablerDropdown

Make dropstart (opens to the left)

Parameters

dropstart System.Boolean = true optionalposition: 0
public TablerDropdown Dropup(Boolean dropup = true) #
Returns: TablerDropdown

Make dropup (opens upward)

Parameters

dropup System.Boolean = true optionalposition: 0
GetButtonVariantClass() #

Get button variant CSS class

public TablerDropdown Header(String text) #
Returns: TablerDropdown

Add header

Parameters

text System.String requiredposition: 0
Item 3 overloads
public TablerDropdown Item(String text, String href = null) #
Returns: TablerDropdown

Add dropdown item

Parameters

text System.String requiredposition: 0
href System.String = null optionalposition: 1
public TablerDropdown Item(String text, TablerIconType icon, String href = null) #
Returns: TablerDropdown

Add dropdown item with icon

Parameters

text System.String requiredposition: 0
icon HtmlForgeX.TablerIconType requiredposition: 1
href System.String = null optionalposition: 2
public TablerDropdown Item(Action<DropdownItem> configure) #
Returns: TablerDropdown

Add dropdown item with configuration

Parameters

configure System.Action{HtmlForgeX.DropdownItem} requiredposition: 0
RegisterLibraries() #

Registers the required libraries for this component

public TablerDropdown Split(Boolean split = true) #
Returns: TablerDropdown

Make split button dropdown

Parameters

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

Renders the dropdown to HTML string

Returns

HTML representation of the dropdown