HtmlForgeX

API Reference

Class

SmartTab

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element

SmartTab component for creating responsive tabbed interfaces with extensive customization options.

Inheritance

Constructors

public SmartTab() #

Initializes a new instance of the SmartTab class.

Methods

AddTab 2 overloads
public SmartTab AddTab(String label, Action<SmartTabPanel> configure = null) #
Returns: SmartTab

Adds a new tab panel to the SmartTab.

Parameters

label System.String requiredposition: 0
The tab label.
configure System.Action{HtmlForgeX.SmartTabPanel} = null optionalposition: 1
Optional configuration action for the panel.

Returns

The current instance for method chaining.

public SmartTab AddTab(String label, TablerIconType icon, Action<SmartTabPanel> configure = null) #
Returns: SmartTab

Adds a new tab panel with icon.

Parameters

label System.String requiredposition: 0
The tab label.
icon HtmlForgeX.TablerIconType requiredposition: 1
The tab icon.
configure System.Action{HtmlForgeX.SmartTabPanel} = null optionalposition: 2
Optional configuration action for the panel.

Returns

The current instance for method chaining.

public SmartTab AsVertical() #
Returns: SmartTab

Sets the tab orientation to vertical.

Returns

The current instance for method chaining.

public SmartTab AsVerticalRight() #
Returns: SmartTab

Sets vertical orientation with nav placed on the right side.

public SmartTab AutoAdjustHeight(Boolean enabled = true) #
Returns: SmartTab
EditorBrowsable(2)

Enables or disables automatic height adjustment.

Parameters

enabled System.Boolean = true optionalposition: 0
Whether to enable auto height adjustment.

Returns

The current instance for method chaining.

public SmartTab BackButtonSupport(Boolean enabled = true) #
Returns: SmartTab
EditorBrowsable(2)

Enables or disables browser back button support.

Parameters

enabled System.Boolean = true optionalposition: 0
Whether to enable back button support.

Returns

The current instance for method chaining.

BuildInitializationScript() #

Builds the SmartTab initialization script.

public SmartTab ConfigureKeyboard(Action<SmartTabKeyboard> configure) #
Returns: SmartTab

Configures custom keyboard shortcuts.

Parameters

configure System.Action{HtmlForgeX.SmartTabKeyboard} requiredposition: 0
Configuration action for keyboard settings.

Returns

The current instance for method chaining.

public SmartTab DisableAutoProgress() #
Returns: SmartTab

Disables auto-progress functionality.

Returns

The current instance for method chaining.

public SmartTab EnableAutoProgress(Int32 interval = 3500, Boolean stopOnFocus = true) #
Returns: SmartTab

Enables auto-progress functionality.

Parameters

interval System.Int32 = 3500 optionalposition: 0
The interval in milliseconds.
stopOnFocus System.Boolean = true optionalposition: 1
Whether to pause on focus.

Returns

The current instance for method chaining.

public SmartTab EnableUrlHash(Boolean enabled = true) #
Returns: SmartTab
EditorBrowsable(2)

Enables or disables URL hash navigation.

Parameters

enabled System.Boolean = true optionalposition: 0
Whether to enable URL hash navigation.

Returns

The current instance for method chaining.

public String GoToNext() #
Returns: String

Generates JavaScript code to navigate to the next tab.

Returns

JavaScript method call string.

public String GoToPrevious() #
Returns: String

Generates JavaScript code to navigate to the previous tab.

Returns

JavaScript method call string.

public String GoToTab(Int32 index) #
Returns: String

Generates JavaScript code to navigate to a specific tab.

Parameters

index System.Int32 requiredposition: 0
The tab index.

Returns

JavaScript method call string.

public SmartTab Justified(Boolean justified = true) #
Returns: SmartTab

Sets whether navigation menu should be justified.

Parameters

justified System.Boolean = true optionalposition: 0
Whether to justify navigation menu.

Returns

The current instance for method chaining.

public SmartTab OnInitialized(String handler) #
Returns: SmartTab

Adds an event handler for the initialized event.

Parameters

handler System.String requiredposition: 0
The JavaScript event handler code.

Returns

The current instance for method chaining.

public SmartTab OnLeaveTab(String handler) #
Returns: SmartTab

Adds an event handler for the leaveTab event.

Parameters

handler System.String requiredposition: 0
The JavaScript event handler code.

Returns

The current instance for method chaining.

public SmartTab OnLoaded(String handler) #
Returns: SmartTab

Adds an event handler for the loaded event.

Parameters

handler System.String requiredposition: 0
The JavaScript event handler code.

Returns

The current instance for method chaining.

public SmartTab OnShowTab(String handler) #
Returns: SmartTab

Adds an event handler for the showTab event.

Parameters

handler System.String requiredposition: 0
The JavaScript event handler code.

Returns

The current instance for method chaining.

public SmartTab PersistSelected(String key = null) #
Returns: SmartTab

Persist currently selected tab in localStorage and restore it on load.

Parameters

key System.String = null optionalposition: 0
Optional key; defaults to the SmartTab id.
RegisterLibraries() #

Registers the required libraries for SmartTab.

public String Reset() #
Returns: String

Generates JavaScript code to reset the tabs.

Returns

JavaScript method call string.

public SmartTab Settings(Action<SmartTabSettings> configure) #
Returns: SmartTab

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

Parameters

configure System.Action{HtmlForgeX.SmartTabSettings} requiredposition: 0
public override String ToString() #
Returns: String

Builds the SmartTab HTML markup.

