
package.dist.components.tree-view.use-tree-view.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react Show documentation
Show all versions of react Show documentation
A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.
The newest version!
import { PropTypes } from '@zag-js/react';
import { Optional } from '../../types';
import { TreeCollection, TreeNode } from '../collection';
import * as treeView from '@zag-js/tree-view';
export interface UseTreeViewProps extends Optional, 'id'> {
/**
* The initial selected items of the tree view.
* Use this when you do not need to control the state of the tree view.
*/
defaultSelectedValue?: treeView.Context['selectedValue'];
/**
* The initial expanded items of the tree view.
* Use this when you do not need to control the state of the tree view.
*/
defaultExpandedValue?: treeView.Context['expandedValue'];
/**
* The collection of tree nodes
*/
collection: TreeCollection;
}
export interface UseTreeViewReturn extends treeView.Api {
}
export declare const useTreeView: (props: UseTreeViewProps) => UseTreeViewReturn;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy