HtmlForgeX

API Reference

Class

TablerSidebar

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element
Attributes
EditorBrowsable(2)

Tabler sidebar component for vertical navigation

Inheritance

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

public TablerSidebar() #

Initializes a new instance of the TablerSidebar class

Methods

public TablerSidebar AddItem(TablerSidebarItem item) #
Returns: TablerSidebar

Adds a preconfigured sidebar item.

Parameters

item HtmlForgeX.TablerSidebarItem requiredposition: 0
public TablerSidebar Brand(String text, String url = ".") #
Returns: TablerSidebar

Set brand text and URL

Parameters

text System.String requiredposition: 0
url System.String = "." optionalposition: 1
public TablerSidebar Collapsible(Boolean collapsible = true) #
Returns: TablerSidebar

Set collapsible behavior

Parameters

collapsible System.Boolean = true optionalposition: 0
public static TablerSidebar Create(Action<TablerSidebar> configure) #
Returns: TablerSidebar

Create sidebar with fluent configuration

Parameters

configure System.Action{HtmlForgeX.TablerSidebar} requiredposition: 0
Dropdown 2 overloads
public TablerSidebar Dropdown(String text, Action<TablerSidebarDropdown> configure) #
Returns: TablerSidebar

Add dropdown menu

Parameters

text System.String requiredposition: 0
configure System.Action{HtmlForgeX.TablerSidebarDropdown} requiredposition: 1
public TablerSidebar Dropdown(String text, TablerIconType icon, Action<TablerSidebarDropdown> configure) #
Returns: TablerSidebar

Add dropdown menu with icon

Parameters

text System.String requiredposition: 0
icon HtmlForgeX.TablerIconType requiredposition: 1
configure System.Action{HtmlForgeX.TablerSidebarDropdown} requiredposition: 2
public TablerSidebar FooterText(String text) #
Returns: TablerSidebar

Set footer text content

Parameters

text System.String requiredposition: 0
GetInitials(System.String name) #

Extracts initials from a full name

Parameters

name System.String required
Full name to extract initials from

Returns

Uppercase initials (first and last name first letters)

Item 3 overloads
public TablerSidebar Item(String text, String href = null) #
Returns: TablerSidebar

Add navigation item

Parameters

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

Add navigation item with icon

Parameters

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

Add navigation item with badge

Parameters

text System.String requiredposition: 0
badge System.String requiredposition: 1
href System.String = null optionalposition: 2
public TablerSidebar Logo(String logoUrl, String brandUrl = null) #
Returns: TablerSidebar

Set logo image URL

Parameters

logoUrl System.String requiredposition: 0
brandUrl System.String = null optionalposition: 1
RegisterLibraries() #

Registers the required libraries for this component

RenderBrand() #

Renders the brand/logo section

Returns

HTML string for the brand section

RenderUserProfileSection() #

Renders the user profile section in the sidebar

Returns

HTML string for the user profile section

public TablerSidebar Section(String title) #
Returns: TablerSidebar

Add navigation section header

Parameters

title System.String requiredposition: 0
public TablerSidebar ShowToggle(Boolean show = true) #
Returns: TablerSidebar

Show/hide mobile toggle button

Parameters

show System.Boolean = true optionalposition: 0
public TablerSidebar Sticky(Boolean sticky = true) #
Returns: TablerSidebar

Make sidebar sticky

Parameters

sticky System.Boolean = true optionalposition: 0
public TablerSidebar Style(TablerSidebarStyle style) #
Returns: TablerSidebar

Set sidebar style

Parameters

style HtmlForgeX.TablerSidebarStyle requiredposition: 0
public TablerSidebar Surface(TablerSurfaceStyle style) #
Returns: TablerSidebar

Applies a shared surface treatment to the sidebar shell.

Parameters

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

Renders the sidebar to HTML string

Returns

HTML representation of the sidebar

UserProfile 2 overloads
public TablerSidebar UserProfile(String name, String title = null, String avatarUrl = null) #
Returns: TablerSidebar

Set user profile section

Parameters

name System.String requiredposition: 0
title System.String = null optionalposition: 1
avatarUrl System.String = null optionalposition: 2
public TablerSidebar UserProfile(Action<TablerUserProfile> configure) #
Returns: TablerSidebar

Configure user profile with fluent API

Parameters

configure System.Action{HtmlForgeX.TablerUserProfile} requiredposition: 0