Item Slots
Item slots allow you to inject custom content at specific positions within UmbNav menu items in the backoffice.
Basic Registration
import { UmbNavExtensionRegistry } from '/App_Plugins/UmbNav/dist/api.js';
import { html } from '@umbraco-cms/backoffice/external/lit';
UmbNavExtensionRegistry.registerItemSlot({
alias: 'my-badge',
position: 'after-name',
render: (item, config) => html`<span class="my-badge">New</span>`
});Interface Definition
interface UmbNavItemSlot {
/** Unique identifier for this slot */
alias: string;
/** Position within the item */
position: 'before-name' | 'after-name' | 'before-toolbar' | 'after-toolbar';
/** Render function returning Lit TemplateResult */
render: (item: ModelEntryType, config: UmbPropertyEditorConfigProperty[]) => TemplateResult;
/** Optional visibility check */
isVisible?: (item: ModelEntryType, config: UmbPropertyEditorConfigProperty[]) => boolean;
}Slot Positions
Position
Location
Common Uses
Examples
Simple Badge
Featured Indicator
Item Type Icon
Children Counter
Visibility Status
External Link Indicator
Unpublished Warning
SEO Score Indicator
Interactive Slot
Multiple Slots Combined
Styling Slots
Using Inline Styles
Using UUI Components
Using CSS Custom Properties
Unregistering Slots
Getting Registered Slots
Best Practices
Performance Considerations
Last updated
Was this helpful?