Back to Modal-guidelines

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

Modals communicate information via a secondary window and allow the user to maintain the context of a particular task.

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/modal@14.0.0

Table of Contents

Edit this section, Opens in new window

Usage

Markup

<div class="if backdrop"></div>
<div
  aria-modal="true"
  role="dialog"
  aria-labelledby="modal-title"
  aria-describedby="modal-description"
  class="if modal"
>
  <div class="if title" id="modal-title">
    Title<button type="button" class="if close" aria-label="Close modal"></button>
  </div>
  <span class="if axe sr-only" id="modal-description">This is a modal that..</span>
  <div class="if content">
    <p class="if">
      Yeah, but John, if The Pirates of the Caribbean breaks down, the pirates donโ€™t eat the tourists. God creates
      dinosaurs. God destroys dinosaurs. God creates Man. Man destroys God. Man creates Dinosaurs. What do they got in
      there? King Kong? Forget the fat lady! You're obsessed with the fat lady! Drive us out of here!
    </p>

    <p class="if">
      Hey, you know how I'm, like, always trying to save the planet? Here's my chance. They're using our own satellites
      against us. And the clock is ticking. God help us, we're in the hands of engineers. They're using our own
      satellites against us. And the clock is ticking.
    </p>
    <a class="if external-link" target="_blank" rel="noopener noreferrer" href="https://google.com">An external link</a>
    <a class="if external-link" target="_blank" rel="noopener noreferrer" href="https://google.com">An external link</a>
  </div>
</div>

Dialog

<div class="if backdrop"></div>
<div
  aria-modal="true"
  role="dialog"
  aria-labelledby="modal-title"
  aria-describedby="modal-description"
  class="if modal"
>
  <div class="if title" id="dialog-title">
    Title
  </div>
  <span class="if axe sr-only" id="dialog-description">This is a dialog that..</span>
  <div class="if content">
    <p class="if">
      Yeah, but John, if The Pirates of the Caribbean breaks down, the pirates donโ€™t eat the tourists. God creates
      dinosaurs. God destroys dinosaurs. God creates Man. Man destroys God. Man creates Dinosaurs. What do they got in
      there? King Kong? Forget the fat lady! You're obsessed with the fat lady! Drive us out of here!
    </p>

    <p class="if">
      Hey, you know how I'm, like, always trying to save the planet? Here's my chance. They're using our own satellites
      against us. And the clock is ticking. God help us, we're in the hands of engineers. They're using our own
      satellites against us. And the clock is ticking.
    </p>
  </div>
  <div class="if footer">
    <button id="cancelButton" type="button" class="if button">Cancel</button>
    <button id="confirmButton" type="button" class="if button primary">Yes</button>
  </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)

chore

  • ๐Ÿค– Rename util to utils (f78721f)

Code Refactoring

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

Documentation

  • โœ๏ธ Split out CSS, JS and Webcomponent documentation (6ce90c9), closes #467386
  • โœ๏ธ 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!
  • ๐Ÿงจ JS and Webcomponent for Dialogs and Modals are now in separate packages

in scopes @ids-js and @ids-wc

13.11.0 (2021-10-19)

Features

  • ๐ŸŽธ Input field hot reload (eac76b7)

13.6.3 (2021-09-17)

Bug Fixes

12.13.1 (2021-08-11)

Bug Fixes

  • ๐Ÿ› Whitelist docs dir for npm packaging (1a5cfd0), closes #457621

12.13.0 (2021-08-11)

Bug Fixes

  • ๐Ÿ› Make sure overlays and modals has correct zindexes (828b572), closes #454896

Features

  • ๐ŸŽธ Add scroll-lock support in js implementatione example (8e9d5c9), closes #454896

12.8.0 (2021-06-03)

Features

  • ๐ŸŽธ Add modal webcomponent (405b078)
  • ๐ŸŽธ Add webcomponent focus styling for button (0db8d6e)

12.7.7 (2021-06-02)

Bug Fixes

  • ๐Ÿ› Use correct name for modal footer (04d0333), closes #427920

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

  • ๐Ÿ› Update references (c08f107)

