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

@mfp-design-system/input

v3.0.0

Published

Input web component for the mfp-design-system, built with Lit.

Readme

@mfp-design-system/input

A Lit-based <mfp-input> web component. Works in any framework that supports custom elements.

Install

npm install @mfp-design-system/input @mfp-design-system/tokens

@mfp-design-system/tokens is an optional peer — the component has fallback values, but loading the tokens gives it the canonical look.

Usage

import '@mfp-design-system/input';
import '@mfp-design-system/tokens/css';
<mfp-input label="Email" type="email" placeholder="[email protected]"></mfp-input>

<mfp-input label="Password" type="password" required></mfp-input>

<mfp-input label="Search" type="search">
    <span slot="prefix">🔍</span>
</mfp-input>

<mfp-input label="Name" hint="Your full legal name"></mfp-input>

<mfp-input label="Email" type="email" error="Please enter a valid email address"></mfp-input>

<mfp-input size="sm" placeholder="Small"></mfp-input>
<mfp-input size="md" placeholder="Medium"></mfp-input>
<mfp-input size="lg" placeholder="Large"></mfp-input>

<mfp-input disabled value="Can't touch this"></mfp-input>
<mfp-input readonly value="Look but don't touch"></mfp-input>

API

| Attribute | Type | Default | Description | | ------------- | --------------------------------------------------------------------------- | -------- | -------------------------------------------- | | type | 'text' \| 'email' \| 'password' \| 'number' \| 'search' \| 'tel' \| 'url' | 'text' | Native input type | | size | 'sm' \| 'md' \| 'lg' | 'md' | Sizing | | value | string | '' | Current value (controlled) | | name | string | '' | Native form name | | label | string | '' | Visible label (also wires for/id) | | placeholder | string | '' | Placeholder text | | hint | string | '' | Helper text shown below the input | | error | string | '' | Error message — also triggers invalid styles | | disabled | boolean | false | Disables the input | | readonly | boolean | false | Makes the input read-only | | required | boolean | false | Marks as required (adds * to label) |

Events

  • input — fires on every keystroke. event.detail.value carries the current value.
  • change — fires on commit (blur or Enter), per native <input> semantics.

Slots

  • prefix — content before the input (icons, currency symbols, etc.)
  • suffix — content after the input (clear button, units, etc.)

Shadow parts

For custom styling: label, control, input, hint, error.

mfp-input::part(input) {
    border-radius: 0;
}
mfp-input::part(label) {
    text-transform: uppercase;
}

Framework notes

  • Vue 3 / Nuxt: set compilerOptions.isCustomElement: (tag) => tag.startsWith('mfp-')
  • Angular: add CUSTOM_ELEMENTS_SCHEMA to modules using the component
  • React 19+: works natively

Forms

<mfp-input> is form-associated via ElementInternals:

  • Its value is submitted with the form under the configured name
  • required triggers native valueMissing validation
  • error (when set) becomes a custom validity message
  • checkValidity() and reportValidity() mirror the native HTMLInputElement methods
<form @submit.prevent="onSubmit">
    <mfp-input name="email" type="email" required label="Email"></mfp-input>
    <mfp-button type="submit">Submit</mfp-button>
</form>