That's right, this dovetail box isn't restricted to the traditional cube shape or square base. The included Fusion 360 file is parameterized so you can pick any length, width, height, or any of many other parameters to make a dovetail box that fits your needs.
Some included parameters:
... and more. Each one you might change has a description in the file.
The way a dovetail box is made is by cutting the teeth (dovetails) through the box at an angle. With a square box, the angle is always 45 degrees, which is easy. It's also the arctangent of the width over the length. So, in the Fusion 360 file, the plane where the teeth are drawn is an angled plane using that arctangent calculation so it auto updates when you modify the width or length.
Note that some changes will require changing other parameters. For example, if you increase the teeth_small_width you may also need to increase teeth_angle.
The included STLs are for a 1in x 2in x 1in (25.4mm x 50.8mm x 25.4mm) box with a tolerance of .12mm. I found that .12mm is pretty good as it provides a bit of a snap fit too on my Ender 3.
The cube version in the pictures is an from an older version of the file before I made the inside round and cut out part of the top too. As a result, the top has to slide all the way off and on. Whereas, the rectangular box only has to slide a couple millimeters. You can see that in the photos where the top isn't fully closed.