Tree View

Hierarchical list with expand/collapse. Supports icons, badges, and keyboard navigation.

import{ TreeView } from "@pepulux/ui"

Default

Compact (sm)

Props

PropTypeDefaultDescription
nodes*TreeNode[]—Array of { id, label, children?, icon?, badge? }
selectedIdstring—Controlled selected node id
onSelect(node: TreeNode) => void—Called when a node is clicked
defaultExpandedstring[]—IDs of nodes expanded on initial render
size"sm" | "md""md"Row height and font size
Application component → Tree viewswww.pepulux.com

Notes and documentation

Space for notes, documentation, and best practices for using these components.

Hierarchies you can explore

Tree views display nested data such as files or categories. Expand and collapse with the chevron, and keep selection obvious.