Skip to content

PaigeWw/react-tree-view

Repository files navigation

react-tree-view

A lightweight tree view component for React.

demo

https://react-tree-view.vercel.app

demo source

https://github.com/PaigeWw/react-tree-view/tree/main/example

preview

img

Usage

import TreeView from ''

<TreeView
    dataSource={dataList as DataSource[]}
    height={800}
    width={1200}
    LeafNodeComponent={LeafNodeComponent}
    leafHeight={80}
    leafWidth={360}
    ref={treeViewRef}
/>

API

type TreeViewProps = {
    dataSource: DataSource[];
    width?: number;
    height?: number;
    ref?:  React.MutableRefObject<any>;
    leafHeight: number;
    leafWidth: number;
    LeafNodeComponent: React.FC<any>;
}

About

A lightweight tree view component for React.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published