Documentation

Search value is required

Illustration Tabs

The tabs component is used to show a variety of related information on a single page, whilst keeping the page volume small.

Usage


Place the tabs on a page, add the JavaScript support class slb-show, to have a user start on a tab item.

Use any of the illustrations provided with the illustration tabs, adding a class to the SVG slb-tabs__tab-illustration.

Alternatively the tab item and panel can be left without one to not direct users down a certain tab.

Each click-able tab should be set to slb-show with its relevant panel, by default the tab panels are not visible until the JavaScript support class of slb-show is added.

Use with the slb-fade transition class to get a fade effect on each clickable tab

Accessible attributes


Accessible attribute Description
role="tablist" Indicates that the element serves as a container for a set of tabs.
aria-label="DESCRIPTION" Provides a label on the same level as the role tablist, that describes the purpose of the set of tabs.
role="tab" Indicates the element serves as a tab control on each clickable tab.
aria-selected="true" Indicates the element serves as a tab control on each clickable tab is active when true, and inactive when false.
aria-controls="IDREF" Refers to the tabpanel element associated with each clickable tab.
role="tabpanel" Indicates the element serves as a container for tab panel content.
aria-labelledby="IDREF" Refers to the tab element that controls each panel.
aria-hidden="true" Indicates whether the panel is visible, set to true for the active panel and false for inactive panels.

Modifier selectors


Modifier selector Description
slb-tabs__panel--border Adding to each tab panel to give a border around the panel content.

JavaScript Support


JavaScript Support class name Description
slb-show Place on the clickable tab to show in an active state and place on the relevant tab panel to display the panel content.
.slb-tabs__panel - Default tabs component without a border.

Tab One

Et et consectetur ipsum labore excepteur est proident excepteur ad velit occaecat qui minim occaecat veniam. Fugiat veniam incididunt anim aliqua enim pariatur veniam sunt est aute sit dolor anim.

Velit non irure adipisicing aliqua ullamco irure incididunt irure non esse consectetur nostrud minim non minim occaecat. Amet duis do nisi duis veniam non est eiusmod tempor incididunt tempor dolor ipsum in qui sit. Exercitation mollit sit culpa nisi culpa non adipisicing reprehenderit do dolore. Duis reprehenderit occaecat anim ullamco ad duis occaecat ex.

.slb-tabs__panel--border - Tabs component with a border.

Tab One

Et et consectetur ipsum labore excepteur est proident excepteur ad velit occaecat qui minim occaecat veniam. Fugiat veniam incididunt anim aliqua enim pariatur veniam sunt est aute sit dolor anim.

Velit non irure adipisicing aliqua ullamco irure incididunt irure non esse consectetur nostrud minim non minim occaecat. Amet duis do nisi duis veniam non est eiusmod tempor incididunt tempor dolor ipsum in qui sit. Exercitation mollit sit culpa nisi culpa non adipisicing reprehenderit do dolore. Duis reprehenderit occaecat anim ullamco ad duis occaecat ex.

Markup: tabs\illustration-tabs.hbs Copy

