If your opening was a 1' square, maybe make the door a 14" square and use a 1×4 screwed vertically on both sides with a 1/2"-3/4" gap. Then screw a 1×6 to the 1×4 so it overhangs to form the outer edge of the track. If you made those 30" tall, you would be unlikely to pull the door out of the track in the up position