TreeView Samples - InkJS

TreeView #1 - Default Markup

A TreeView is built with "node"s and "children". "node"s are <li> tags, and "children" are <ul> tags.

You can build your TreeView out of a regular UL and LI element structure which you already use to display lists with several levels.

If you want a node (LI) to be open when the TreeView is built, just add the data-open="true" attribute to it.

                    

TreeView #2 - Different Markup... Same behavior

By using the children and node options, you can choose what is a "node" and what is a "children". This way you are not limited to using uls and lis