Skip to content

Navigation

This component generates a navigation field to be used in the author dialog. It lists a tree of pages so that users of a site can easily navigate the site structure. The navigation field’s value is passed to the component as a prop.

Properties

PropertyTypeDescriptionDefault ValueRequired
labelstringThe label of the navigation componentYes
placeholderstringPlaceholder text for the navigation fieldNo
showChildrenCheckboxbooleanWhether to show a checkbox for child itemsfalseNo
showRootLevelbooleanWhether to show the root levelfalseNo
defaultValuestringDefault value for the navigation componentNo
pagePropertiesarrayArray of page propertiesNo
tooltipstringTooltip text for the navigation fieldNo
requiredbooleanWhether the navigation field is requiredfalseNo

Example

To use a navigation component in the author dialog, we can use the following code:

{
navigation: navigation({
label: 'Navigation Root',
placeholder: 'Select a navigation root',
showChildrenCheckbox: true,
showRootLevel: true,
pageProperties: [{
label: "subtitle",
value: "subtitle",
}],
tooltip: 'The root page from which to build the navigation. Can be a blueprint master, language master or regular page.',
required: true,
})
}

Output Type

export interface NavigationItemSchema {
id: string;
children: NavigationItemSchema[];
active: boolean;
url: string;
title: string;
}

Example in author dialog

Navigation Component