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

@3mo/fetchable-dialog

v0.2.1

Published

A web component for dialogs that fetch their content and stay in a loading state until it arrives.

Readme

Fetchable Dialog

A web component for dialogs that fetch their content and stay in a loading state until it arrives.

npm

A dialog that fetches what it shows and stays in its loading state until it arrives.

Installation

npm install @3mo/fetchable-dialog
import '@3mo/fetchable-dialog'

API

mo-fetchable-dialog

Properties

| Name | Attribute | Type | Default | Description | | --- | --- | --- | --- | --- | | fetch | fetch | () => T \| Promise<T> | | Fetches what the dialog shows, again whenever it is replaced. | | loading | loading | boolean | false | Whether the dialog is loading, which blurs the content and shows the loading slot. | | loadingHeading | loadingHeading | string | "t('Loading')" | The heading while loading, followed by an ellipsis; "Loading" by default. | | size | size | DialogSize \| undefined | | small, medium or large. Without one, the dialog fits its content. | | blocking | blocking | boolean | false | Hides the close button and ignores Escape and the backdrop, so that only an action closes the dialog. | | primaryButtonText | primaryButtonText | string \| undefined | | The text of the default primary button. | | secondaryButtonText | secondaryButtonText | string \| undefined | | The text of the default secondary button. | | open | open | boolean | false | Whether the dialog is open. | | handleAction | | (key: DialogActionKey) => void \| Promise<void> | | Called with the action taken: primary, secondary or cancellation. A dialog component sets it; without one, the dialog closes itself. | | primaryOnEnter | primaryOnEnter | boolean | false | Runs the primary action when Enter is pressed. | | manualClose | manualClose | boolean | false | Keeps the dialog open after its primary and secondary actions, leaving the closing to them. | | heading | heading | string | "" | The heading in the header. |

Events

| Name | Detail | Description | | --- | --- | --- | | openChange | boolean | Dispatched with the new state whenever the dialog opens or closes. | | pageHeadingChange | string | Dispatched when the dialog heading changes | | requestPopup | void | Dispatched when the dialog is requested to be popped up | | scroll | | |

Slots

| Name | Description | | --- | --- | | loading | Shown over the content while loading, a circular progress by default. | | (default) | Content of the dialog | | primaryAction | Primary action of the dialog | | secondaryAction | Secondary action of the dialog | | action | Additional actions of the dialog which are displayed in the header | | footer | Footer of the dialog |

CSS custom properties

| Name | Description | | --- | --- | | --mo-dialog-heading-color | Color of the dialog heading | | --mo-dialog-content-color | Color of the dialog content | | --mo-dialog-backdrop | Background of the dialog backdrop | | --mo-dialog-divider-color | Color of the dialog divider | | --mo-dialog-heading-line-height | Line height of the dialog heading |

CSS parts

| Name | Description | | --- | --- | | loading | The container of the loading slot, laid over the content. | | dialog | The native dialog element. | | header | The header, holding the heading and the header actions. | | heading | Dialog heading | | content | Dialog content | | footer | The footer, holding the actions and the footer slot. |

Links

License

MIT © 3MO GmbH