Frontend

UmbNav's backoffice UI is built with TypeScript and Lit web components. You can extend it by registering custom extensions or subclassing components.

Getting Started

Importing the API

All public APIs are available from the API bundle:

import {
    UmbNavExtensionRegistry,
    UmbNavToolbarAction,
    UmbNavItemSlot,
    ModelEntryType,
    UmbNavActionContext
} from '/App_Plugins/UmbNav/dist/api.js';

Creating an Extension Package

  1. Create a new Umbraco extension package

  2. Import the UmbNav API

  3. Register your extensions at module load time

// my-extension/src/index.ts
import { UmbNavExtensionRegistry } from '/App_Plugins/UmbNav/dist/api.js';
import { html } from '@umbraco-cms/backoffice/external/lit';

// Register extensions when the module loads
UmbNavExtensionRegistry.registerToolbarAction({
    alias: 'my-extension-star',
    label: 'Star',
    icon: 'icon-favorite',
    onExecute: (item, context) => {
        console.log('Starred:', item.name);
    }
});

Extension Types

Toolbar Actions

Add buttons to the item toolbar that appears on hover:

See Toolbar Actions for complete documentation.

Item Slots

Inject custom content at specific positions within menu items:

See Item Slots for complete documentation.

Custom Item Types

Register entirely new item types:

See Custom Item Types for complete documentation.

Component Subclassing

For deeper customization, subclass UmbNav's Lit components:

See Extending Components for complete documentation.

Available Exports

Extension Registry

The singleton registry for all extensions.

Types

Components

Styles

The Action Context

When toolbar actions execute, they receive a context object:

Using the Context

Best Practices

1. Use Unique Aliases

Prefix your aliases to avoid conflicts:

2. Check Visibility

Use isVisible to show extensions only when relevant:

3. Handle Async Operations

Actions can be async:

4. Error Handling

Don't let errors break the UI:

5. Subscribe to Changes

If you need to react to registry changes:

Last updated

Was this helpful?