How do I create a roll-up header?

I have a number of sections. Each section has a number of controls. I’d like each section to have a header with a roll-up button/widget that lets the user expand/collapse that section of the page. It’s a bit like an accordion, but any number of sections can be “open” at a time, and each section should ideally be individually created/controlled rather than part of some one big view.

This seems like a common use case, but I can’t find an obvious way to achieve it in Webix layout. How would I best do this?

So it turns out that each item of a “rows” layout can have a header and a body, and the header is supposed to automatically roll out/in.
That kind-of works, but not really – the rows underneath all of the headers get almost no space.
Here is a screen shot of the layout that ends up happening (with chrome dev tools info) and here’s the code that generates this:

    webix.ui({
        container: 'settings',
        rows: [
            { header: 'Header 1', body: { rows: [
                                                { body: "row 1:1" },
                                                { body: "row 1:2" },
                                                { body: "row 1:3" }
                                                ] } },
            { header: 'Header 2', body: { rows: [
                                                { body: "row 2:1" },
                                                { body: "row 2:2" }
                                                ] } },
            { header: 'Header 3', body: { rows: [
                                                { body: "row 3:1" }
                                                ] } },
            ]
        });
    };

Hi,

the issue can be easily solved by setting the size to the accordion items (inner views will fit the parent) or particularly to the child views:

http://webix.com/snippet/02109fba

The sections can be expanded/collapsed through the related methods.

I don’t know the size of the inner items. I need them to size to their contents (which varies.)