Custom HTML

This is an item that contains any custom HTML content (for example, an image, icon or other element).

Related sample:  Sidebar. Custom HTML

Adding Custom HTML

Any custom HTML content can be easily added to a sidebar with the help of the add() method of Tree Collection:{
    type: "customHTML",
    id: "userInfo",
    css: "user-info_item",
    html: "<div class='user-info_container'>" +
            "<img class='user-info_avatar' src='../common/ava.png'/>" +
            "<div class='user-info_title'>" +
            "Gloria McKinney"+
            "</div>" +
            "<div class='user-info_contact'>" +
            "@gmckinney" +
            "</div>" +


Working with Custom HTML

You can perform operations over the Custom HTML item with the help of the available Sidebar API and Tree Collection API.

Back to top