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-skeleton-component

v0.76.5

Published

Development scaffold: accepts arbitrary `json`, `string`, and `boolean` props to test bindings, exposes a `content` slot and a `testpart` CSS part, and emits a generic `event` for wiring demos.

Downloads

3,067

Readme

hb-skeleton-component — integrator guide

Category: data · Tags: data, loading · Package: @htmlbricks/hb-skeleton-component · Custom element: hb-skeleton-component

Summary

This package is a development scaffold, not a production “skeleton loader” UI. It exists to exercise web-component bindings: it accepts a free-form json payload, a string label, and a boolean flag, renders a small Bulma-styled demo panel (copy of those values plus a primary button), exposes a named light-DOM slot for arbitrary markup, and emits a single generic event for listener wiring demos.

Use it when prototyping tooling, Storybook, or catalog pipelines around hb-* elements—not as a user-facing loading placeholder.

Props and attributes

Attributes use snake_case. In plain HTML, attribute values are always strings; pass JSON as a JSON string, and use the usual HTML Bricks conventions for booleans (for example yes / no) when setting the boolean attribute from markup. From JavaScript you may set properties with native types (boolean, objects) where your integration supports it.

| Attribute | Required | Description | |-----------|----------|-------------| | string | Yes (per typings) | Arbitrary string; shown in the panel and used to derive an uppercase line for binding demos. | | json | No | JSON string or (from JS) a parsed object. Invalid or empty string falls back to {}. Object values are used as-is. The UI lists top-level keys of the parsed object. Default in the implementation is "{}". | | boolean | No | Demo flag. The component treats true, the strings "true", "yes", "1", and "" as “active” for the displayed boolean line; other values (including false and "no") are inactive. Prefer explicit booleans from JS when testing. | | id | No | Passed to the root inner <div> of the demo layout. | | style | No | Present on the TypeScript Component interface for host styling experiments; the demo markup does not forward it into shadow content. |

Runtime behavior

  • string: Rendered as-is, and a derived uppercase string is shown on a second line.
  • json: Parsed when provided as a string; keys are displayed as a comma-separated list (empty when there are no keys).
  • boolean: Drives the “Boolean:” line via the normalization described above.
  • Button: “Dispatch Event” dispatches the event custom event (see below).

Events

| Event | detail | |-------|----------| | event | { test: true } (logical type: { test: boolean } per typings) — generic wiring demo fired from the primary button. |

Example (vanilla JS)

const el = document.querySelector("hb-skeleton-component");
el.addEventListener("event", (e) => {
  console.log(e.detail); // { test: true }
});

Styling (Bulma)

The shadow tree bundles Bulma 1.x (button, base skeleton utilities, animations). Theme it from the light DOM by setting --bulma-* on an ancestor such as :root or body so variables apply to the custom element host.

Documented overrides in metadata (styleSetup / extra/docs.ts):

| Variable | Type | Default | Role | |----------|------|---------|------| | --bulma-primary | color | #00d1b2 | Primary button background. | | --bulma-text | color | #363636 | Body copy, labels, and skeleton-related placeholder tone in demos. |

Additional layout tuning uses --bulma-section-padding in component SCSS when you want looser or tighter padding around the demo block.

CSS ::part

| Part | Role | |------|------| | testpart | Root demo panel wrapper (part="testpart" on the inner scaffold div). |

Slots

| Slot | Description | |------|-------------| | content | Light-DOM slot projected into the scaffold body. Default content in the source is the text “Default slot content” when nothing is assigned. |

Example

<hb-skeleton-component
  id="demo"
  string="hello"
  json='{"a":0,"b":"x"}'
  boolean="no"
>
  <span slot="content">Custom slot markup</span>
</hb-skeleton-component>

TypeScript (authoring types)

Authoring types live in types/webcomponent.type.d.ts:

  • Component: string (required in the type), optional id, style, json, boolean.
  • Events: maps event to { test: boolean }.

License

Apache-2.0 (see LICENSE.md in package metadata).