Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change both menu width for ionic side menu

I have left and right ionic side menu, which i want to change both the menu width. I have successfully change the left menu width as shown below but i am not sure how to change the right menu width. Currently, the left menu width change but when right menu is being toggle, the right menu content is distorted.

.menu.menu-left{
    width: calc(100% - 70px) !important;
}
.menu-open .menu-content{
    transform: translate3d(calc(100% - 70px), 0px, 0px) !important;
}

Codepen Link

like image 200
stackdisplay Avatar asked Mar 10 '23 22:03

stackdisplay


2 Answers

Just add the "menu-width" in variables.scss

$menu-width: 200px;
like image 127
Jayaprakash G Avatar answered Mar 19 '23 00:03

Jayaprakash G


Use a class name to change the width of the side menu.

<ion-menu class="custom" side="end" menuId="first">
</ion-menu>

In CSS you can use like below.

.custom {
  --width: 500px;
}
like image 20
Shankar_programmer Avatar answered Mar 19 '23 02:03

Shankar_programmer