Please note the feature is added somewhere in 8. I dont know the exact version. please double check
You may need to update your app to a newer version of Mendix, but Nanoflow commons has a Toggle Sidebar action. Maybe that could meet your needs.