<div class="slb-tabs">
    <ul class="slb-tabs__tab slb-tabs__tab--illustration" role="tablist" aria-label="Example tabs">
        <li class="slb-tabs__tab-item">
            <a id="[modifier class]-one-tab" class="slb-tabs__tab-link slb-show" href="#[modifier class]-one" role="tab" aria-controls="[modifier class]-one" aria-selected="true">
                <svg class="slb-illustration slb-tabs__tab-illustration" width="100" height="100" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="none" fill-rule="evenodd"><path class="illustration-main" fill="#0A2F73" d="M2.727 97.256h79.955V51.347H2.727v45.91zm81.318 2.728H1.364A1.364 1.364 0 0 1 0 98.62V49.984c0-.754.61-1.364 1.364-1.364h82.681c.753 0 1.364.61 1.364 1.364V98.62c0 .753-.61 1.364-1.364 1.364zM17.211 89.96h50.988a8.677 8.677 0 0 1 7.187-7.188V65.831a8.678 8.678 0 0 1-7.187-7.188H17.21a8.68 8.68 0 0 1-7.189 7.188v16.942a8.68 8.68 0 0 1 7.189 7.188m52.244 2.727h-53.5a1.364 1.364 0 0 1-1.364-1.364c0-3.27-2.661-5.93-5.932-5.93a1.365 1.365 0 0 1-1.364-1.364V64.574c0-.753.611-1.363 1.364-1.363a5.939 5.939 0 0 0 5.932-5.931c0-.753.61-1.364 1.363-1.364h53.501c.753 0 1.364.61 1.364 1.364 0 3.27 2.66 5.93 5.93 5.93.753 0 1.364.611 1.364 1.364V84.03c0 .752-.61 1.363-1.363 1.363a5.938 5.938 0 0 0-5.931 5.931c0 .753-.611 1.364-1.364 1.364zM88.89 46.484a1.366 1.366 0 0 1-.965-2.328l8.764-8.763L64.573 3.275l-42.808 42.81a1.365 1.365 0 0 1-1.928-1.93L63.608.384c.512-.512 1.418-.512 1.93 0l34.045 34.045a1.362 1.362 0 0 1 0 1.928l-9.727 9.727a1.36 1.36 0 0 1-.965.4zm-9.773 0a1.363 1.363 0 0 1-.958-2.334l2.816-2.781c-2.197-3.278-2.195-8.683.004-11.96L70.556 18.987c-3.278 2.2-8.688 2.2-11.966 0L31.492 46.084a1.365 1.365 0 0 1-1.928-1.929L57.529 16.19a1.363 1.363 0 0 1 1.929 0c1.087 1.088 3 1.737 5.115 1.737s4.028-.649 5.115-1.737a1.363 1.363 0 0 1 1.929 0l12.159 12.159a1.363 1.363 0 0 1 0 1.928c-2.294 2.295-2.294 7.937 0 10.231a1.366 1.366 0 0 1-.007 1.935l-3.692 3.647a1.357 1.357 0 0 1-.959.394z"/><path class="illustration-highlight" fill="#147CB3" d="M43.012 46.484a1.364 1.364 0 0 1-1.322-1.705 11.086 11.086 0 0 1 10.742-8.318c5.063 0 9.48 3.42 10.74 8.318a1.36 1.36 0 0 1-.98 1.66 1.365 1.365 0 0 1-1.66-.98 8.36 8.36 0 0 0-8.1-6.27 8.357 8.357 0 0 0-8.1 6.271 1.366 1.366 0 0 1-1.32 1.024m-.307 19.454c-4.612 0-8.364 3.752-8.364 8.364 0 4.611 3.752 8.363 8.364 8.363 4.611 0 8.363-3.752 8.363-8.363 0-4.612-3.752-8.364-8.363-8.364m0 19.455c-6.116 0-11.091-4.975-11.091-11.091s4.975-11.091 11.09-11.091c6.116 0 11.092 4.975 11.092 11.09 0 6.117-4.976 11.092-11.091 11.092"/></g></svg>
                Tab One
            </a>
        </li>
            <li class="slb-tabs__tab-item">
            <a id="[modifier class]-two-tab"  class="slb-tabs__tab-link" href="#[modifier class]-two" role="tab" aria-controls="[modifier class]-two" aria-selected="false">
                <svg class="slb-illustration slb-tabs__tab-illustration" width="100" height="100" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="none" fill-rule="evenodd"><path class="illustration-main" fill="#0A2F73" d="M69.455 92.704c-9.541 0-18.01-5.723-21.573-14.579a1.363 1.363 0 1 1 2.53-1.017c3.147 7.817 10.62 12.869 19.043 12.869 11.315 0 20.522-9.206 20.522-20.522 0-8.423-5.051-15.897-12.87-19.043a1.364 1.364 0 1 1 1.018-2.53c8.856 3.564 14.579 12.032 14.579 21.573 0 12.82-10.43 23.25-23.25 23.25zm0 7.296c-13.016 0-24.62-8.266-28.871-20.57a1.364 1.364 0 0 1 2.578-.89 27.832 27.832 0 0 0 26.293 18.733c15.339 0 27.818-12.48 27.818-27.818A27.83 27.83 0 0 0 78.54 43.163a1.364 1.364 0 0 1 .892-2.578c12.303 4.25 20.57 15.852 20.57 28.87C100 86.298 86.297 100 69.454 100zM37.84 2.727c-19.362 0-35.114 15.752-35.114 35.114 0 19.362 15.752 35.114 35.114 35.114 19.362 0 35.114-15.752 35.114-35.114 0-19.362-15.752-35.114-35.114-35.114m0 72.955C16.975 75.682 0 58.706 0 37.84 0 16.975 16.975 0 37.84 0c20.866 0 37.842 16.975 37.842 37.84 0 20.866-16.976 37.842-37.841 37.842"/><path class="illustration-highlight" fill="#147CB3" d="M37.84 10.023c-15.338 0-27.817 12.479-27.817 27.818 0 15.339 12.479 27.818 27.818 27.818 15.339 0 27.818-12.48 27.818-27.818 0-15.34-12.479-27.818-27.818-27.818m-8.66 29.182v9.431h-3.499a1.364 1.364 0 1 0 0 2.728h21.886a1.364 1.364 0 1 0 0-2.728H31.91v-9.431h8.364a1.364 1.364 0 1 0 0-2.728H31.91v-5.932a5.938 5.938 0 0 1 5.932-5.931c3.27 0 5.932 2.66 5.932 5.931a1.363 1.363 0 1 0 2.727 0c0-4.774-3.884-8.659-8.659-8.659s-8.66 3.885-8.66 8.66v5.931h-3.5a1.364 1.364 0 1 0 0 2.728h3.5zm8.66 29.181c-16.843 0-30.546-13.702-30.546-30.545 0-16.843 13.703-30.546 30.546-30.546s30.545 13.703 30.545 30.546-13.702 30.545-30.545 30.545z"/></g></svg>
                Tab Two
            </a>
        </li>
        <li class="slb-tabs__tab-item">
            <a id="[modifier class]-three-tab"  class="slb-tabs__tab-link" href="#[modifier class]-three" role="tab" aria-controls="[modifier class]-three" aria-selected="false">
                <svg class="slb-illustration slb-tabs__tab-illustration" width="100" height="100" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path class="illustration-main" fill="#0A2F73" d="M187.546 51.455c-3.86 0-7.002-3.14-7.002-7s3.142-7 7.002-7 7 3.14 7 7-3.14 7-7 7zm-55.638 19.509h23.727V47.182h-23.727v23.782zm0 29.127h23.727V76.418h-23.727v23.673zm0 29.182h23.727v-23.728h-23.727v23.728zm0 29.183h23.727v-23.729h-23.727v23.73zm-29.184-87.492h23.73V47.182h-23.73v23.782zm0 29.127h23.73V76.418h-23.73v23.673zm0 29.182h23.73v-23.728h-23.73v23.728zm0 29.183h23.73v-23.729h-23.73v23.73zM73.542 70.964h23.73V47.182h-23.73v23.782zm0 29.127h23.73V76.418h-23.73v23.673zm0 29.182h23.73v-23.728h-23.73v23.728zm0 29.183h23.73v-23.729h-23.73v23.73zM44.36 70.964h23.728V47.182H44.36v23.782zm0 29.127h23.728V76.418H44.36v23.673zm0 29.182h23.728v-23.728H44.36v23.728zm0 29.183h23.728v-23.729H44.36v23.73zM12.455 51.455c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7zM187.545 32c-5.93 0-10.896 4.17-12.145 9.727H24.6C23.35 36.17 18.384 32 12.455 32 5.585 32 0 37.587 0 44.455c0 6.867 5.586 12.454 12.455 12.454 5.929 0 10.896-4.167 12.144-9.727h14.307v148.045a2.727 2.727 0 1 0 5.454 0v-31.316h23.728v31.316a2.727 2.727 0 1 0 5.454 0v-31.316h23.73v31.316a2.727 2.727 0 1 0 5.454 0v-31.316h23.727v31.316a2.728 2.728 0 0 0 5.455 0v-31.316h23.727v31.316a2.728 2.728 0 0 0 5.454 0V47.182H175.4c1.25 5.56 6.215 9.727 12.146 9.727 6.867 0 12.454-5.587 12.454-12.454C200 37.587 194.413 32 187.546 32z"/><path class="illustration-highlight" fill="#147CB3" d="M19.455 122.273V132c0 3.86-3.14 7-7 7s-7-3.14-7-7v-9.727a7.009 7.009 0 0 1 4.272-6.445v1.581a2.727 2.727 0 1 0 5.455 0v-1.581a7.009 7.009 0 0 1 4.273 6.445m-14-34.045V78.5a7.009 7.009 0 0 1 4.272-6.445v1.636a2.727 2.727 0 1 0 5.455 0v-1.636a7.009 7.009 0 0 1 4.273 6.445v9.728a7.009 7.009 0 0 1-4.273 6.445v-1.582a2.727 2.727 0 1 0-5.455 0v1.582a7.009 7.009 0 0 1-4.272-6.445m19.454 0V78.5c0-5.929-4.169-10.896-9.727-12.143V49.319a2.726 2.726 0 0 0-2.727-2.728 2.726 2.726 0 0 0-2.728 2.728v17.038C4.17 67.604 0 72.57 0 78.5v9.728c0 5.93 4.17 10.896 9.727 12.143v9.758C4.17 111.38 0 116.342 0 122.273V132c0 6.868 5.587 12.455 12.455 12.455 6.867 0 12.454-5.587 12.454-12.455v-9.727c0-5.93-4.169-10.894-9.727-12.144v-9.758c5.558-1.247 9.727-6.212 9.727-12.143m169.636 34.045V132c0 3.86-3.14 7-7 7s-7-3.14-7-7v-9.727c0-2.893 1.766-5.38 4.273-6.445v1.581a2.728 2.728 0 0 0 5.454 0v-1.581a7.009 7.009 0 0 1 4.273 6.445m-14-34.045V78.5c0-2.892 1.766-5.38 4.273-6.445v1.636a2.728 2.728 0 0 0 5.454 0v-1.636a7.009 7.009 0 0 1 4.273 6.445v9.728a7.009 7.009 0 0 1-4.273 6.445v-1.582a2.727 2.727 0 1 0-5.454 0v1.582c-2.507-1.065-4.273-3.553-4.273-6.445m19.455 0V78.5c0-5.929-4.168-10.896-9.728-12.143V49.319a2.727 2.727 0 1 0-5.455 0v17.038c-5.557 1.247-9.726 6.214-9.726 12.143v9.728c0 5.93 4.169 10.896 9.727 12.143v9.758c-5.558 1.25-9.727 6.213-9.727 12.144V132c0 6.868 5.587 12.455 12.454 12.455 6.87 0 12.455-5.587 12.455-12.455v-9.727c0-5.93-4.168-10.894-9.728-12.144v-9.758c5.56-1.247 9.728-6.212 9.728-12.143"/></g></svg>
                Tab Three
            </a>
        </li>
    </ul>
    <div class="slb-tabs__content">
        <div id="[modifier class]-one" class="slb-tabs__panel [modifier class] slb-fade slb-show" role="tabpanel" aria-labelledby="[modifier class]-one-tab" aria-hidden="false">
            <h2>
                Tab One
            </h2>
            <p>
                Et et consectetur ipsum labore excepteur est proident excepteur ad velit occaecat qui minim occaecat veniam. Fugiat veniam incididunt anim aliqua enim pariatur veniam sunt est aute sit dolor anim.
            </p>
            <p>
                Velit non irure adipisicing aliqua ullamco irure incididunt irure non esse consectetur nostrud minim non minim occaecat. Amet duis do nisi duis veniam non est eiusmod tempor incididunt tempor dolor ipsum in qui sit. Exercitation mollit sit culpa nisi culpa non adipisicing reprehenderit do dolore. Duis reprehenderit occaecat anim ullamco ad duis occaecat ex.
            </p>
        </div>
        <div id="[modifier class]-two" class="slb-tabs__panel [modifier class] slb-fade" role="tabpanel" aria-labelledby="[modifier class]-two-tab" aria-hidden="true">
            <h2>
                Tab Two
            </h2>
            <p>
                Velit non irure adipisicing aliqua ullamco irure incididunt irure non esse consectetur nostrud minim non minim occaecat. Amet duis do nisi duis veniam non est eiusmod tempor incididunt tempor dolor ipsum in qui sit. Exercitation mollit sit culpa nisi culpa non adipisicing reprehenderit do dolore. Duis reprehenderit occaecat anim ullamco ad duis occaecat ex.
            </p>
            <p>
                Et et consectetur ipsum labore excepteur est proident excepteur ad velit occaecat qui minim occaecat veniam. Fugiat veniam incididunt anim aliqua enim pariatur veniam sunt est aute sit dolor anim.
            </p>
        </div>
        <div id="[modifier class]-three" class="slb-tabs__panel [modifier class] slb-fade" role="tabpanel" aria-labelledby="[modifier class]-three-tab" aria-hidden="true">
            <h2>
                Tab Three
            </h2>
            <p>
                Velit non irure adipisicing aliqua ullamco irure incididunt irure non esse consectetur nostrud minim non minim occaecat. Amet duis do nisi duis veniam non est eiusmod tempor incididunt tempor dolor ipsum in qui sit. Exercitation mollit sit culpa nisi culpa non adipisicing reprehenderit do dolore. Duis reprehenderit occaecat anim ullamco ad duis occaecat ex.
            </p>
            <p>
                Et et consectetur ipsum labore excepteur est proident excepteur ad velit occaecat qui minim occaecat veniam. Fugiat veniam incididunt anim aliqua enim pariatur veniam sunt est aute sit dolor anim.
            </p>
        </div>
    </div>
</div>
Source: components/_tabs.scss