Usage

Creating trees with Treeflex is as simple as writing nested HTML lists. Treeflex needs a block-level element with a tf-tree class and an unordered list ( ul ) as a direct child of the element.

Each li element's first child with a tf-node-content class (or tf-nc for short) is used as that node's content. This is required. You can use whatever tag you like for node content, however it is suggested that you use a span or div element.

Each li element that is not the leaf node should have an unordered list ( ul ) as its second child. Each li element inside this ul acts as this node's child.

There's no limit on how deep the trees could go. However, every new level adds to the width of the entire tree.

As simple as that!