Yes it is possible but you need to use the react way to style the element inside your widget.
css file:
.myCustomClass {
width: 100px;
heigth: 100px
}
in your component:
<div className=”myCustomClass”></div>
or you could style inline:
<div style={{ width: “100px”, heigth: “100px”}}> </div>
using inline styling you need to pass the style as an object.
note that you also can use Mendix style classes in your widget:
<input type=”text” style=”mx-btn” />