Skip to content
Calm motion: animations on this site only fade, with no movement

Tree ​

Nested details tree, role=tree

A hierarchy people expand and browse: files, a category tree, a table of contents. For a small chart of who reports to whom, OrgChart. To pick one value from a hierarchy, TreeSelect.

Basic
  • src
    • components
  • README.md
selected: index
  • One Tab stop. ↑ / ↓ move through the visible rows. → opens a branch or enters it. ← closes it or goes to the parent. Home / End jump. Enter picks the row (a branch too: Space opens and closes it). Branches say whether they are open.
  • Branches are native <details>, so they work before scripts run. href makes a leaf a link. v-model:selected holds the picked id.

Usage ​

ts
import { BlessTree } from "blessing-ui";

API ​

BlessTree ​

Props

NameTypeDefaultDescription
nodes*BlessTreeNode[]—
labelstring"Tree"
selectedstring—

Events

NamePayloadDescription
select[node: BlessTreeNode, path: string]
update:selected[value: string | undefined]

Released under the MIT License. Character names and artwork belong to their owners.