Panels
Featured prominently in Asides, the Panel is simply a container with a scrollbar. But Panels can also be used to generate entire page layouts — such as this one.
We can position Panel
elements as direct children of the body
to autogenerate tabs in the TopBar. The tabs at the top of this page are created with the markup shown below.
Note that the content of the three "pages" are each wrapped inside a nested Main
element. It is possible to nest further Panel
elements inside these Main
elements to generate additional TabBars
as seen in Panel Two.
When to use this?
Certainly when you are prototyping as a UX designer, but it will otherwise depend on your technology stack (since this may not a good fit for all frameworks) and on your requirements. If you app features highly dynamic navigation, it may be easier to approach this kind of multi-page layout programatically instead of declaratively.
History support
To avoid conflicts with your favorite routing library, Tradeshift UI will not attempt to update the history (via the address bar). You can however add history support if you manually intercept tab selection like this.