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

@haxtheweb/meme-maker

v26.8.0

Published

Automated conversion of meme-maker/

Readme

<meme-maker>

Make a meme out of an image.

<meme-maker> renders an image with top and bottom caption text in the classic meme format. It is a LitElement web component and is HAX-capable, so it can be authored and configured inside the HAX editor.

Usage

To use this web component in your project you can utilize one of the following styles of syntax.

/* In an existing JS module / web component */
import '@haxtheweb/meme-maker/meme-maker.js';

/* CDN */
<script type="module" src="https://cdn.hax.cloud/cdn/build/es6/node_modules/@haxtheweb/meme-maker/meme-maker.js"></script>

Minimal example:

<meme-maker
  image-url="https://cdn2.thecatapi.com/images/9j5.jpg"
  top-text="I bring you"
  bottom-text="the death"
  alt="Cat stalking a small toy"
></meme-maker>

Properties

| Property | Attribute | Type | Default | Description | | --- | --- | --- | --- | --- | | imageUrl | image-url | String | null | URL to the meme image. | | topText | top-text | String | null | Text rendered on top of the image. | | bottomText | bottom-text | String | null | Text rendered on the bottom of the image. | | alt | alt | String | "" | Alt text passed to the underlying <img> for non-sighted users. | | describedBy | described-by | String | null | aria-describedby value passed to the underlying <img>. | | crossorigin | crossorigin | Boolean | false | Sets the crossorigin attribute on the underlying <img>. |

Attributes

Attributes mirror their corresponding properties (kebab-case).

| Attribute | Property | Type | Description | | --- | --- | --- | --- | | image-url | imageUrl | String | URL to the meme image. | | top-text | topText | String | Top caption text. | | bottom-text | bottomText | String | Bottom caption text. | | alt | alt | String | Alt text for the image. | | described-by | describedBy | String | aria-describedby for the image. | | crossorigin | crossorigin | Boolean | Sets crossorigin on the image. |

Methods

These are HAX lifecycle hooks invoked by the HAX editor; consumers do not call them directly.

| Method | Parameters | Description | | --- | --- | --- | | haxHooks | none | Registers this element's HAX lifecycle hooks (progressiveEnhancement, gizmoRegistration). | | haxgizmoRegistration | store | Dispatches an i18n-manager-register-element event so HAX loads this element's locales/ translations. | | haxprogressiveEnhancement | el | Returns a plain-HTML string (image + captions) for RSS, bots, and legacy renderers. |

Slots, Events & CSS Parts

None declared in the manifest. The element renders its own <figure> / <img> / <figcaption> structure and exposes no named slots, custom events, or shadow-DOM CSS parts.

Styling

The caption font size is themeable via these custom properties (defined in the element styles; not yet declared in custom-elements.json):

| Custom property | Default | Applies | | --- | --- | --- | | --meme-maker-font-size | 36px | Caption font size (base / desktop). | | --meme-maker-font-size-medium | 20px | Caption font size at max-width: 800px. | | --meme-maker-font-size-small | 20px | Caption font size at max-width: 600px. |

meme-maker {
  --meme-maker-font-size: 50px;
  --meme-maker-font-size-medium: 24px;
  --meme-maker-font-size-small: 16px;
}

Use in the HAX editor

<meme-maker> is HAX-capable. In the editor it appears as the Meme gizmo (hax:meme icon, tagged Media / funny / meme / image) and supports scaling and source editing.

The HAX configuration panel exposes:

| Property | Field | Notes | | --- | --- | --- | | imageUrl | Source (haxupload) | Upload or pick the meme image. | | topText | Top text | Textfield. | | bottomText | Bottom text | Textfield. | | alt | Alternative text | Required — describe the image for non-sighted users. |

Demo

Run the local demo:

npm start

This starts a development server and opens demo/index.html, watching *.js and lib/*.js for changes. The demo demonstrates caption sizing across responsive breakpoints and a crossorigin image source.

Contributing

  1. Fork it! git clone https://github.com/haxtheweb/webcomponents.git
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

Apache-2.0 License