npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@royallondon/design-system-component-modal

v2.3.0

Published

Royal London Design System - Modal package

Readme

Installation

Install the Modal package from npm

npm install @royallondon/design-system-component-modal

Import the required CSS file

@import '@royallondon/design-system-component-modal/dist/modal';

Import the required JS file, add the html and modal trigger element then initalise the modal function

import { createModal } from '@royallondon/design-system-component-modal/dist/modal';

const innerHTML = `<div class="rl-c-modal-content" id="modal-content" >
<div id="modal-heading" class="rl-c-modal-heading">
<h2 class="rl-t-title-large">Are you sure?</h2>
</div>
<button class="rl-c-modal-close rl-c-modal-close--primary" aria-label="Close">
<svg class="rl-f-icon rl-f-icon--xs" aria-hidden="true">
  <use href="/assets/icons.svg#semantic-danger"></use>
</svg>
</button>
<div class="rl-u__margin--b-6">
<p>The pension plan won't be saved and any information you have provided for this request will be lost.</p>
</div>
<div class="rl-form__row rl-form__row--action">
<button class="rl-c-button--primary">Yes, remove</button>
<button class="rl-c-button--ghost">No, don't remove</button>
</div>
</div>`;
createModal({
  innerHTML,
  modalTriggerElement: element_id | element_classname,
  modalSize: xsmall | small | medium | large,
});

Support

Issues and questions are handled through the Royal London Design System support page.

Licence

@royallondon/design-system-component-modal

This package is published primarily for use in Royal London products. It is made available publicly so that partners and suppliers building Royal London experiences can consume it directly.

Use of this package is subject to the Royal London Authorised Use Licence. See the LICENSE.md file included in this package.

The Modal component for the Royal London Design System. For design guidance, examples and accessibility notes, see the Modal page.

Release log

| Version | Release notes | | ------- | ---------------------------------------------------------------------------------------------------- | | 2.3.0 | Prepare for public npm release: add licence, publish dist only (src removed), remove source maps | | 2.2.5 | Move to new feed | | 2.2.0 | Apply new icons and latest tokens added to foundations | | 2.1.1 | Fix spacing between elements and improve responsive experience | | 2.1.0 | Update foundations dependency version to ensure new tokens | | 2.0.1 | Fix issue with media query processing without postcss | | 2.0.0 | Upgrade for compatibility with foundations v2 | | 1.0.0 | Initial release of modal component |