Modrich.Navigation.Abstractions 0.1.0

dotnet add package Modrich.Navigation.Abstractions --version 0.1.0
                    
NuGet\Install-Package Modrich.Navigation.Abstractions -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Modrich.Navigation.Abstractions" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Modrich.Navigation.Abstractions" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Modrich.Navigation.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Modrich.Navigation.Abstractions --version 0.1.0
                    
#r "nuget: Modrich.Navigation.Abstractions, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Modrich.Navigation.Abstractions@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Modrich.Navigation.Abstractions&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Modrich.Navigation.Abstractions&version=0.1.0
                    
Install as a Cake Tool

Modrich.Navigation.Abstractions

Navigation + layout contracts for Modrich UI modules on .NET 10. UI modules (.Web RCL projects) reference this without pulling EF Core — the package is intentionally tiny.

What's in the box

  • IMainMenuProvider — contributes top-level entries (NavItem) to the host's main left navigation.
  • IModuleMenuProvider — contributes a module's inner tab bar; activates when the request URL's first segment matches RoutePrefix. Carries ResourceType so the layout can localize MenuItem.Title via IStringLocalizer.
  • JsonModuleMenuProviderIModuleMenuProvider backed by a JSON stream; ships with a FromEmbeddedResource(...) helper for loading the JSON from the module's own assembly.
  • NavItemTitle, Href, optional Icon, Group, Order, Roles, Permissions.
  • MenuItem — supports leaves (Href) and parents (MenuItems), plus Icon, Permission, Order.

Install

dotnet add package Modrich.Navigation.Abstractions

Usage — main-menu entry per module

using Modrich.Navigation;

public sealed class OrdersMainMenuProvider : IMainMenuProvider
{
    public IEnumerable<NavItem> GetNavItems() =>
    [
        new NavItem
        {
            Title       = nameof(Strings.Orders),
            Href        = "/orders",
            Icon        = "shopping-cart",
            Group       = "Sales",
            Order       = 100,
            Permissions = ["Module.Orders.Access"],
        }
    ];
}

Register from the module:

public void RegisterAppDependencies(IServiceCollection services, IConfiguration configuration, string? apiBaseUrl = null)
{
    services.AddSingleton<IMainMenuProvider, OrdersMainMenuProvider>();
}

The host enumerates every registered IMainMenuProvider, filters by Permissions/Roles, orders by Group then Order, and renders the result in its shell.

Usage — inner module menu from embedded JSON

menu.json in the module assembly, marked as EmbeddedResource:

[
  { "Title": "Overview",  "Href": "/orders",          "Icon": "list",  "Order": 10 },
  { "Title": "New order", "Href": "/orders/new",      "Icon": "plus",  "Order": 20, "Permission": "Orders.Edit" },
  {
    "Title": "Reports",
    "Order": 30,
    "MenuItems": [
      { "Title": "Daily",   "Href": "/orders/reports/daily"   },
      { "Title": "Monthly", "Href": "/orders/reports/monthly" }
    ]
  }
]

Register the provider:

services.AddSingleton<IModuleMenuProvider>(_ =>
    JsonModuleMenuProvider.FromEmbeddedResource(
        routePrefix:  "orders",
        resourceType: typeof(Strings),
        assembly:     typeof(OrdersAppModule).Assembly,
        resourceName: "Acme.Orders.Web.menu.json"));

The host activates this provider when the URL begins with /orders, and resolves MenuItem.Title via IStringLocalizer.Create(resourceType).

  • Modrich.AbstractionsLayoutSections, IModuleLayoutWidget for slotted widgets.
  • Modrich.Sdk.Web — meta-package for .Web modules; pulls this in.

Versioning

Strict semver — see Modrich.Abstractions. EnablePackageValidation is on.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Modrich.Navigation.Abstractions:

Package Downloads
Modrich.Modularity

Package Description

Modrich.Sdk.Web

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 117 5/23/2026
0.0.1 110 5/23/2026