Back to Tabs-guidelines

CSS ComponentThe latest version of this package is: 14.1.0, Opens in new window

Tabs organize content across different screens, data sets, and other interactions.

This component provides .css, .styl, .less and .scss -files.

To be able to install this component, please refer to the Project Setup documentation.

$ npm i @ids-core/tabs@14.1.0

Name Age Position
John Wicker 38 Hitman
John Wicker 38 Hitman
John Wicker 32 Hitman
Expandable 38 Hitman
John Wicker 38 Hitman

Table of Contents

Edit this section, Opens in new window

Modifiers

Default

Vi minder dig om, at din selvrisiko ikke er blevet betalt. Du kan indbetale beløbet via MobilePay eller via det girokort, vi har sendt dig. Du kan se bort fra denne besked, hvis du netop har betalt.

<div class="if block">
  <div class="if container">
    <div class="if tabs">
      <ul class="if" role="tablist">
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-1" id="tab-tabs-1" role="tab" aria-selected="true">Section 1</a>
        </li>
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-2" id="tab-tabs-2" role="tab" tabindex="-1">Section 2</a>
        </li>
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-3" id="tab-tabs-3" role="tab" tabindex="-1">Section 3</a>
        </li>
      </ul>
      <section aria-labelledby="tab-tabs-1" id="section-tabs-1" class="if tab-panel" role="tabpanel" tabindex="-1">
        <div class="if alert-banner error">
          <p>
            Vi minder dig om, at din selvrisiko ikke er blevet betalt. Du kan indbetale beløbet via MobilePay eller via
            det girokort, vi har sendt dig. Du kan se bort fra denne besked, hvis du netop har betalt.
          </p>
        </div>
      </section>
      <section
        aria-labelledby="tab-tabs-2"
        id="section-tabs-2"
        class="if tab-panel tab-panel--selected"
        role="tabpanel"
        tabindex="-1"
        hidden=""
      >
        <h2 class="if">Section 2</h2>
        <p class="if">
          Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl.
          Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque
          tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam.
          Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.
        </p>
      </section>
      <section
        aria-labelledby="tab-tabs-3"
        id="section-tabs-3"
        class="if tab-panel tab-panel--selected"
        role="tabpanel"
        tabindex="-1"
        hidden=""
      >
        <h2 class="if">Section 3</h2>
        <p class="if">
          Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl.
          Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque
          tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam.
          Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.
        </p>
      </section>
    </div>
  </div>
</div>

Wide

Vi minder dig om, at din selvrisiko ikke er blevet betalt. Du kan indbetale beløbet via MobilePay eller via det girokort, vi har sendt dig. Du kan se bort fra denne besked, hvis du netop har betalt.

<div class="if block">
  <div class="if container">
    <div class="if tabs wide">
      <ul class="if" role="tablist">
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-1" id="tab-tabs-1" role="tab" aria-selected="true">Section 1</a>
        </li>
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-2" id="tab-tabs-2" role="tab" tabindex="-1">Section 2</a>
        </li>
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-3" id="tab-tabs-3" role="tab" tabindex="-1">Section 3</a>
        </li>
      </ul>
      <section aria-labelledby="tab-tabs-1" id="section-tabs-1" class="if tab-panel" role="tabpanel" tabindex="-1">
        <div class="if alert-banner error">
          <p>
            Vi minder dig om, at din selvrisiko ikke er blevet betalt. Du kan indbetale beløbet via MobilePay eller via
            det girokort, vi har sendt dig. Du kan se bort fra denne besked, hvis du netop har betalt.
          </p>
        </div>
      </section>
      <section
        aria-labelledby="tab-tabs-2"
        id="section-tabs-2"
        class="if tab-panel tab-panel--selected"
        role="tabpanel"
        tabindex="-1"
        hidden=""
      >
        <h2 class="if">Section 2</h2>
        <p class="if">
          Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl.
          Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque
          tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam.
          Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.
        </p>
      </section>
      <section
        aria-labelledby="tab-tabs-3"
        id="section-tabs-3"
        class="if tab-panel tab-panel--selected"
        role="tabpanel"
        tabindex="-1"
        hidden=""
      >
        <h2 class="if">Section 3</h2>
        <p class="if">
          Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl.
          Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque
          tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam.
          Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.
        </p>
      </section>
    </div>
  </div>
</div>

Dark

Vi minder dig om, at din selvrisiko ikke er blevet betalt. Du kan indbetale beløbet via MobilePay eller via det girokort, vi har sendt dig. Du kan se bort fra denne besked, hvis du netop har betalt.

