Way to detect if new toggle menu is opened

Does anyone know if there’s a way to detect whether or not the new toggle menu is opened? It expands when opened and I want to make my UI move with it so I need a way to see if the menu is opened or not.
Screenshot 2023-11-20 145236
Screenshot 2023-11-20 145239