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

itn-input

v1.3.13

Published

itn-input

Readme

Angular Libray

This module contains a couple of Angular Input box components that allow to add an icon inside a text input, which helps better identify common input fields like for example email, etc.

This small module contains only the HTML and CSS necessary to implement this very common HTML pattern.

The default theme of the input is designed to look just like a plain HTML input, including the focus blue border (tab and shift-tab are supported).

Any icon available on either the Font Awesome or the Google Material Design Icon libraries can be used.

Foundation of a more extensive Component Library:

  • View ongoing poc at: ddeloy.net/itn-input
  • The demo site will poc the selective customization of additional, commonly used html elements, with material design styles(ie. buttons, navigation etc.).
  • Additional features will be gradually added to the npm itn-input library

Special thanks to: Angular University for excellent course on Building your own Angular Library which provided basis for this project.

Features:

  • The components have minimum styling and are theme-able
  • there is no need to include a component-specific external stylesheet, only the Font Awesome or Material icons stylesheets
  • As the input component takes a plain input and projects it, this means that by design the component supports all standard HTML input attributes, including custom attributes (data-), all the accessiblity properties, etc.
  • This also means that these components are Compatible with Angular Forms
  • This repo is based on the angular-quickstart-lib, which is a seed repo (under development) for a library in the Angular Package Format v4.0.
  • This means for example that this module is compatible with AOT, and includes UMD bundles for use with SystemJs

Installation

This is how to install the components:

npm install itn-input

or

yarn add itn-input

And on your application module:

import {ItnInputModule} from 'itn-input';

@NgModule({
  declarations: [ ...],
  imports: [
    BrowserModule,
    ....,
     ItnInputModule
],
})
export class AppModule { }

Using the Font Awesome Inputs

First add version of Font Awesome to our page, for example:

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

Then we can use the Font Awesome Input like this:

<itn-fa-input icon="envelope">
    <input itnInput type="email" name="email" placeholder="Email" autocomplete="off" 
</itn-fa-input>

The inputs receive an input property named icon that identifies which Font Awesome icon we want to apply.

The value envelope will add the email icon by adding the CSS class fa-envelope to the icon, etc.

The input that you pass inside the component is just a plain HTML input that will be projected inside the component, so all the standard HTML properties of an input apply.

To make sure that the focus functionality is working correctly, make sure to apply the attribute directive itnInput like in the examples.

Using the Material Design Input

We will need to add first a version of the Google Material Design icons to our page, for example:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

Then use the Material Design Input like this:

<itn-md-input icon="search">
    <input itnInput type="email" name="email" placeholder="E-mail">
</itn-md-input>

Applying a custom theme

You can take advantage of host-context pseudo class to display a custom theme that mimiics the material design input style - with a border just along bottom of the input Just add the class to any host element container and the class will be selectively applied to any nested itn-fa-input or itn-md-input components

<div class="custom-md-theme">
  <itn-fa-input icon="envelope">
      <input itnInput type="email" name="email" placeholder="Email" autocomplete="off" 
  </itn-fa-input>
  <itn-md-input icon="search">
      <input itnInput type="email" name="email" placeholder="E-mail">
  </itn-md-input>
</div>

or...

<itn-md-input icon="search" class="custom-md-theme">
    <input itnInput type="email" name="email" placeholder="E-mail">
</itn-md-input>

       

Running the Demo Application

This command will build and start the demo application:

npm start

Running This Module In Development

Build the library using this command:

npm run build

License

MIT