Skip to content

Subnavigation List Item

Subnavigation lists are secondary-level navigational aid that can be used to represent entities that’s organized in groups or hierarchies.

Component behavior

Like Navigation List Items, this component works as an especially styled button, emitting an event on click that the consumer must handle to maintain a proper state of the given list of these items. Which means opening an accordion of children in the case of a parent item, among possibly other things.

This component assumes that the consumer properly handles state between siblings, parents and children. As such, you should refer to the design system itself for how to use --- and not to use --- the component together with others in a navigation list.

Examples

Tables

Properties

Attribute Property Description Type Default Value
count count Count to be displayed in the right part of the component number 0
disabled disabled Flags that the component should be disabled boolean false
leading-icon-template leadingIconTemplate Name of the icon on the far left in the component. Takes a URI-encoded SVG. IconConstant | '' ''
level level Defines the visual level of the component. Use 'two' for child variants. 'one' | 'two' 'one'
secondary-label secondaryLabel Secondary text label (title 2) of the item. Not a subtitle, but placed to the side string ''
subtitle subtitle Text that should be rendered as a subtitle in the component string ''
label label Main text label (title) of the item string ''
trailing-icon-template trailingIconTemplate Name of the icon to the far right in the component. Usually a right-facing arrow. Takes a URI-encoded SVG. IconConstant | '' ''
secondary-trailing-icon-template secondaryTrailingIconTemplate The icon second from the far right in the component. Takes a URI-encoded SVG. IconConstant | '' ''
value value A string value contained in the component. Will be returned by events on click string ''

Events

Event name Reactjs attribute Description
tpg-change ontpg-change Event emitted when an item is clicked. It's value prop is returned in the event.

Functions

Name Description Arguments
No functions found.

Slots

Name Description
badge Slot reserved for a tpg-badge component.

CSS Parts

Attribute Description
badge Part for styling the container around the slotted badge

Sandbox