Skip to main content
Version: Next

Tree API

import { Tree } from '@editora/ui-react';

Props​

PropTypeDescription
indentSizestring
onExpandedChange(detail: TreeExpandedChangeDetail) => void
onSelect(detail: TreeSelectDetail) => void
valuestring

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Tree.Item props​

PropTypeDescription
childrenReact.ReactNode
disabledboolean
expandedboolean
labelReact.ReactNode
prefixReact.ReactNode
selectedboolean
suffixReact.ReactNode
value (required)string

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-tree>​

Tree renders the ui-tree custom element from @editora/ui-core, which can also be used without React.

Attributes: aria-label, aria-labelledby, indent-size, value

Events: expanded-change, select