Is this sliding effect possible?

Hello! I want to create a ‘tab’ (pic 1) to the right with some text on and then when you click it opens up across the screen (pic 2). I made this by creating a click interaction just moving the imported shape by 600 pixels or so. The issue with this is that when it’s at position 2, it widens my page (shown in pic 3 - the white line is where the edge should be). What’s the best way to create this effect? I’m not sure what to call it so haven’t been able to google a tutorial.