Completed
Last Updated: 22 Nov 2023 08:50 by ADMIN
Release 5.1.0 (31 Jan 2024) (R1 2024)
Christian
Created on: 17 Aug 2023 09:51
Category: Drawer
Type: Feature Request
0
OnItemRender or custom item CSS class for the Drawer

Hello,

I would like to add a CSS-Class to some items in my TelerikDrawer control. Since the ItemTemplate only controls the contents and the Template is overkill as it overrides the rendering for the entire drawer contents, I was wondering whether there was any support for adding custom CSS classes to items (similar to how it is described for Angular here: https://www.telerik.com/kendo-angular-ui/components/layout/drawer/items/).

TIA

- Chris

 

 

1 comment
ADMIN
Dimo
Posted on: 22 Aug 2023 09:02

Hi Christian,

Indeed, currently there is no built-in way to add custom CSS classes for specific Drawer items. The full-blown Drawer <Template> is the only option, which I agree is an overkill.

We have a feature request for an OnItemRender event for the Menu. It makes sense for us to implement this also for the Drawer, so I am converting your forum thread to a feature request.

There is an easy workaround, but it doesn't work in Firefox (yet). Add a custom CSS class inside the <ItemTemplate> and target the parent DOM element with a :has() selector. Alternatively, implement the custom styling inside the item template itself, but I guess this is not possible or convenient in your case.

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!