uNavbar 1.4.0

dotnet add package uNavbar --version 1.4.0
                    
NuGet\Install-Package uNavbar -Version 1.4.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="uNavbar" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="uNavbar" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="uNavbar" />
                    
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 uNavbar --version 1.4.0
                    
#r "nuget: uNavbar, 1.4.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 uNavbar@1.4.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=uNavbar&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=uNavbar&version=1.4.0
                    
Install as a Cake Tool

uNavbar

A commercial-grade navigation package for Umbraco 17+.

Features

  • Dynamic Navigation: Manage your site's main menu via the "Site Settings" node.
  • Branding Control: Upload a logo and set your brand name directly from the backoffice.
  • Sticky Header (v1.1.0): Toggle a floating/sticky navbar so navigation stays visible while scrolling.
  • Logo Alignment (v1.1.0): Align the logo left, center, or right from Site Settings without editing the partial.
  • Brand Title Font (v1.2.0): Choose a Google Font (Inter, Outfit, Roboto, Montserrat) or System-Default for the brand title text.
  • Active CSS Class (v1.2.0): Set the CSS class used for the current page link (defaults to active) so uNavbar fits existing UI kits.
  • Navbar Shadow (v1.4.0): Select the elevation shadow for the header (none (default), shadow-sm, shadow-md, shadow-lg) directly from the backoffice.
  • Hover-Activated Dropdown Toggle (v1.3.0): Add a boolean toggle (Trigger On Hover) in Site Settings to switch from mouse click to mouseover for showing menu dropdowns.
  • Font Size Rem Scaler (v1.3.0): Scale your main navigation links text size using a font-size dropdown (0.875rem, 1rem, 1.125rem, 1.25rem).
  • Responsive: Includes a lightweight, dependency-free responsive navbar.
  • Performance Optimized: Uses efficient queries to ensure zero impact on site speed.

Installation

  1. Install the package via NuGet.
  2. Build and run your Umbraco site (ensure a valid umbracoDbDSN connection string is configured).
  3. On first startup, the migration will create the Site Settings document type and also add a Site Settings node at the content root.
  4. If, for any reason, the Site Settings node is not visible under Content, simply right‑click the root of the content tree, choose Create, and select Site Settings to create it manually.
  5. Go to the Site Settings node and configure your links and branding.
    • Note: The Header Logo picker is unfiltered by default to maximize compatibility (SVG, PNG, JPG, etc.). You can manually apply filters in the Umbraco backoffice under Settings > Data Types > uNav Logo Picker if required.

Usage

