New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@soywod/pin-field

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@soywod/pin-field

📟 Native web component for entering PIN codes.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.1K
increased by26.55%
Maintainers
1
Weekly downloads
 
Created
Source

📟 PIN Field npm

Native web component for entering PIN codes.

gif

Live demo at https://soywod.github.io/pin-field/demo/.

Installation

From npm

npm install @soywod/pin-field
# or
yarn add @soywod/pin-field

The package is available in both GitHub Packages and npm registries.

From CDN (jsDelivr)

<script type="module" src="https://cdn.jsdelivr.net/npm/@soywod/pin-field/dist/pin-field.esm.js"></script>

Usage

<swd-pin-field></swd-pin-field>

Attributes

NameDescription
lengthNumber of inputs the PIN Field is composed of
validateList of allowed chars

Additional attributes are transfered to all the inputs (except for id).

Properties

NameTypeDescriptionDefault
lengthnumberNumber of inputs the PIN Field is composed of5
validatestring|string[]|RegExp|(key: string) => booleanValidator/^[a-zA-Z0-9]$/
format(key: string) => stringFormatterkey => key

Events

NameDescriptionData
changeTriggered when the PIN code changes{detail: {value: string}}
completeTriggered when the PIN code is complete{detail: {value: string}}
resolveTriggered when a key is resolved{detail: {key: string}}
rejectTriggered when a key is rejected{detail: {key: string}}

Sponsoring

github paypal ko-fi buy-me-a-coffee liberapay

Keywords

FAQs

Package last updated on 10 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc