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

@loomidev/password

v0.3.0

Published

<loomi-password> — a form-associated password field with reveal, prefixes, validation and strength hints.

Readme

@loomidev/password

<loomi-password> — a form-associated password field with reveal, prefixes, validation and neutral strength hints.

Installation

npm install @loomidev/password lit
import "@loomidev/password"; // registers <loomi-password>

Basic Usage

<loomi-password name="password" label="Password"></loomi-password>
<loomi-password name="password" label="Password" required></loomi-password>

Strength Requirements

Set strength with any combination of these optional tokens:

| Token | Requirement | | ----- | ------------------------------- | | A | At least one uppercase letter. | | a | At least one lowercase letter. | | 1 | At least one number. | | # | At least one special character. |

<loomi-password label="Password" strength="Aa1#"></loomi-password>

The matching requirements render beneath the field with gray check marks. A requirement's check mark and label turn green once the current value satisfies it.

Set strength-color to customize that met-state label color.

<loomi-password label="Password" strength="Aa1#" strength-color="#14532d"></loomi-password>

Prefixes

Use text, a built-in icon, a slot, or a prefix dropdown.

<loomi-password prefix-icon="key" label="Password"></loomi-password>
<loomi-password prefix-options="personal,admin,service" label="Password"></loomi-password>

The selected dropdown value is available on .prefixValue and emits a composed loomi-prefix-change event with { value }.

Validation

required, error-message, show-error-inline, validate(), checkValidity() and reportValidity() match <loomi-input>. Strength requirements also participate in validity when strength is set.

<loomi-password
  required
  strength="Aa1#"
  label="Password"
  error-message="Choose a stronger password"
  show-error-inline
></loomi-password>

Field appearance

Use variant="minimal" for a bottom-border-only field:

<loomi-password label="Password" variant="minimal"></loomi-password>

Use label-position="inside" to keep a compact label inside the top of the field, with the password displayed beneath it:

<loomi-password label="Password" label-position="inside"></loomi-password>

Accessibility

For the library-wide baseline, see Foundations — Accessibility.

Responsive behavior

For the shared container and viewport rules, see Foundations — Responsive behavior.

Dark mode

For theme activation, token overrides, and contrast guidance, see Foundations — Dark mode.

Attributes

| Attribute | Default | Description | | ------------------------- | --------- | ----------------------------------------------------------------------------------------------- | | name | (blank) | Submitted with the form. | | label | (blank) | Floating label. | | label-position | default | default keeps the floating label; inside keeps a compact label inside the top of the field. | | placeholder | (blank) | Placeholder text. | | value | (blank) | Current value. | | required | false | Marks the field required. (boolean) | | disabled | false | Disable the field. (boolean) | | readonly | false | Read-only field. (boolean) | | size | medium | tiny | small | regular | medium | big | | variant | default | default | minimal (bottom border only, no box) | | prefix | (blank) | Text prefix. | | prefix-icon | (blank) | Icon-name prefix. | | prefix-options | (blank) | Comma, pipe, or JSON array of dropdown options. | | prefix-value | (blank) | Selected prefix dropdown value. | | transparent-prefix | true | Transparent (vs solid) prefix. (boolean) | | viewable | true | Show a reveal eye. (boolean) | | clearable | false | Show a clear button when the field has a value. (boolean) | | strength | (blank) | Requirement tokens: A, a, 1, #. | | strength-color | (blank) | Custom color for met strength labels. Defaults to a darker success green. | | error-message | (blank) | Message shown when validation fails. | | show-error-inline | false | Render error-message beneath the field. (boolean) | | show-placeholder-always | false | Keep the placeholder visible even with a label. (boolean) |

Methods

| Member | Description | | --------------------- | ---------------------------------------------- | | .value | Get/set the current value. | | focus() / clear() | Focus or clear the field. | | validate() | Run validation now; returns true when valid. |

Slots

| Slot | Description | | -------- | ------------------------------------------------ | | prefix | Content rendered before the main value or label. |

Events

| Event | Description | | --------------------- | --------------------------------------------- | | change | Fired when the value is committed or changed. | | input | Fired while the value is edited. | | loomi-prefix-change | Fired when the prefix changes. |

Dependencies

  • @loomidev/core
  • @loomidev/icons
  • @loomidev/notification
  • @loomidev/theme