public SmartTab WithCardHeaderLook(Boolean enable = true) #
Returns: SmartTab

Applies a card-header-like look to the nav (tabs aligned to header).

Parameters

enable System.Boolean = true optionalposition: 0
public SmartTab WithContainerClass(String cssClass) #
Returns: SmartTab

Sets custom CSS classes for the container.

Parameters

cssClass System.String requiredposition: 0
The CSS class names.

Returns

The current instance for method chaining.

public SmartTab WithContentClass(String cssClass) #
Returns: SmartTab

Sets custom CSS classes for the content container.

Parameters

cssClass System.String requiredposition: 0
The CSS class names.

Returns

The current instance for method chaining.

public SmartTab WithCssVar(String name, String value) #
Returns: SmartTab

Sets a CSS variable used by SmartTab themes (e.g., "--st-anchor-active-primary-color").

Parameters

name System.String requiredposition: 0
value System.String requiredposition: 1
public SmartTab WithCustomAnimation(String prefixCss, String fwdShowCss = null, String fwdHideCss = null, String bckShowCss = null, String bckHideCss = null) #
Returns: SmartTab

Configures custom CSS animation classes.

Parameters

prefixCss System.String requiredposition: 0
CSS class prefix.
fwdShowCss System.String = null optionalposition: 1
Forward show CSS class.
fwdHideCss System.String = null optionalposition: 2
Forward hide CSS class.
bckShowCss System.String = null optionalposition: 3
Backward show CSS class.
bckHideCss System.String = null optionalposition: 4
Backward hide CSS class.

Returns

The current instance for method chaining.

public SmartTab WithKeyboardNavigation(Boolean enabled = true) #
Returns: SmartTab

Configures keyboard navigation.

Parameters

enabled System.Boolean = true optionalposition: 0
Whether to enable keyboard navigation.

Returns

The current instance for method chaining.

public SmartTab WithNavAtBottom(Boolean enable = true) #
Returns: SmartTab

Renders the nav after content for horizontal layout (tabs at the bottom).

Parameters

enable System.Boolean = true optionalposition: 0
public SmartTab WithNavClass(String cssClass) #
Returns: SmartTab

Sets custom CSS classes for the nav container.

Parameters

cssClass System.String requiredposition: 0
The CSS class names.

Returns

The current instance for method chaining.

public SmartTab WithNavStyle(SmartTabNavStyle style) #
Returns: SmartTab

Sets the nav visual style (Tabs, Underline, Bordered).

Parameters

style HtmlForgeX.SmartTabNavStyle requiredposition: 0
public SmartTab WithNavWidth(String cssMinWidth) #
Returns: SmartTab

Sets a minimum width for the nav area (e.g., "14rem").

Parameters

cssMinWidth System.String requiredposition: 0
public SmartTab WithSelectedTab(Int32 index) #
Returns: SmartTab

Sets the initially selected tab.

Parameters

index System.Int32 requiredposition: 0
The zero-based index of the tab to select.

Returns

The current instance for method chaining.

public SmartTab WithTheme(SmartTabTheme theme) #
Returns: SmartTab

Sets the theme for the SmartTab.

Parameters

theme HtmlForgeX.SmartTabTheme requiredposition: 0
The theme to apply.

Returns

The current instance for method chaining.

public SmartTab WithThemeColors(String activePrimary = null, String activeSecondary = null, String defaultPrimary = null, String defaultSecondary = null, String borderColor = null, String background = null) #
Returns: SmartTab

Convenience setter for common SmartTab theme colors.

Parameters

activePrimary System.String = null optionalposition: 0
activeSecondary System.String = null optionalposition: 1
defaultPrimary System.String = null optionalposition: 2
defaultSecondary System.String = null optionalposition: 3
borderColor System.String = null optionalposition: 4
background System.String = null optionalposition: 5
public SmartTab WithTransition(SmartTabAnimation animation, Int32 speed = 400, String easing = null) #
Returns: SmartTab

Configures the transition animation.

Parameters

animation HtmlForgeX.SmartTabAnimation requiredposition: 0
The animation type.
speed System.Int32 = 400 optionalposition: 1
The animation speed in milliseconds.
easing System.String = null optionalposition: 2
The easing function.

Returns

The current instance for method chaining.

Properties

public String Id { get; } #

Gets the unique identifier for this SmartTab instance.

public List<SmartTabPanel> Panels { get; } #

Gets the list of tab panels.

public SmartTabOptions Options { get; } #

Gets the configuration options.

public Boolean IsVertical { get; set; } #

Gets or sets the orientation (horizontal or vertical).

public Boolean NavAtBottom { get; set; } #

When nav should render after content in horizontal layout.

public Boolean NavOnRight { get; set; } #

When in vertical mode, places nav on the right side instead of left.

public String NavMinWidth { get; set; } #

Optional minimum width for the nav area (e.g., "14rem", "240px").

public SmartTabNavStyle NavStyle { get; set; } #

Optional nav visual style to increase affordance.

public Boolean CardHeaderLook { get; set; } #

Applies a card-header-like look to the nav (padding/border alignment).

public String ContainerClass { get; set; } #

Gets or sets custom CSS classes for the container.

public String NavClass { get; set; } #

Gets or sets custom CSS classes for the nav container.

public String ContentClass { get; set; } #

Gets or sets custom CSS classes for the content container.

Fields

_eventHandlers #

Event handlers for SmartTab events.

_cssVars #

Instance-scoped CSS custom properties for SmartTab themes.

_persistKey #

Optional localStorage key to persist selected tab.