Code Refactoring

  • ๐Ÿ’ก Remove Teasers, added Text and Lifestyle cards (1247479), closes #336508
  • ๐Ÿ’ก Rename and consolidate mixins (67cf470), closes #268081
  • ๐Ÿ’ก Rename Footer to Global Footer (7cb7239), closes #336508

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

  • ๐Ÿงจ This extracts the Hero variation with no image into a separate, design

updated component named Header

  • ๐Ÿงจ Footer is now renamed to Global Footer

9.3.2 (2021-02-12)

Bug Fixes

  • ๐Ÿ› Modal size corresponding to visible viewport (1c6350b), closes #339022

7.8.0 (2020-11-30)

Bug Fixes

  • ๐Ÿ› Use scoped kbd tags (89dd3f6)

7.1.0 (2020-11-16)

Features

  • ๐ŸŽธ Add support for auto generation of components index (9444600), closes #309650

6.43.0 (2020-10-27)

Features

  • ๐ŸŽธ Add preliminary styles for guide modal (b2a9f07)

6.34.0 (2020-09-29)

Features

  • ๐ŸŽธ Add initial support for a drawer modal (9030336)

6.27.0 (2020-08-27)

Bug Fixes

  • ๐Ÿ› Make wider modal cover screen below 960px (fc76701), closes #271819

6.24.0 (2020-07-06)

Bug Fixes

  • ๐Ÿ› Fix z-index issues and normalize them (5ab3dbb)

6.22.0 (2020-07-01)

Features

  • ๐ŸŽธ Add new color categories, update documentation (5496822)

6.21.11 (2020-06-16)

Bug Fixes

  • ๐Ÿ› Fix modal layout and add demos (6a28031)

6.11.0 (2020-04-22)

Bug Fixes

  • ๐Ÿ› Add sr only text for footer logo link (2971dd9)

6.5.4 (2020-04-08)

Bug Fixes

6.4.2 (2020-04-03)

Bug Fixes

  • ๐Ÿ› Remove misuse of unset, none, auto and initial (87624d7)

5.0.1-alpha.160 (2020-03-12)

Reverts

  • Revert "chore: lerna bootstrap" (006ac4a)

5.0.1-alpha.150 (2020-03-05)

Bug Fixes

  • ๐Ÿ› Add new padding mixin to modal (3f501b5)
  • ๐Ÿ› Adjusting components to baseline grid (5a53cd9)

5.0.1-alpha.144 (2020-02-26)

Features

  • ๐ŸŽธ Add wider modal (f75050e)

5.0.1-alpha.138 (2020-02-26)

Bug Fixes

  • starting to fix cookie settings modal (7911b61)

5.0.1-alpha.133 (2020-02-24)

Features

  • ๐ŸŽธ Add preprocessor files to modal (551ca91)

5.0.1-alpha.131 (2020-02-23)

Bug Fixes

  • ๐Ÿ› Adjust design of modal, add specificity to footer (fc9835f)

5.0.1-alpha.120 (2020-02-17)

Bug Fixes

  • ๐Ÿ› Imports and usage of extend (f22b281)

5.0.1-alpha.105 (2020-01-13)

Bug Fixes

Bug Fixes

12.13.1 (2021-08-11)

Bug Fixes

  • ๐Ÿ› Whitelist docs dir for npm packaging (1a5cfd0), closes #457621

12.13.0 (2021-08-11)

Bug Fixes

  • ๐Ÿ› Make sure overlays and modals has correct zindexes (828b572), closes #454896

Features

  • ๐ŸŽธ Add scroll-lock support in js implementatione example (8e9d5c9), closes #454896

12.8.0 (2021-06-03)

Features

  • ๐ŸŽธ Add modal webcomponent (405b078)
  • ๐ŸŽธ Add webcomponent focus styling for button (0db8d6e)

12.7.7 (2021-06-02)

Bug Fixes

  • ๐Ÿ› Use correct name for modal footer (04d0333), closes #427920

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

  • ๐Ÿ› Update references (c08f107)

