Item Types
UmbNav supports three built-in item types: Document, Link, and Title. You can register additional item types for specialized use cases.
Basic Registration
import { UmbNavExtensionRegistry } from '/App_Plugins/UmbNav/dist/api.js';
UmbNavExtensionRegistry.registerItemType({
type: 'button',
label: 'Button',
icon: 'icon-hand-pointer',
allowChildren: false
});Interface Definition
interface UmbNavItemTypeRegistration {
/** Unique type identifier */
type: string;
/** Display label in the UI */
label: string;
/** Icon for this type */
icon: string;
/** Whether items of this type can have children */
allowChildren?: boolean;
/** Custom render function for display */
render?: (item: ModelEntryType) => TemplateResult;
/** Modal token to open when editing */
editModalToken?: unknown;
/** Modal token to open when creating */
createModalToken?: unknown;
}Examples
Simple Custom Type
Type with Custom Rendering
Type with Custom Modal
Call-to-Action Button Type
Mega Menu Section Type
Social Link Type
Working with Custom Types in Views
Backend Support
Unregistering Item Types
Getting Registered Types
Best Practices
1. Use Meaningful Type Names
2. Provide Clear Icons
3. Consider Child Support
4. Handle Missing Data
5. Match UmbNav Styling
Limitations
Last updated
Was this helpful?