/* * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * For full license text, see the LICENSE.txt file */ /** * The `lightning/tree` component displays a nested tree. * @see {@link https://developer.salesforce.com/docs/component-library/bundle/lightning-tree/documentation | Lightning Tree Documentation} */ declare module "lightning/tree" { import { LightningElement } from "lwc"; /** * TreeNode interface key-value pairs that can be passed in items array. */ interface TreeNode { name?: string; label?: string; metatext?: string; endIcon?: string; href?: string; disabled?: boolean; expanded?: boolean; items?: TreeNode[]; } /** * Displays a nested tree. */ export default class LightningTree extends LightningElement { /** * The text that's displayed as the tree heading. */ header: string; /** * Changes the 'aria-level' attribute value for the *

markup tag in the card's title element. Supported values * are (1, 2, 3, 4, 5, 6). * This value defaults to 2. */ headingLevel: string | number | undefined; /** * An array of key-value pairs that describe the tree. See the Documentation tab for more information. */ items: TreeNode[]; /** * Selects and highlights the specified tree item. Tree item names are case-sensitive. * If the tree item is nested, selecting this item also expands the parent branches. */ selectedItem: string | null; } }