How set the width of a widget(to be opened)?

How do I open a widget to a pre-determined size? It is similiar to css width: 80vw. I couldn’t find anything related to this under defaultWidgetOptions.

[original thread by Zhang Bosen]

There is ApplicationShell.resize.

[Zhang Bosen]

How is the size based on? Is it based on pixels?

Edit: Nevermind, didnt see the comments above.