--- title: "Tree View" slug: tree-view category: component type: overview version: 20.0.0 tokens: 380 source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-tree-view.txt --- # Tree View ## Props | Property | Type | Required | Default | Description | |---|---|---|---|---| | `defaultExpandedValue` | `string[]` | No | undefined | The initial expanded value(s). Use when you don't need to control the expanded value(s) of the tree view. | | `defaultValue` | `string[]` | No | undefined | The initial selected value(s). Use when you don't need to control the selected value(s) of the tree view. | | `disabled` | `boolean` | No | undefined | Whether the component is disabled. | | `expandedValue` | `string[]` | No | undefined | The controlled expanded value(s). | | `items` | `TreeViewItem[]` | Yes | undefined | The list of items | | `multiple` | `boolean` | No | undefined | Whether the multiple selection is allowed. | | `onExpandedChange` | `(details: TreeViewExpandedChangeDetail) => void` | No | undefined | Callback fired when the expanded value(s) changes. | | `onValueChange` | `(details: TreeViewValueChangeDetail) => void` | No | undefined | Callback fired when the value(s) changes. | | `value` | `string[]` | No | undefined | The controlled selected value(s). | ## Examples - Default - Multiple - Disabled - Custom Render - Default Expanded Value - Controlled - Controlled Multiple - Disabled Items - In Form Field - Dynamic Children ## Documentation pages - [Documentation](./react-components-tree-view--documentation.txt) - [Technical Information](./react-components-tree-view--technical-information.txt) - [Examples](./react-components-tree-view--examples.txt)