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

@htmlbricks/hb-dialog-loader

v0.76.5

Published

Thin wrapper around `hb-dialog` that opens automatically while numeric `percentage` is non-zero and shows a Bootstrap progress bar filled to that value. Forwards `modalShow` from the inner dialog so parents can track open state; slots allow overriding the

Downloads

2,877

Readme

hb-dialog-loader — dialog-loader

Category: overlays | Tags: overlays, modal, loading

What it does

hb-dialog-loader is a thin wrapper around hb-dialog. While percentage is non-zero, the inner dialog is shown (show="yes" on hb-dialog); when percentage is zero, the dialog is hidden (show="no"). The body contains a Bulma <progress class="progress is-primary"> whose value matches the rounded percentage (0–100) and a centered label with the same value. The component re-dispatches modalShow from the inner dialog so the host can track open/close state. The dialog title comes from the title prop or the title slot.

Dependency: hb-dialog (registered by the component build).

Custom element

hb-dialog-loader

Attributes / props (snake_case)

Web component attributes are strings. Use numeric strings for percentage (for example "45"). Booleans elsewhere in the stack follow your host conventions; this component only drives inner visibility from percentage.

| Property | Type | Notes | | --- | --- | --- | | id | string (optional) | Present in the public Component typings; not forwarded to hb-dialog in the current implementation. | | style | string (optional) | Present in typings; the implementation does not currently wire this to the inner dialog (see component.wc.svelte). | | title | string (optional) | Default dialog title when the title slot is empty. Default text in code: loading. | | percentage | number / numeric string (required) | Progress 0–100. 0 (or equivalent) hides the loader; any other value shows the dialog and fills the bar. String values are parsed with parseInt in an effect. |

CSS custom properties

Documented in extra/docs.ts styleSetup.vars (Bulma on :host), plus spacing used in styles/webcomponent.scss:

| Variable | Description | | --- | --- | | --bulma-primary | Progress value color (Bar uses is-primary). | | --bulma-border-weak | Progress track background. | | --bulma-text | Percentage label text color. | | --bulma-block-spacing | Used for spacing above the percentage label (margin-top: calc(var(--bulma-block-spacing) * 0.5)). |

Additional --bulma-* tokens from Bulma’s progress and typography setup apply on :host (see Bulma CSS variables).

CSS parts

| Part | Description | | --- | --- | | (none) | No ::part surface is exposed here; the inner hb-dialog owns its own parts (for example modal-dialog on hb-dialog). |

Slots

| Slot | Description | | --- | --- | | title | Content for the dialog title area (inner hb-dialog title slot). If empty, the title prop is used. |

Events (CustomEvent names)

  • modalShow{ id: string; show: boolean } — Forwarded from the inner hb-dialog when it opens or closes.

Usage notes

  • Drive percentage from your async work (upload, batch job, etc.): keep it updated until the task finishes, then set it to 0 to dismiss.
  • The progress element exposes aria-valuenow, aria-valuemin, aria-valuemax, and a title attribute with the rounded percentage for a simple native tooltip.
  • Overlay behavior (backdrop, body scroll, focus) follows hb-dialog; test in real browsers if you nest or stack modals.
  • There is no i18n block in extra/docs.ts for this package.

Minimal HTML example

<hb-dialog-loader title="Uploading…" percentage="45"></hb-dialog-loader>

Closing the loader

<hb-dialog-loader percentage="0"></hb-dialog-loader>

When percentage is zero, the wrapper sets the inner dialog’s show to no, so the loader is not visible.