Design Rule #1:
Slideth not thy parts; rather let them rotateth, that it might go well with you and your children.
Seriously, unless it's really important for the two surfaces to move linearly, making things that pivot is generally more robust, simple, and reliable than making things that...