Back to Disclosure Card-guidelines

JavaScriptThe latest version of this package is: 0.17.4, Opens in new window

JavaScript library for the Disclosure Card Component

This component is compatible with ESM (ES6 module) and IIFE. See documentation examples below.

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

$ npm i @ids-js/disclosure-card@0.17.4

Table of Contents

Usage

<ul class="if cards disclosures" role="presentation">
  <li class="if" role="presentation">
    <button
      aria-haspopup="true"
      aria-expanded="false"
      aria-controls="expandable-content-16"
      aria-labelledby="expandable-text-16"
      class="if disclosure-card"
      type="button"
    >
      <img class="if image" src="/images/travel.png" />
      <p id="expandable-text-16" class="if text body">Reseforsäkring</p>
      <p class="if expandable text meta">Dölj reseförsäkringar</p>
    </button>
    <div tabindex="-1" id="expandable-content-16" class="if block expandable"></div>
  </li>
  <li class="if" role="presentation"></li>
  <li class="if" role="presentation"></li>
</ul>
<script src="../disclosure-card.iife.js"></script>
<script>
  IDSDisclosureCard.init();
</script>
Contact us, Opens in new window