ui/webui/resources/cr_elements/cr_tab_box/README.md
cr-tab-box is a non-Polymer custom element that can be used to create a simple tabbed UI. This is generally most useful for debug pages that are not concerned with matching the look/feel of the larger user-facing Chromium WebUIs that use Polymer (e.g. chrome://settings). cr-tab-box replaces the deprecated cr.ui.TabBox from ui/webui/resources/js/tabs.js which was previously used by debug pages for this purpose.
Tabs and tab panels can be added into the appropriate slots. The number and order of the tabs should match the number and order of the panels. Example:
<cr-tab-box>
<div slot="tab" role="tab" id="donuts-tab" aria-controls="donuts-panel">Donuts</div>
<div slot="tab" role="tab" id="cookies-tab" aria-controls="cookies-panel">Cookies</div>
<div slot="panel" role="tabpanel" id="donuts-panel" aria-labelledby="donuts-tab">
<span>Some content related to donuts</span>
</div>
<div slot="panel" role="tabpanel" id="cookies-panel" aria-labelledby="cookies-tab">
<span>Some content related to cookies</span>
</div>
</cr-tab-box>
In general, user facing WebUIs using Polymer should use cr-tabs, while debug UIs trying to avoid Polymer (e.g., in order to run on mobile platforms) should use cr-tab-box. Key differences include: