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-banner

v0.76.5

Published

Marketing-style hero strip: logo image beside a title and subtitle, using Bulma layout (container, columns, visibility helpers). Layout switches from side-by-side on large screens to stacked, centered content on smaller breakpoints.

Downloads

9,216

Readme

hb-banner — integrator guide

Category: content · Tags: content, marketing · Package: @htmlbricks/hb-banner

Summary

hb-banner is a marketing-style hero strip: optional logo image beside a heading and supporting line. Content is rendered inside the shadow root using Bulma layout (container, columns), typography (.title, .subtitle), and visibility helpers so wide and narrow viewports get different alignment (side-by-side vs stacked, centered).

Behavior

  • Two responsive variants are rendered in the markup; Bulma visibility classes show exactly one at a time:
    • Wide (not “touch”): fluid container, vertically centered columns, logo column right-aligned (is-one-third-desktop), text column two-thirds (is-two-thirds-desktop).
    • Narrow (“touch” and below desktop): stacked, centered columns (is-mobile, is-multiline, has-text-centered), logo on its own row then title/subtitle.
  • logouri: passed to <img src="…"> in both layouts. If omitted or empty, the image still renders with an empty src (invalid image); omit the attribute only when you accept a broken image or handle it in your host page.
  • title / description: rendered as Bulma .title.is-4 and .subtitle.is-5 respectively. Either can be omitted; empty headings still produce elements with no visible text.
  • Internationalization: none in this component (extra/docs.ts lists no i18n entries).
  • Custom events: none in types/webcomponent.type.d.ts (Events is {}).

Layout and visual design

  • Host: display: block (styles/webcomponent.scss).
  • Logo box: .hb-banner-figure width 9.375rem (max 100%); .hb-banner-logo is width: 100%, height: auto, max-height: 9.375rem, object-fit: contain.
  • Theme: Bulma 1.x Sass is forwarded on :host (container, columns, title, image, typography/spacing helpers, visibility). Additional Bulma CSS variables from the bundled theme apply; documented public variables are listed below.

Logic (implementation reference)

  1. Props are read from the custom element API (logouri, title, description; plus optional id per typings).
  2. The same inner structure is duplicated: first block uses is-hidden-touch, second uses is-hidden-desktop, matching Bulma’s breakpoint helpers to the two layouts described above.

Custom element tag

<hb-banner …></hb-banner>

Attributes (HTML / reflected props)

Web component attributes are strings (snake_case names). Logical optional fields from authoring types:

| Attribute | Role | |-----------|------| | id | Optional element id (per Component typings; standard host attribute). | | title | Main heading text. | | description | Subtitle / supporting line under the heading. | | logouri | URL of the logo image for <img src>. |

Events

No custom events are declared for this component (Events is an empty object in types/webcomponent.type.d.ts). Use standard DOM events on the host if needed.

CSS custom properties, parts, and slots

Documented theme variables (from extra/docs.ts / styleSetup):

| Variable | Default | Notes | |----------|---------|--------| | --bulma-primary | #00d1b2 | Accent / link tones from Bulma theme setup. | | --bulma-text | #363636 | Body / general text tone. | | --bulma-title-color | #363636 | Bulma .title color. |

Other --bulma-* tokens from the bundled Bulma theme may apply on :host; see Bulma CSS variables.

  • ::part: none (cssParts is empty).
  • Slots: none (htmlSlots is empty); all markup is internal to the shadow root.

TypeScript typings (authoring)

From types/webcomponent.type.d.ts:

export type Component = {
  id?: string;
  title?: string;
  description?: string;
  logouri?: string;
};

export type Events = {};

Minimal HTML

<hb-banner
  title="Welcome"
  description="Build faster with our component library."
  logouri="https://example.com/logo.svg"
></hb-banner>

Text-only (no logo URL):

<hb-banner
  title="Welcome"
  description="Short supporting line under the heading."
></hb-banner>

Only set logouri when you have a valid image URL; the template always includes an <img> bound to logouri.