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

@substrate-system/input

v0.0.22

Published

[![tests](https://img.shields.io/github/actions/workflow/status/substrate-system/input/nodejs.yml?style=flat-square)](https://github.com/substrate-system/input/actions/workflows/nodejs.yml) [![types](https://img.shields.io/npm/types/@substrate-system/inpu

Readme

Input

tests types module install size semantic versioning Common Changelog license

Inputs with style. Use this web component, and it will forward any relevant attributes to the inner input element, like an id or name, for example. aria-* attributes are handled intelligently too.

See a live demo

Install

npm i -S @substrate-system/input

CSS

Import CSS

import '@substrate-system/input/css'

Or minified:

import '@substrate-system/input/min/css'

Use

This calls the global function customElements.define. Just import, then use the tag in your HTML.

JS

import { SubstrateInput } from '@substrate-system/input'

// TAG property

document.body.innerHTML += `
<${SubstrateInput.TAG}></${SubstrateInput.TAG}>
`

HTML

<div>
    <substrate-input></substrate-input>
</div>

pre-built

This package exposes minified JS and CSS files too. Copy them to a location that is accessible to your web server, then link to them in HTML.

copy

cp ./node_modules/@substrate-system/input/dist/index.min.js ./public/substrate-input.min.js
cp ./node_modules/@substrate-system/input/dist/style.min.css ./public/substrate-input.css

HTML

<head>
    <link rel="stylesheet" href="./substrate-input.css">
</head>
<body>
    <!-- ... -->
    <script type="module" src="./substrate-input.min.js"></script>
</body>

API

Attributes

Component attributes

These are handled by substrate-input directly.

| Attribute | Description | |-----------|-------------| | label | Text content for the <label> element rendered above the input. When omitted, no label is rendered. | | id | Forwarded to the inner <input> element. Removed from the host element. When omitted, a random id is generated for the input. |

input element attributes

These are forwarded directly to the inner <input> element.

accept, alt, autocomplete, autocapitalize, autocorrect, autofocus, capture, dirname, disabled, enterkeyhint, form, inputmode, list, max, maxlength, min, minlength, multiple, name, pattern, placeholder, readonly, required, size, spellcheck, step, tabindex, title, type, value

ARIA attributes

All ARIA attributes are forwarded to the inner <input> element and removed from the host element.

aria-activedescendant, aria-atomic, aria-autocomplete, aria-braillelabel, aria-brailleroledescription, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colindextext, aria-colspan, aria-controls, aria-current, aria-describedby, aria-description, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowindextext, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext

Events

substrate-input does not emit any custom events. All native <input> events (change, input, focus, blur, etc.) bubble up through the component as normal.

const el = document.querySelector('substrate-input')
el.addEventListener('input', ev => {
    console.log(ev.target.value)
})