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 🙏

© 2024 – Pkg Stats / Ryan Hefner

happymodals

v1.1.2

Published

Happy Modals - Create accessible modals with a stress-free developer experience.

Downloads

3

Readme

Happy Modals · GitHub license npm version

Happy Modals allows developers a stress-free experience of implementing modals (aka dialogs).

  • Barebones: Almost no pre-applied styling; you control how your modals look and feel.
  • Accessibility: Manually tested on all major devices against all major browser engines and major assistant technologies.
  • Dumb-Simple: Can't imagine anything simpler than this package, jump to example code.

Learn how to use Happy Modals.

Lite vs Standard version

The lite version has the most barebone features with the easiest setup and developer experience. Lite version is written in vanilla JavaScript. All versions include

  • custom modal backdrop
  • custom open/close buttons
  • automatic scroll-lock
  • automatic backdrop/close buttons

Unlike the lite version, the standard version exposes granular controls over the modal, as well as more features. The only requirement being that you are using one of the compatible frameworks. Standard version is currently only available for Svelte.

  • dynamically render/import components
  • lifecycle hooks (before/after open/close)
  • exposes close function
  • fixed position and sticky position

Installation

There is nothing out there (..yet) that gets any easier than this.

Example Code

The bare-minimum required to get a modal up and running.

Simple Lite Version

<div class="modal-open"/> 
<div role="dialog"/>

Simple Standard Version

for Svelte
<Modal>
    <div slot="button"/>
    <div slot="modal"/>
</Modal>

See live examples at: https://happymodals.com/docs/examples.

Documentation

Start now at happymodals.com/docs!

There are two different versions of Happy Modals, a lite version and a standard version. You can access any version of the documentation by the "version" toggle on the upper-right-hand corner of the website.

The documentation for each version is divided into 3 sections:

You can improve it by sending pull requests to the same repository.

Contributing

Open to proposals with crazy changes, expect lengthy discussions. This is a relatively small project, so there are currently no strict templates and rules.

Just use the following keywords for their respective changes:

  • [DOCS]
  • [PATCH]
  • [UPDATE]
  • [BREAKING]

Note that official npm releases abide by semantic versioning, see changelog for the complete record.

Code of Conduct

Happy Modals has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

License

Happy Modals is Apache 2.0 licensed.