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

@3mo/element-internals

v0.1.1

Published

A Lit controller and decorator for form-associated custom elements, with value, validity, reset and fieldset support.

Readme

Element Internals

A Lit controller and decorator for form-associated custom elements, with value, validity, reset and fieldset support.

npm Documentation

Installation

npm install @3mo/element-internals
import { FormAssociationController, formAssociated } from '@3mo/element-internals'

Examples

  • Default — Edit the name and submit: the field hands its value to the form under its name.
  • Form Participation — All three hold the same text, yet the field without @formAssociated is missing from the submission: its input sits in a shadow root, outside the form's tree.
  • Constraint Validation — Submit while empty: the form refuses and the browser shows the message of the first invalid control - the email's from its input, the rating's from the state it works out itself.
  • Reset — Type over the fields and press Reset: handleReset returns each to its value attribute, as a native input does.
  • Disabled Fieldset — Untick Billing: the disabled fieldset takes its controls out of the submission and out of validation, and handleDisabledChange greys them out.

API

Exports

| Name | Kind | Description | | --- | --- | --- | | FormAssociationController | class | Makes the host a form control: it submits a value, blocks submission while invalid, and follows resets, fieldsets and restorations as a native control does. | | elementInternals | function | The element's ElementInternals, attached on first use. | | formAssociated | function | Declares that the element takes part in forms, which the platform reads while the class is being defined, and hands the form callbacks to its FormAssociationController. | | FormValue | type | A value a form can carry for one of its controls. | | FormValidity | type | Constraint validation the host presents to the platform - a rendered input, or a state it works out itself. | | FormRestoreReason | type | Why the browser is restoring a control: a history navigation, or the user's autofill. | | FormRestoreState | type | A value the browser hands back to restore a control - a form value, or the entries of a FormData one. |

Links

License

MIT © 3MO GmbH