
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
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.
Special thanks to: Angular University for excellent course on Building your own Angular Library which provided basis for this project.
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 { }
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.
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>
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>
This command will build and start the demo application:
npm start
Build the library using this command:
npm run build
FAQs
itn-input
We found that itn-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.