Docs
πŸ—οΈ ⏐ Components
Layout
Tree

Tree

Simple tree component for showing hierarchical data.

Examples

Theme

This component uses the following default theme:

  • root{}(6 keys)
      Show all

Learn more about how to customize in the Theme documentation.

API

Tree

PropDescriptionDefault
classNameCSS Classname to apply to the tree
string
styleExtra style attributes to apply to the tree
CSSProperties
themeTheme for the Tree
TreeTheme
collapsedIconA custom icon to be used for collapsed nodes.
any
expandedIconA custom icon to be used for expanded nodes.
any

TreeNode

PropDescriptionDefault
labelLabel to display for the node
ReactNode
classNameCSS Classname to apply to the node
string
expandedWhether the node is expanded or not
boolean
disabledWhether the node is disabled or not
boolean
themeTheme for the Tree
TreeTheme
onExpandEvent fired when the node is expanded
() => void
onCollapseEvent fired when the node is collapsed
() => void