Skip to content

ckotzbauer/simple-tree-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,637 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Tree Component

build codecov NPM

This pure JavaScript component comes without any dependencies and is targeted to modern browsers. Full TypeScript support is available.

Installation

Install with NPM:

npm install simple-tree-component

TypeScript definitions are included in the npm package.

Usage

import simpleTree from "simple-tree-component";

const instance = simpleTree(".root-1", "singleSelectDropdown", {
    nodes: [
        {
            label: "Parent 1",
            value: "p1",
            children: [
                {
                    label: "Parent 1 - Child 1",
                    value: "p1c1"
                },
                {
                    label: "Parent 1 - Child 2",
                    value: "p1c2"
                }
            ]
        }
    ]
});

instance.setReadOnly(true);

You can find more documentation here.

Blog post

https://dev.to/ckotzbauer/announcing-the-simple-tree-component-46nd

Contributing

Please refer to the Contribution guildelines.

Code of conduct

Please refer to the Conduct guildelines.

Security

Please refer to the Security process.

Releases

Sponsor this project

Packages

Used by

Contributors

Languages