We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Contextual side bar not collapsing in a custom page - UI Builder

Vinay Tulabandu
Giga Guru

When a contextual sidebar is added to resizable panes inside custom page using ui builder, when collapsed the space remains empty as shown below,

Screenshot 2026-03-03 at 22.53.19.png

 

To solve this, I made a workaround as explained.

 

step 1 : Modify the resizable panel configuration as below,

Screenshot 2026-03-03 at 22.54.44.png

 

The minPixels should be -48. by default its 100.

 

Step 2 : Create client state parameter with value 75. I want the sidebar to be 25% on right.

Screenshot 2026-03-03 at 22.57.21.png

 

Step 3 : Create events on contextual side bar. one event to set client state parameter to 75 when tab item is selected and value should be -48px if tab item is collapsed.

Screenshot 2026-03-03 at 22.59.34.pngScreenshot 2026-03-03 at 23.00.39.png

 

This way the sidebar will not leave empty space.

Screenshot 2026-03-03 at 23.01.45.png

1 ACCEPTED SOLUTION

Vinay Tulabandu
Giga Guru

This is more like an article. so marking as accepted solution

View solution in original post

1 REPLY 1

Vinay Tulabandu
Giga Guru

This is more like an article. so marking as accepted solution