section

Overview

Sections are used to group related items with each other. Sections can have headings, can be collapsable and are not associated with a destination.

Grouping items into sections:

  • makes them discoverable

  • makes them easy to locate

  • tells the user that they are related

Basic Example

Standard Attributes

label

Optional

Type: string (static text, a format string or the return value of a JS/TS function)

Default: unset

<section label="{$:getRole()}: General"/>

Provide a label for a group of navigation items.

Note: Omitting the label will still group items visually.

Advanced Attributes

collapsable

Optional

Type: boolean

Default: false

<section collapsable="true"/>

Specify that the section should be collapsable.

from-js

Optional

Construct a section from JavaScript/TypeScript using a $:function that returns an object array of type navigationSection.

id

id

items

<section items="$:buildItems()"/>

Construct a section's items from Javascript using a $:function that returns an object array of type navigationItem.

show-if and hide-if

show-ifhide-if

Last updated