This is a migrated thread and some comments may be shown as answers.

Responsive Drawer

3 Answers 408 Views
Drawer
This is a migrated thread and some comments may be shown as answers.
datum
Top achievements
Rank 1
datum asked on 12 Nov 2020, 07:26 AM
hi, i'm trying to make a responsive toggle for mini mode for the drawer component. Can we achieve this with just CSS? Thx!

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 13 Nov 2020, 11:31 AM

Hello Datum,

The expanded/collapsed mini modes are established with JavaScript and not just CSS. That said, there is no way to toggle between expanded and collapsed mini mode with just CSS. If you want your implementation to be CSS only, you'll have to define an expanded Drawer with its full content and handle the show/hide logic yourself. 

What you can do if you want to use the Drawer's mini expanded and collapsed modes, is to hook to the window.resize event and set the state according to the current window width. Here's an example.

Let me know if you need further information on the topic.

Regards,
Dimitar
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/.

0
datum
Top achievements
Rank 1
answered on 13 Nov 2020, 03:32 PM
thanks! will take a look at it :)
0
Dimitar
Telerik team
answered on 16 Nov 2020, 07:51 AM

Hello Datum,

Take your time. If further questions on the topic emerge, feel welcome to write back.

Regards,
Dimitar
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/.

Tags
Drawer
Asked by
datum
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
datum
Top achievements
Rank 1
Share this question
or