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

interpro-components

v0.8.2

Published

InterPro components using standard Web Components

Readme

InterPro web components

:warning:️ in development

A standard web component (v1) implementation of InterPro components.

You can see a very basic demo HERE.

For more advanced components used in the interpro website, you can see the nightingale project: [ Repo | Website ]

Usage

Examples

<interpro-type>
  <interpro-data-loader accession="IPR011528">
</interpro-type>
<interpro-type expanded>
 <interpro-data-loader accession="IPR011528">
</interpro-type>

Use with custom namespace

Only needed if interpro-type or interpro-data-loader names clash with an other existing Custom Element.

import { InterproDataLoader, InterproType } from 'interpro-components';

// If `data-loader` elements also namespaced, need to pass
// new name to InterproDataLoader to use it correctly
InterproDataLoader.dataLoaderElementName = 'namespaced-data-loader';

// Register the Custom Elements
customElements.define('namespaced-interpro-data-loader', InterproDataLoader);
customElements.define('namespaced-interpro-type', InterproType);

And then in the HTML, use like so:

<namespaced-interpro-type>
  <namespaced-interpro-data-loader accession="IPR011528">
</namespaced-interpro-type>

Compatibility

This element assumes support for at least ES2015. To support older browsers you might need to transpile the code you use down to the version you are planning on supporting.

You might need to use a polyfill for browsers not supporting Custom Elements v1 (not v0). See webcomponents.js.

List of components included

interpro-data-loader

using development endpoint, see note at the top

Not a visible element. Use to retrieve data from the InterPro API.

Generates a data-loader element with the correct source element to get data from the InterPro API for the specified InterPro entry.

interpro-type

Visible element. Only displays data.

Generates the visual representation of the data passed to the type property or coming from a load event bubbling from lower in the DOM tree.

Visual representation can be modified from the public API of the component (see after)

interpro-entry

Visible element. Only displays data.

Generates a one line visual representation of an entry (type name (accession)).

It supports nested entries, displaying them as a subtree.

API

interpro-data-loader

Properties

|name|default value|accepted values|information|DOM attribute|writable| |----|-------------|---------------|-----------|-------------|--------| |accession|null|valid entry ID|string corresponding to an existing entry ID|yes|yes|

Events

none, but the data-loader component generated as its child will dispatch bubbling events (see data-loader)

CSS custom properties

none

interpro-type

Properties

|name|default value|accepted values|information|DOM attribute|writable| |----|-------------|---------------|-----------|-------------|--------| |type|'undefined'|any of 'family', 'domain', 'repeat', 'site', 'active site', 'binding site', 'conserved site', 'ptm', or 'undefined'|corresponds to an entry type|yes|yes| |dimension|computed lineHeight|string|any size valid in CSS|yes|yes| |expanded|false|boolean|expanded view of the component|yes|yes|

Events

none

CSS custom properties

none

interpro-entry

Properties

|name|default value|accepted values|information|DOM attribute|writable| |----|-------------|---------------|-----------|-------------|--------| |accession|null|valid entry ID|string corresponding to an existing entry ID|yes|yes| |name|''|valid entry ID|string corresponding to an existing entry ID|yes|yes| |href|''|valid URL|string corresponding the URL of the entry|yes|yes| |type|'undefined'|any of 'family', 'domain', 'repeat', 'site', 'active site', 'binding site', 'conserved site', 'ptm', or 'undefined'|corresponds to an entry type|yes|yes| |selected|false|boolean|To show that is the current entry, and avoid links into the same page.|yes|yes|

Events

none

CSS custom properties

none

Development and testing

  1. Get the code via git clone:

    $ git clone https://github.com/ProteinsWebTeam/interpro-components.git

  2. Install dependencies via npm:

    interpro-components$ npm install

  3. Start the app. This includes re-bundling, and starts live-reload, so it refresh the page when the JavaScript code changes.

    interpro-components$ npm run start

  4. Check the test page in your server. e.g. http://localhost:8080/ (or whatever address is displayed when running step 3)