change the width, height, rounding, filled, and transparency variables to customise the rectangle. You can backpack the custom block to use in your own projects.
There are two custom blocks inside: one draws a filled rectangle and is a modified version of the block in my project "pen rectangles" and one draws the outline of a rectangle.