Record
public record NavigationNode : System.IEquatable<Moka.Docs.Core.Navigation.NavigationNode>
Namespace: Moka.Docs.Core.Navigation
A single node in the navigation tree.
Inheritance
Implements: System.IEquatable<Moka.Docs.Core.Navigation.NavigationNode>
Properties
| Name | Description |
|---|---|
Children |
Child nodes. |
Expanded |
Whether this node is expanded by default. |
Icon |
Icon name for display. |
IsActive |
Whether this node is the currently active page. |
Label |
Display label. |
Order |
Sort order. |
Route |
URL route for this node (null for section headers). |
Children
List<NavigationNode> NavigationNode.Children { get; init; }
Child nodes.
Expanded
bool NavigationNode.Expanded { get; init; }
Whether this node is expanded by default.
Icon
string? NavigationNode.Icon { get; init; }
Icon name for display.
IsActive
bool NavigationNode.IsActive { get; init; }
Whether this node is the currently active page.
Label
string NavigationNode.Label { get; init; }
Display label.
Order
int NavigationNode.Order { get; init; }
Sort order.
Route
string? NavigationNode.Route { get; init; }
URL route for this node (null for section headers).
Methods
| Name | Description |
|---|---|
ToString() override |
Type Relationships
classDiagram
style NavigationNode fill:#f9f,stroke:#333,stroke-width:2px
NavigationNode ..|> NavigationNode~ : implements
View Source
/// <summary>
/// A single node in the navigation tree.
/// </summary>
public sealed record NavigationNode
{
/// <summary>Display label.</summary>
public required string Label { get; init; }
/// <summary>URL route for this node (null for section headers).</summary>
public string? Route { get; init; }
/// <summary>Icon name for display.</summary>
public string? Icon { get; init; }
/// <summary>Sort order.</summary>
public int Order { get; init; }
/// <summary>Whether this node is expanded by default.</summary>
public bool Expanded { get; init; } = true;
/// <summary>Whether this node is the currently active page.</summary>
public bool IsActive { get; init; }
/// <summary>Child nodes.</summary>
public List<NavigationNode> Children { get; init; } = [];
/// <inheritdoc/>
public override string ToString() => $"NavNode({Label}, {Children.Count} children)";
}