Example Page
An example of a full page in zinc with use of multiple nested tabs, in case you need to show multiple views of data.
We have a primary set of tabs which uses just the zn-navbar
component to show the navigation,
and then a secondary set of tabs which uses the zn-header
component to show the navigation in a
more detailed way.
Note: This is subject to change as defining the navigation and dropdown as attributes is not ideal, especially for SEO purposes. We should be slotting everything in as children of the components.
<style> .code-preview__preview { background-color: rgb(var(--zn-body)) !important; padding: 0 25px 0 0; } </style> <zn-tabs flush primary-caption="Navigation" secondary-caption="content"> <!-- This is the navigation for the first set of tabs --> <zn-navbar slot="top" highlight navigation="[{"title":"John Doe","active":false,"hintText":"Overview","launchMode":"page"}]" dropdown="[{"tab":"2","title":"Some Actions","type":"dropdown"}]"> </zn-navbar> <!-- This is the content of the first tab / default --> <zn-tabs flush primary-caption="Navigation" secondary-caption="Content"> <!-- This is the Navigation/Header for the Inner set of tabs --> <zn-header slot="top" caption="Customer" description="My Awesome Customer" navigation="[{"title":"Overview"}, {"title":"Details", "tab":"details"}]"> </zn-header> <!--This is the content of the first tab / default inside the first tab --> <div> <!-- This is where your page content would be defined --> <zn-sp> <zn-panel caption="Something">Data Points</zn-panel> <zn-panel caption="Another Thing">Other Points</zn-panel> </zn-sp> </div> <!--This is the content of the second tab inside the first tab --> <div id="details"> <!-- This is where your page content would be defined --> <zn-sp> <zn-panel caption="Awesome">this is an example of the details tab</zn-panel> </zn-sp> </div> </zn-tabs> <!-- This is the content of the second tab --> <div id="2"> <zn-pane> <zn-header slot="top" caption="Customer" description="My Awesome Customer" navigation="[{"title":"Overview"}, {"title":"Details", "tab":"details"}]"> </zn-header> <!-- This is where your page content would be defined --> <zn-sp> <!-- Maybe zn-sp should be defaulted into the content? --> <zn-panel caption="Number 2">Something Something Darkside</zn-panel> </zn-sp> </zn-pane> </div> </zn-tabs>