You set the default size of the iframe extension in the app dashboard. Users can change the size of the extension by resizing the iframe inside the editor, just like other Wix elements.
To detect the size of the iframe, use the window resize event. Make your app responsive and change the layout of the extension according to the new size.