<div class="if block">
  <div class="if container">
    <div class="if tabs dark">
      <ul class="if" role="tablist">
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-1" id="tab-tabs-1" role="tab" aria-selected="true">Section 1</a>
        </li>
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-2" id="tab-tabs-2" role="tab" tabindex="-1">Section 2</a>
        </li>
        <li class="if" role="presentation">
          <a class="if" href="#section-tabs-3" id="tab-tabs-3" role="tab" tabindex="-1">Section 3</a>
        </li>
      </ul>
      <section aria-labelledby="tab-tabs-1" id="section-tabs-1" class="if tab-panel" role="tabpanel" tabindex="-1">
        <div class="if alert-banner error">
          <p>
            Vi minder dig om, at din selvrisiko ikke er blevet betalt. Du kan indbetale beløbet via MobilePay eller via
            det girokort, vi har sendt dig. Du kan se bort fra denne besked, hvis du netop har betalt.
          </p>
        </div>
      </section>
      <section
        aria-labelledby="tab-tabs-2"
        id="section-tabs-2"
        class="if tab-panel tab-panel--selected"
        role="tabpanel"
        tabindex="-1"
        hidden=""
      >
        <h2 class="if">Section 2</h2>
        <p class="if">
          Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl.
          Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque
          tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam.
          Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.
        </p>
      </section>
      <section
        aria-labelledby="tab-tabs-3"
        id="section-tabs-3"
        class="if tab-panel tab-panel--selected"
        role="tabpanel"
        tabindex="-1"
        hidden=""
      >
        <h2 class="if">Section 3</h2>
        <p class="if">
          Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl.
          Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque
          tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam.
          Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.
        </p>
      </section>
    </div>
  </div>
</div>
Edit this section, Opens in new window

Truncation

Tab overflow

<div class="if" style="position:relative; ">
  <div class="if dropdown-filter-holder truncated-tabs">
    <button
      type="button"
      aria-controls="behaviours-toolbar-office-filters-1"
      aria-haspopup="true"
      role="combobox"
      aria-owns="behaviours-toolbar-office-filters-1"
      aria-expanded="false"
      class="if dropdown-filter-button"
    >
      <span class="if">Anatomy</span>
    </button>
    <nav class="if dropdown-filter dropdown-menu" role="listbox">
      <ul class="if">
        <li class="if">
          <a href="#" class="if">Tabs</a>
        </li>
        <li class="if">
          <a href="#" class="if">Behaviours</a>
        </li>
        <li class="if">
          <a href="#" class="if is-active">Anatomy</a>
        </li>
        <li class="if">
          <a href="#" class="if">Implementation</a>
        </li>
      </ul>
    </nav>
  </div>
</div>
Edit this section, Opens in new window

Changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

14.0.0 (2021-11-09)

Bug Fixes

chore

  • 🤖 Rename util to utils (f78721f)

Code Refactoring

  • 💡 Rename scope and repository (3ea5423)
  • 💡 Use new navigation structure for documentation (415aee5), closes #490579

Documentation

  • ✏️ Update links and change navigation structure (0bfd27d), closes #490579

BREAKING CHANGES

  • 🧨 The scope for If Design System npm packages has now changed from

@if-design-system to @ids-core. We have also renamed the repository from if-design-system to ids-core

  • 🧨 Util is now renamed to Utils
  • 🧨 We have now changed the navigation structure for the documentation site.

Please update any saved links!

  • 🧨 Navigation structure has now changed. Please see release notes!

13.12.0 (2021-10-22)

Bug Fixes

13.11.0 (2021-10-19)

Features

  • 🎸 Input field hot reload (eac76b7)

13.9.2 (2021-09-30)

Bug Fixes

  • 🐛 Complete the pseudo-element fix (1dcee2c)

13.6.3 (2021-09-17)

Bug Fixes

12.13.1 (2021-08-11)

Bug Fixes

12.6.0 (2021-05-27)

Bug Fixes

  • 🐛 Manually set firstPublished and lastModified (e83af7d)
  • 🐛 We don't need lastModified (e458a12)

12.0.0 (2021-05-05)

Bug Fixes

Code Refactoring

Features

  • 🎸 Rename and extract and update hero with no image to (384eb77), closes #336508

BREAKING CHANGES

  • 🧨 All of the mixins have now been renamed
  • 🧨 Teasers are no more. It has been replaces with Lifestyle Navigational

