Skip to content

TreeItem

Unofficial

Represents a single interactive item within a tree view UI component.

Import:

import type { TreeItem } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface TreeItem extends TreeNode

Extends: TreeNode

Properties

PropertyTypeDescription
coverElHTMLElementOverlay element covering the tree item, used for visual effects.
elHTMLElementThe element of the tree node.
(Inherited from TreeNode)
innerElHTMLElementInner container element holding the tree item content.
selectablebooleanWhether the item can be added to the tree's selection. false for rows such as bookmark groups.
selfElHTMLElementThe main element representing this tree item in the DOM.

Methods

MethodReturnsDescription
onSelfClick(event)voidExecute item functionality on clicking tree item.
setClickable(value)voidSet clickable state of tree item.

Links to this page: