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

@gudhub/gh-html-element

v1.4.6

Published

This is web component which use to create elements

Readme

GH HTML ELEMENT

⚙️ Attributes

| Attribute | Description | |------------------|-----------------------------------------------------------------------------| | app-id | Application ID of the element. | | item-id | Item ID of the element. | | field-id | Field ID of the element. | | value | Value of the element. | | gh-model | Path to the object where the element’s value is stored or retrieved from. | | onclick | Binds a method from the parent component to the click event. Executes function with arguments from attribute. | | onchange | Binds a method from the parent component to the change event. Executes function with arguments from attribute. | | onsubmit | Binds a method from the parent component to the submit event. Executes function with arguments from attribute. | | onmousedown| Binds a method from the parent component to the mousedown event. Executes function with arguments from attribute. |

📖 Available Methods

| Method | Description | Arguments | Usage Example | |--------|-------------|-----------|---------------| | render(html: string) | Renders plain HTML inside the component. Supports template literals with component properties (including value). | • html (string) – HTML string to render. | this.render("<div>Hello</div>") | | renderAngularElement(container: HTMLElement, template: string, scope: object = {}) | Renders an Angular directive/component (e.g. gh-view, gh-element) inside the Web Component. | • container (HTMLElement) – element where compiled Angular template will be inserted.template (string) – Angular template string.scope (object, optional) – scope variables passed into Angular template. | this.renderAngularElement(this, "<gh-view></gh-view>", {user: this.value}) | | observe(variable: string, callback: Function) | Creates a getter/setter pair on the component that watches a variable. The callback is triggered when the variable is updated. | • variable (string) – name of the property to observe.callback (Function) – function executed when the variable changes. | this.observe("userName", () => console.log(this.userName)) |

Here is example:

class Simple extends GhHtmlElement {
  constructor() {
      super();
       this.text = 'Text';
  }
  
   connectedCallback() {
   	this.render()
   	this.observe('text', () => {
    	  this.render();
      });
    }
  
  render () {
		this.innerHTML = `<p>${this.text}</p>`;
  }
}
window.customElements.define('simple-element', Simple);
const simple = document.createElement('simple-element');
setTimeout(() => {
	simple.data.text = 'Hello World!';	
}, 1000)

document.body.append(simple);