Completed
Last Updated: 31 Aug 2026 14:50 by ADMIN
Jack
Created on: 10 Feb 2021 21:01
Category: Drawer
Type: Feature Request
1
Add templated items to drawer

Add templated items to drawer to allow more complex scenarios as below:

Image result for twitter app drawer

4 comments
ADMIN
Rumen
Posted on: 31 Aug 2026 14:50

Hi Jack,

The requested functionality is now available in the Kendo UI for jQuery Drawer.

The Drawer supports data-driven items with an item-level template through the items[].template configuration. The template function receives the item data and can return custom markup, which enables scenarios such as account selectors, avatars, additional metadata, and other content beyond the built-in icon and text.

The Drawer also supports items[].miniTemplate for customizing the item rendering in mini mode.

A top-level Drawer template is still available for scenarios where the complete Drawer content needs to be defined manually. When the top-level template is configured, it takes precedence over the items configuration.

You can test the item-level templating functionality in the following Dojo example:

https://dojo.telerik.com/EwVaZPYB

  <button id="toggle-drawer" type="button">Toggle Drawer</button>
  <div id="drawer">
    <div class="drawer-content">
      <h2>Active account</h2>
      <p id="selected-account">Select an account from the Drawer.</p>
    </div>
  </div>

  <script>
    $(function () {
      var drawer = $("#drawer").kendoDrawer({
        mode: "push",
        width: 280,
        expanded: true,
        items: [
          {
            text: "Ada Lovelace",
            email: "ada@example.com",
            initials: "AL",
            role: "Administrator",
            selected: true,
            template: accountTemplate
          },
          {
            text: "Grace Hopper",
            email: "grace@example.com",
            initials: "GH",
            role: "Developer",
            template: accountTemplate
          },
          {
            text: "Katherine Johnson",
            email: "katherine@example.com",
            initials: "KJ",
            role: "Analyst",
            template: accountTemplate
          }
        ],
        itemClick: function (e) {
          $("#selected-account").text("Selected: " + e.dataItem.text + " (" + e.dataItem.role + ")");
        }
      }).data("kendoDrawer");

      $("#toggle-drawer").on("click", function () {
        if (drawer.expanded) {
          drawer.hide();
        } else {
          drawer.show();
        }
      });

      function accountTemplate(item) {
        return "<li data-role='drawer-item' class='account-item'>" +
          "<span class='account-avatar' aria-hidden='true'>" + kendo.htmlEncode(item.initials) + "</span>" +
          "<span class='account-details'>" +
          "<span class='account-name'>" + kendo.htmlEncode(item.text) + "</span>" +
          "<span class='account-email'>" + kendo.htmlEncode(item.email) + "</span>" +
          "</span>" +
          "</li>";
      }
    });
  </script>

 

The Feature request has been closed as Completed.

 

Regards,
Rumen
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Tsvetomir
Posted on: 17 Feb 2021 15:54

Hi Jack,

Thank you for your follow-up. 

Indeed, the further information is needed so that when the developer start working on the item, they know exactly what our users need. Hence, I will go ahead and approve the item and mark it as "Unplanned".

If there is anything else, or if you would like to add another use-case, feel free to do so.

Best regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Jack
Posted on: 17 Feb 2021 14:47

The same way you pass item to the appbar, toolbar or tilelayout would work for me as long as items can be templated to allow more complex scenarios than simply icon + text.

The very specific use case I have in mind is very similar to Twitter as I would like to show an horizontal group of avatars to choose an account from.

ADMIN
Tsvetomir
Posted on: 17 Feb 2021 14:34

Hi Jack,

Thank you for your idea. 

Is it possible for you to follow-up with more details on how exactly you anticipate the templating mechanism to work? For instance, you would like to pass a collection to the widget and separately pass a template that will be automatically populated? Or, you expect other behavior?

 

Kind regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.