Card, Text Navigational Card. Studio Teasers is gone, use Studio Navigational Card instead, which is based on the old Studio Crosslinks

  • 🧨 Notification is now renamed to Alert Banner
  • 🧨 This extracts the Hero variation with no image into a separate, design

updated component named Header

  • 🧨 Footer is now renamed to Global Footer

10.0.0 (2021-02-15)

Code Refactoring

  • 💡 Rename form-group to input-wrapper (7ee3bae)

BREAKING CHANGES

  • 🧨 form-group is now renamed to input-wrapper, a more logical name

7.1.0 (2020-11-16)

Features

  • 🎸 Add support for auto generation of components index (9444600), closes #309650

6.36.0 (2020-10-12)

Features

  • 🎸 Add updated focus styling for tabs (890f0a0)

6.28.0 (2020-09-02)

Bug Fixes

  • 🐛 Fix tabs for hero, and fix tab bottom border (a2d814d)

6.27.1 (2020-08-31)

Bug Fixes

  • 🐛 Fix tab horizontal line, and tabs in hero (ecb1287)

6.26.0 (2020-07-13)

Features

  • 🎸 Make tabs more positionable in the general layout (7b2dc8b)

6.17.1 (2020-05-25)

Bug Fixes

  • 🐛 Fix hover bolding increasing container with for tabs titles (6aa4668)

6.16.1 (2020-05-20)

Bug Fixes

  • 🐛 Fix routing for dev server (295db6e)

6.11.2 (2020-04-22)

Bug Fixes

  • 🐛 Clean up the margin/padding mess I made with lists (a107891)

6.11.0 (2020-04-22)

Bug Fixes

  • 🐛 Add sr only text for footer logo link (2971dd9)

5.3.0 (2020-03-18)

Bug Fixes

12.13.1 (2021-08-11)

Bug Fixes

12.6.0 (2021-05-27)

Bug Fixes

  • 🐛 Manually set firstPublished and lastModified (e83af7d)
  • 🐛 We don't need lastModified (e458a12)

12.0.0 (2021-05-05)

Bug Fixes

Code Refactoring

Features

  • 🎸 Rename and extract and update hero with no image to (384eb77), closes #336508

BREAKING CHANGES

  • 🧨 All of the mixins have now been renamed
  • 🧨 Teasers are no more. It has been replaces with Lifestyle Navigational

Card, Text Navigational Card. Studio Teasers is gone, use Studio Navigational Card instead, which is based on the old Studio Crosslinks

  • 🧨 Notification is now renamed to Alert Banner
  • 🧨 This extracts the Hero variation with no image into a separate, design

updated component named Header

  • 🧨 Footer is now renamed to Global Footer

10.0.0 (2021-02-15)

Code Refactoring

  • 💡 Rename form-group to input-wrapper (7ee3bae)

BREAKING CHANGES

  • 🧨 form-group is now renamed to input-wrapper, a more logical name

7.1.0 (2020-11-16)

Features

  • 🎸 Add support for auto generation of components index (9444600), closes #309650

6.36.0 (2020-10-12)

Features

  • 🎸 Add updated focus styling for tabs (890f0a0)

6.28.0 (2020-09-02)

Bug Fixes

  • 🐛 Fix tabs for hero, and fix tab bottom border (a2d814d)

6.27.1 (2020-08-31)

Bug Fixes

  • 🐛 Fix tab horizontal line, and tabs in hero (ecb1287)

6.26.0 (2020-07-13)

Features

  • 🎸 Make tabs more positionable in the general layout (7b2dc8b)

6.17.1 (2020-05-25)

Bug Fixes

  • 🐛 Fix hover bolding increasing container with for tabs titles (6aa4668)

6.16.1 (2020-05-20)

Bug Fixes

  • 🐛 Fix routing for dev server (295db6e)

6.11.2 (2020-04-22)

Bug Fixes

  • 🐛 Clean up the margin/padding mess I made with lists (a107891)

6.11.0 (2020-04-22)

Bug Fixes

  • 🐛 Add sr only text for footer logo link (2971dd9)

5.3.0 (2020-03-18)

Bug Fixes

  • 🐛 Adjust responsive view for tabs (0cc442e)

5.0.1-alpha.164 (2020-03-13)

Features

  • 🎸 Add component tabs (3b6c11b)
  • 🎸 Add new component: Tabs (76646b1)
Edit this section, Opens in new window
Contact us, Opens in new window