After installing the package and building your project, the Navigation.cshtml partial view will be automatically copied to Views/Partials/Navigation.cshtml (if it doesn't already exist).

Include the partial view in your layout file using either option:

Option 1 - Standard location (recommended):

@await Html.PartialAsync("Navigation")

Option 2 - Full path:

@await Html.PartialAsync("~/App_Plugins/uNav.Common/content/Views/Partials/Navigation.cshtml")

Note: Files in App_Plugins/uNav.Common/ may appear as read-only (this is normal for NuGet package files). The copy in Views/Partials/Navigation.cshtml is writable and can be customized. If you customize it, the package will not overwrite your customizations on future updates.

CSS Customization

The navigation bar uses unav-* classes. You can override these in your own stylesheet or edit navbar-custom.css to match your brand colors.

Site Settings properties

Property alias Tab Description
mainNavigation Navigation Multi URL picker — up to 5 top-level nav links
headerLogo Navigation Logo image (Media Picker)
brandName Navigation Site/brand name shown beside the logo
brandTitleFont Navigation Dropdown: Inter, Outfit, Roboto, Montserrat, or System-Default (default). Loads Google Fonts for the brand title when not system default.
activeCssClass Navigation Text field for the current-page link class (default: active). Use values such as current-page or is-selected to match your CSS framework.
triggerOnHover Navigation Toggle: Toggle hover vs. click dropdown activation (true to trigger on mouseover, false for click). Default: false.
fontSize Navigation Dropdown: Font size for main menu links (0.875rem, 1rem, 1.125rem, 1.25rem). Default: 1rem.
isSticky Layout When enabled, navbar uses sticky positioning (unav-sticky + Tailwind-compatible sticky top-0 z-50). Defaults to sticky when unset (matches pre-1.1.0 behavior).
logoAlignment Layout Dropdown: left (default), center, or right
navbarShadow Layout Dropdown: none (default), shadow-sm (soft), shadow-md (medium), or shadow-lg (deep)

After upgrading to 1.4.0, restart Umbraco so the migration adds the new Site Settings properties. Rebuild your site so updated Navigation.cshtml is copied into your project.

If you change activeCssClass away from active, add matching rules in your stylesheet (for example .unav-link.current-page { ... }). The package stylesheet still styles .unav-link.active for the default.

Requirements

  • Umbraco 17+

Content Delivery API Support

uNavbar is compatible with the Umbraco Content Delivery API. To consume your navigation and branding data via API, you must enable both the Content and Media Delivery APIs in your appsettings.json:

{
  "Umbraco": {
    "CMS": {
      "DeliveryApi": {
        "Enabled": true,
        "PublicAccess": true,
        "Media": {
          "Enabled": true,
          "PublicAccess": true
        }
      }
    }
  }
}

Once enabled, you can fetch the Site Settings data via the standard Umbraco Delivery API endpoints.

Step 1

Install the uNavbar NuGet package. Install uNavbar Nuget package

Step 2

Rebuild and run the solution, then configure Umbraco. Fill the necessary details and setup umbraco

Step 3

Log in to the backoffice. The Site Settings content node should be automatically created. Site Settings Node

Step 4

The Site Settings document should appear with the following properties: Site Settings Properties

Step 5

Add the relevant documents to show in the Navbar by following these steps: Go to the Settings tab and create appropriate Document Types and Templates. Document Types and Templates

Step 6

Ensure you toggle Allow as Root for the documents you want to show in the content section root. Set Home as a Root element

Step 7

Register the documents inside the Content tab. Register the documents inside Content tab

Step 8

Add child document support to the root documents. Go to the document settings and add child document support

Step 9

Select the appropriate allowed child node types. Select the appropriate allowed child node types

Step 10

Add child documents to the root documents. Add child documents to the root documents

Step 11

Ensure that your documents have the correct templates assigned. This is critical for the pages to render on the frontend.

  1. Navigate to Settings in the top menu.
  2. Expand Document Types and select your document type (e.g., Home Page).
  3. Click on Structure (or Templates depending on version) and find Allowed Templates.
  4. Select the template you want to use and set it as the Default Template.
  5. Save the Document Type.

Now, when you create a document in the Content section, it will automatically use this template.

Follow the guide below to set up the Master page:

  1. Create the Master Template: Create a template named Master inside the Templates section. Your code will automatically sync from the Master.cshtml template page you create in your IDE. Create Master Template

  2. Select the Template in Content: Choose this template for your selected document in the root content node. Choose Master Template in Content

  3. Assign the Template to the Document Type: Finally, assign that template to the document type. Assign Master Template to Document Type

Step 12

The structure should look like the image below. You can now configure the navigation bar menus. Final Structure

Step 13

Select Add and choose the content options. Choose Content Options

Step 14

Currently, you can select only one content item at a time. Select only one content

Step 15

The final structure should look like this: Final structure

Troubleshooting

If you encounter the error: "The chosen media type is not valid", follow these steps: The chosen media type is not valid

  1. Go to Settings > Data Types and select the property editor used for the Logo. Select the property editor used for logo

  2. Remove the default media type filter. Remove the default media type

  3. Choose Image as the allowed type. Choose appropriate media type

  4. Publish the document again, and it should work.

Final Setup

Register the CSS and partial view in your layout and pages.

Master.cshtml (Layout File)
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
    Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewData["Title"] - My Site</title>

    
    <link rel="stylesheet" href="~/css/navbar-custom.css" />
</head>
<body>
    
    @await Html.PartialAsync("Navigation")

    <main>
        <h1>Hello from uNavbar</h1>
    </main>

</body>
</html>
Home.cshtml (or any page using the layout)
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
    Layout = "Master.cshtml";
    ViewData["Title"] = "Home";
}

<section>
    <h1>Welcome to My Site</h1>
    <p>Your content goes here.</p>
</section>

You will now see the navigation bar. You can always customize the CSS to fit your needs. Ready navigation bar

🤝 Support

For support, feature requests, or bug reports:

📄 License

Copyright © Atharva IT Services Pvt. Ltd.

This package is free to use for the Umbraco community.

🏢 About Atharva IT Services

Atharva IT Services Pvt. Ltd. a global software development company in Ahmedabad, excels in e-commerce solutions, web development, and software testing.

Made with ❤️ by Atharva IT Services

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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.0 37 6/18/2026
1.3.0 91 6/15/2026
1.2.0 89 6/10/2026
1.1.0 96 6/2/2026
1.0.8 99 5/5/2026
1.0.7 122 3/11/2026
1.0.6 106 2/3/2026
1.0.5 106 2/3/2026
1.0.4 114 2/3/2026
1.0.3 114 1/28/2026
1.0.1 113 1/27/2026
1.0.0 115 1/23/2026