Class NavBarViewComponent
- Namespace
- Htmx.Components.NavBar
- Assembly
- Htmx.Components.dll
View component that renders the navigation bar using the configured navigation provider.
public class NavBarViewComponent : ViewComponent
- Inheritance
-
NavBarViewComponent
- Inherited Members
- Extension Methods
Remarks
This component delegates to the registered INavProvider to build the navigation structure and then renders it using the configured view. The navigation is automatically filtered based on the current user's permissions.
Constructors
NavBarViewComponent(INavProvider, ViewPaths)
Initializes a new instance of the NavBarViewComponent class.
public NavBarViewComponent(INavProvider navProvider, ViewPaths viewPaths)
Parameters
navProvider
INavProviderThe navigation provider that builds the navigation structure.
viewPaths
ViewPathsThe configured view paths for rendering components.
Exceptions
- ArgumentNullException
Thrown when any parameter is null.
Methods
InvokeAsync()
Invokes the view component to render the navigation bar.
public Task<IViewComponentResult> InvokeAsync()
Returns
- Task<IViewComponentResult>
A task that represents the asynchronous operation. The task result contains the view component result.