NV Elements Catalog Starters Repo System Themes About Getting Started Changelog Metrics Support Accessibility Contributions Requests Migration Integrations Installation MCP CLI Lint Angular Bundles Extensions Golang Hugo Import Maps Lit NextJS Nuxt Preact React SolidJS Svelte TypeScript Vue Foundations Typography Iconography Themes Design Tokens Size & Space Objects Interactions Support Status Color Animation Fonts Layers Custom Layout Horizontal Vertical Grid Popovers i18n Visualization View Transitions Elements Accordion Alert Avatar Badge Breadcrumb Button Button Group Card Chat Message Checkbox Color Combobox Copy Button Datagrid Integrations Column Action Column Alignment Column Fixed Column width Container Card Display Settings Footer Heatmap Keynav Multi Select Pagination Panel Detail Panel Grid Performance Placeholder Row Action Row Groups Row Sort Scroll Height Single Select Stripe Date Datetime Dialog Divider Dot Drawer Dropdown Dropdown Group Dropzone File Format Datetime Format Number Format Relative Time Forms Validation Actions Control Icon Icon Button Input Input Group Logo Menu Month Notification Page Page Header Page Loader Pagination Panel Progressive Filter Chip Progress Bar Progress Ring Password Preferences Input Pulse Radio Range Resize Handle Search Select Skeleton Sort Button Sparkline Star Rating Steps Switch Tabs Tag Textarea Time Toast Toggletip Toolbar Tooltip Tree Week Patterns Authentication Browse Dashboard Editor Empty States Heatmap Keyboard Shortcut Logging Media Navigation Onboarding Panel Responsive Search Subheader Trend Code Codeblock Monaco Input Diff Input Editor Diff Editor Problems Markdown Markdown CSS Utility Labs Responsive Layout Viewport Container Patterns Forms API Design Properties & Attributes Slots Registration CustomEvents Stateless Composition Styles Packaging Glossary Logs Internal Guidelines Agent Harness Documentation Examples TypeScript Testing Unit Testing Accessibility Testing Lighthouse Testing SSR Testing Visual Testing Troubleshooting Component Creation Internal Examples All Examples

Tree View

stable:  0.1.1 Coverage: 100.00% Bundle: 29.26kb Lighthouse: 100 Axe Core Released: 1.2.0
Overview API Examples

A tree view widget presents a hierarchical list. Any item in the hierarchy may have child items, and items that have children can expand or collapse to show or hide the children.

node 1 node 1-1 node 1-2 node 1-3 node 1-3-1 node 1-3-2 node 1-3-3 node 2 node 2-1 node 2-2 node 2-3 node 3 node 3-1 node 3-2 node 3-3 node 3-3-1 node 3-3-2 node 3-3-3

Installation


    

    
CLI / MCP

Border

Determines if the node depth border renders.

Border Description true false

Tree with border styling for enhanced visual separation and container definition, improving content structure perception.

node 1 node 1-1 node 1-2 node 1-3 node 1-3-1 node 1-3-2 node 1-3-3 node 2 node 2-1 node 2-2 node 2-3 node 3 node 3-1 node 3-2 node 3-3 node 3-3-1 node 3-3-2 node 3-3-3

Selectable

Determines whether a node can be in a selected state. Nodes can be in a single or multi select state.

Selectable Description single multi

Single-selection tree for choosing one item from hierarchical options, enabling focused navigation and content selection.

node 1 node 1-1 node 1-2 node 1-3 node 1-3-1 node 1-3-2 node 1-3-3 node 2 node 2-1 node 2-2 node 2-3 node 3 node 3-1 node 3-2 node 3-3 node 3-3-1 node 3-3-2 node 3-3-3

Selectable Multi

Determines whether a node can be in a selected state. Nodes can be in a single or multi select state.

Selectable Description single multi

Multi-selection tree for choosing many items from hierarchical options, enabling bulk operations and comprehensive content management.

node 1 node 1-1 node 1-2 node 1-3 node 1-3-1 node 1-3-2 node 1-3-3 node 2 node 2-1 node 2-2 node 2-3 node 3 node 3-1 node 3-2 node 3-3 node 3-3-1 node 3-3-2 node 3-3-3

Select Event

Interactive selection handling using the select event, with callbacks for node selection changes.

Documents Annual Report.pdf Budget.xlsx Projects Project Alpha Project Beta Project Gamma Images photo-001.jpg photo-002.jpg screenshot.png

Selected: None

History:

  • No selections yet

Tree with navigation links for hierarchical menu systems, enabling structured site navigation and content discovery.

Highlight

Determines the highlighted state of the element. Highlighted states serve non-interactive selections where nodes may relate to other selected portions of the UI.

Highlighted Description true false

Tree with highlighted nodes for emphasizing specific items, providing visual focus and search result signal in hierarchical data.

node 1 node 1-1 node 1-2 node 1-3 node 1-3-1 node 1-3-2 node 1-3-3 node 2 node 2-1 node 2-2 node 2-3 node 3 node 3-1 node 3-2 node 3-3 node 3-3-1 node 3-3-2 node 3-3-3

Async

Tree with loading states for asynchronous data, including progress indicators and dynamic content loading in hierarchical structures.

node 1 node 1-1 node 1-2 node 1-3
loading
node 2 node 2-1 node 2-2 node 2-3 node 3 node 3-1 node 3-2 node 3-3 node 3-3-1 node 3-3-2 node 3-3-3

Complex Tree Navigation

Tree integrated in vertical navigation. Use for providing structured sidebar navigation for application layouts and content organization.

Drawer Navigation

Drawer based navigation. Use for secondary or mobile navigation when available space gets tight.

Node Content

Tree with rich node content including forms, controls, and interactive elements, enabling complex data management within hierarchical structures.

text content node link inline content
block

content

long form content interactive content

This is some longer content in a tree node.

hello there
input control
node content checkbox group node content radio group

Dynamic Tree

Dynamic tree with programmatic node creation and management, for scalable hierarchical data handling with large datasets.

Example in lit-html:


    

Overflow

Tree with scrollable container for handling deep hierarchies and large datasets, ensuring optimal space usage and navigation.

node 1 node 1-1 node 1-2 node 1-3 node 1-3-1 node 1-3-2 node 1-3-3 node 1-3-3-1 node 1-3-3-2 node 1-3-3-3 node 1-3-3-3-1 node 1-3-3-3-2 node 1-3-3-3-3 node 1-3-3-3-3-1 node 1-3-3-3-3-2 node 1-3-3-3-3-3 node 1-3-3-3-3-3-1 node 1-3-3-3-3-3-2 node 1-3-3-3-3-3-3 node 1-3-3-3-3-3-3-1 node 1-3-3-3-3-3-3-2 node 1-3-3-3-3-3-3-3 node 1-3-3-3-3-3-3-3-1 node 1-3-3-3-3-3-3-3-2 node 1-3-3-3-3-3-3-3-3 node 1-3-3-3-3-3-3-3-3-1 node 1-3-3-3-3-3-3-3-3-2 node 1-3-3-3-3-3-3-3-3-3 node 2 node 2-1 node 2-2 node 2-3

Release Status

All elements and features go through 3 phases of stability, pre-release, beta and stable.

pre-release
Docs Preview API Documentation Fully Themeable
beta
Robust unit test coverages Passed API Review Passed Designer VQA Review Included in library package
stable
No known outstanding AA WCAG issues No known outstanding performance issues Adapts to different screen/container sizes No breaking API changes for at least 90 days