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 🙏

© 2024 – Pkg Stats / Ryan Hefner

reusable-wc

v2.0.5

Published

Stencil Component Starter

Downloads

376

Readme

Built With Stencil

Reusable Web Component's

This are the Web Components created using stencil.js that can be used in any UI Frameworks or Libraries such as React, Angular and Vue

Web Components:

Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.

Stencil.Js

Stencil is a compiler for building fast web apps using Web Components.

Stencil is also great for building entire apps. For that, use the stencil-app-starter instead.

Getting Started

Install:

npm i reusable-wc

To Make Use of this web component in other Frameworks or library Follow the below Link:

Components and Its Usage

Properties

| Property | Attribute | Description | Type | Default | | ----------- | ------------ | ----------- | ---------------------- | ---------- | | error | error | | boolean | false | | errorText | error-text | | string | '' | | format | format | | "number" \| "text" | 'number' | | otp | otp | | string | '' | | size | size | | number | 6 | | styleName | style-name | | "lg" \| "md" \| "sm" | 'md' |

Events

| Event | Attribute | Type | | ------------- | --------------- | --------------------- | | otpChange | onOtpChange | CustomEvent<string> | | otpComplete | onOtpComplete | CustomEvent<string> |

Syntax

  • Default: <digit-input size="6" format="number" otp="123456" style-name="lg" ></digit-input>

  • With Error: <digit-input size="6" format="number" otp="123456" style-name="lg" error=true error-text="invalid Otp"></digit-input>

Event usage in Non Jsx:


<digit-input size="6" format="number" otp="123456" style-name="lg" ></digit-input>

<script>
const ele = document.querySelectorAll('digit-input');
ele.forEach(el=> addEventListener('otpComplete', event => { console.log('FULLFILED COMPLETED', event.detail); }));
ele.forEach(el=> addEventListener('otpChange', event => { console.log('FULLFILED RECEIVED', event.detail); }));
</script>

Event usage in Jsx:


<digit-input size="6" format="number" otp="123456" style-name="lg" onOtpChange={(e) => this.someMethod(e)} onOtpComplete={(e) => this.someMethod(e)} ></digit-input>

Properties

| Property | Attribute | Description | Type | Default | | ------------- | ------------- | ----------- | -------------------- | --------------- | | disabled | disabled | | boolean | false | | error | error | | boolean | false | | errorText | error-text | | string | '' | | helperText | helper-text | | string | '' | | label | label | | string | undefined | | name | name | | string | undefined | | placeholder | placeholder | | string | 'Placeholder' | | type | type | | "number" \| "text" | 'text' | | uid | uid | | string | undefined | | value | value | | string | '' |

Events

| Event | Description | Type | | ------------------ | ----------- | --------------------- | | inputFieldChange | | CustomEvent<string> |

Syntax

  • Default: <input-field type="text" label="Full Name" name="fullname" placeholder="Please type name..."></input-field>

  • With Error: <input-field type="text" label="Full Name" name="fullname" placeholder="Please type name..." error="true" error-text="Error"></input-field>

  • With Helper Text: <input-field type="text" label="Full Name" name="fullname" placeholder="Please type name..." helper-text="HelperText"></input-field>

  • With Disabled: <input-field type="text" label="Full Name" name="fullname" placeholder="Please type name..." disabled="true"></input-field>

  • With Type number: <input-field type="number" label="Mobile No." name="mobile" placeholder="Please"></input-field>

Event usage in Non Jsx:


<input-field type="text" label="Full Name" name="fullname" placeholder="Please type name..."></input-field>

<script>
 const ele = document.querySelectorAll('input-field');
      ele.forEach(el =>
        addEventListener('inputFieldChange', event => {
          console.log('on change called', event.detail);
        }),
      );
</script>

Event usage in Jsx:

<input-field type="text" label="Full Name" name="fullname" placeholder="Please type name..." onInputFieldChange={e => this.someMethod(e)}></input-field>

Happy Coding !!!!