Skip to Content

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

NameTypeDefault
classNamestring

CSS Classname to apply to the tree

styleCSSProperties

Extra style attributes to apply to the tree

themeTreeTheme

Theme for the Tree

collapsedIconany

A custom icon to be used for collapsed nodes.

expandedIconany

A custom icon to be used for expanded nodes.

TreeNode

NameTypeDefault
labelReactNode

Label to display for the node

classNamestring

CSS Classname to apply to the node

expandedboolean

Whether the node is expanded or not

disabledboolean

Whether the node is disabled or not

themeTreeTheme

Theme for the Tree

onExpand() => void

Event fired when the node is expanded

onCollapse() => void

Event fired when the node is collapsed

Last updated on