Responsive layout: change from cols to rows?

What’s the best way to make a layout that goes horizontal if there’s space or vertical if not?

For example:
http://webix.com/snippet/364e857e

How can I make the Search button go under the input box if the parent is not wide enough?

Check http://docs.webix.com/desktop__responsive_layout.html

Thank you. Is the Snippet environment able to trigger the responsiveness?
I tried moving the resize bar and resizing the browser window, but the layout never changes, even when cramped.

http://webix.com/snippet/1560f67d

Responsive behavior can’t be triggered by resize bar, but must work with window resizing. Try to resize window in the next example

http://docs.webix.com/samples/01_layout/12_responsive_hidden.html