Table of Contents

Class TwNavbar

Namespace
TwBlazor.Components
Assembly
TwBlazor.dll
public class TwNavbar : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent, IDisposable
Inheritance
TwNavbar
Implements
Inherited Members

Constructors

TwNavbar()

public TwNavbar()

Properties

ActionsContent

Gets or sets content rendered after the navigation links.

[Parameter]
public RenderFragment? ActionsContent { get; set; }

Property Value

RenderFragment

BrandContent

Gets or sets the content rendered before the navigation menu.

[Parameter]
public RenderFragment? BrandContent { get; set; }

Property Value

RenderFragment

ChildContent

Gets or sets the child content of the component.

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

DisableResponsiveCollapse

Gets or sets whether the navbar's responsive menu toggle and collapse behavior is disabled.

[Parameter]
public bool DisableResponsiveCollapse { get; set; }

Property Value

bool

Remarks

Responsive collapse is on by default; set this to true (e.g. via the bare <TwNavbar DisableResponsiveCollapse /> attribute syntax) to always render NavigationContent and ActionsContent without a mobile toggle - useful when a parent layout, such as TwSidebar, already owns one.

Fixed

Gets or sets a value indicating whether the navbar should be fixed at the top.

[Parameter]
public bool Fixed { get; set; }

Property Value

bool

NavigationContent

Gets or sets custom content rendered in place of data-driven navigation items.

[Parameter]
public RenderFragment? NavigationContent { get; set; }

Property Value

RenderFragment

NavigationItems

Gets or sets the navigation items rendered when NavigationContent is not supplied.

[Parameter]
public List<NavigationItem> NavigationItems { get; set; }

Property Value

List<NavigationItem>

ToggleAriaLabel

Gets or sets the accessible label for the responsive menu toggle.

[Parameter]
public string ToggleAriaLabel { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

Dispose()

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

OnInitialized()

Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

protected override void OnInitialized()