NV Elements Catalog Starters Repo System Themes Getting Started Getting Started Installation CLI MCP Skills Lint Integrations Getting Started Angular Bundles Custom Elements Golang Hugo Import Maps Lit Lit Library MCP Apps NextJS Nuxt Preact React SolidJS Svelte TypeScript Vue About Changelog Metrics Support Accessibility Contributions Requests Migration Foundations Overview 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 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 Chat 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 Agent Tooling Agent Ownership 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.2.4 Coverage: 100.00% Bundle: 29.26kb Lighthouse: 100 Axe Core Released: 1.2.0
Overview API Examples
DefaultBorderSelectableSelectableMultipleSelectEventHighlightLinksAsyncNodeContentDynamicTreeOverflowBulkCreationAudit

Default

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
Edit Example

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.

Border

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
Edit Example

Determines if the node depth border renders.

Border Description true false

Selectable

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
Edit Example

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

Selectable Description single multi

Selectable Multiple

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
Edit Example

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

Select Event

test-case
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
Edit Example

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

Highlight

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
Edit Example

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

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

Async

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
Edit Example

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

Node Content

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
Edit Example

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

Dynamic Tree

test-case

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

Overflow

test-case
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
Edit Example

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

Bulk Creation

test-caseperformance

Tree with bulk node creation for performance testing, verifying efficient handling of large numbers of nodes and dynamic expansion.

Audit

anti-pattern

Examples of invalid tree usage patterns for testing and documentation purposes, showing what not to do when implementing trees.