Here are some paths for tabs:
https://codepen.io/mochime/pen/VxxzMW
The other answers explained the mechanics. I especially liked hossein-maktoobian's answer.
The paths in the pen do the brunt of the work, the values can be modified to suite whatever desired dimensions.