Table of Contents

Class NavActionGroupAttribute

Namespace
Htmx.Components.NavBar
Assembly
Htmx.Components.dll

Marks controllers or controller classes to define navigation action groups. Groups allow related navigation actions to be organized together in dropdown menus or other hierarchical navigation structures.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class NavActionGroupAttribute : Attribute
Inheritance
NavActionGroupAttribute
Inherited Members
Extension Methods

Examples

[NavActionGroup(DisplayName = "User Management", Icon = "fas fa-users", Order = 10)]
public class UserController : Controller
{
    [NavAction]
    public IActionResult Index() { ... }
}

Remarks

When applied to a controller class, all navigation actions within that controller will be grouped together unless they specify their own group via method-level attributes. The group's display properties can be customized through the various properties.

Properties

DisplayName

Gets or sets the display name for the group.

public string? DisplayName { get; set; }

Property Value

string

The text to display for the group, or null to use a default name.

Icon

Gets or sets the CSS icon class for the group (e.g., "fas fa-users").

public string? Icon { get; set; }

Property Value

string

A CSS class string for the group's icon, or null if no icon should be displayed.

Order

Gets or sets the display order of the group relative to other groups or ungrouped actions.

public int Order { get; set; }

Property Value

int

An integer used for sorting. Lower values appear first. Default is 0.