Code Refactoring

  • ๐Ÿ’ก Remove Teasers, added Text and Lifestyle cards (1247479), closes #336508
  • ๐Ÿ’ก Rename and consolidate mixins (67cf470), closes #268081
  • ๐Ÿ’ก Rename Footer to Global Footer (7cb7239), closes #336508

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

  • ๐Ÿงจ This extracts the Hero variation with no image into a separate, design

updated component named Header

  • ๐Ÿงจ Footer is now renamed to Global Footer

9.3.2 (2021-02-12)

Bug Fixes

  • ๐Ÿ› Modal size corresponding to visible viewport (1c6350b), closes #339022

7.8.0 (2020-11-30)

Bug Fixes

  • ๐Ÿ› Use scoped kbd tags (89dd3f6)

7.1.0 (2020-11-16)

Features

  • ๐ŸŽธ Add support for auto generation of components index (9444600), closes #309650

6.43.0 (2020-10-27)

Features

  • ๐ŸŽธ Add preliminary styles for guide modal (b2a9f07)

6.34.0 (2020-09-29)

Features

  • ๐ŸŽธ Add initial support for a drawer modal (9030336)

6.27.0 (2020-08-27)

Bug Fixes

  • ๐Ÿ› Make wider modal cover screen below 960px (fc76701), closes #271819

6.24.0 (2020-07-06)

Bug Fixes

  • ๐Ÿ› Fix z-index issues and normalize them (5ab3dbb)

6.22.0 (2020-07-01)

Features

  • ๐ŸŽธ Add new color categories, update documentation (5496822)

6.21.11 (2020-06-16)

Bug Fixes

  • ๐Ÿ› Fix modal layout and add demos (6a28031)

6.11.0 (2020-04-22)

Bug Fixes

  • ๐Ÿ› Add sr only text for footer logo link (2971dd9)

6.5.4 (2020-04-08)

Bug Fixes

6.4.2 (2020-04-03)

Bug Fixes

  • ๐Ÿ› Remove misuse of unset, none, auto and initial (87624d7)

5.0.1-alpha.160 (2020-03-12)

Reverts

  • Revert "chore: lerna bootstrap" (006ac4a)

5.0.1-alpha.150 (2020-03-05)

Bug Fixes

  • ๐Ÿ› Add new padding mixin to modal (3f501b5)
  • ๐Ÿ› Adjusting components to baseline grid (5a53cd9)

5.0.1-alpha.144 (2020-02-26)

Features

  • ๐ŸŽธ Add wider modal (f75050e)

5.0.1-alpha.138 (2020-02-26)

Bug Fixes

  • starting to fix cookie settings modal (7911b61)

5.0.1-alpha.133 (2020-02-24)

Features

  • ๐ŸŽธ Add preprocessor files to modal (551ca91)

5.0.1-alpha.131 (2020-02-23)

Bug Fixes

  • ๐Ÿ› Adjust design of modal, add specificity to footer (fc9835f)

5.0.1-alpha.120 (2020-02-17)

Bug Fixes

  • ๐Ÿ› Imports and usage of extend (f22b281)

5.0.1-alpha.105 (2020-01-13)

Bug Fixes

5.0.1-alpha.67 (2019-11-26)

Bug Fixes

  • ๐Ÿ› Use package-based imports (6822233)

5.0.1-alpha.61 (2019-11-22)

Features

  • ๐ŸŽธ Add mixins for icons (f2f3420)

5.0.1-alpha.58 (2019-11-22)

Features

  • ๐ŸŽธ Remove normalize.css (2c23c2b)

5.0.1-alpha.40 (2019-11-05)

Bug Fixes

  • ๐Ÿ› Fix typography based on latest sketches (2653b61)

5.0.1-alpha.38 (2019-11-04)

Bug Fixes

  • ๐Ÿ› Update styling and adjust documentaiton (e379009)

5.0.1-alpha.37 (2019-11-01)

Features

Edit this section, Opens in new window
Contact us, Opens in new window