It is very easy:
- Create a rectangle.
- give the rectangle top and bottom stroke from the Stroke panel in Muse.
- From the Stroke panel > Align, set the stroke alignment to "Align the stroke to inside".
- Then select the hover state in the State panel in Muse (as the rectangle is still selected).
- Now set the stroke alignment in the Stroke panel to "Align stroke to outside".
You are all set!