ngx-placeholder-auto-hide
Angular directive to automatically hide / show input's placeholder when focusin / focusout events are detected.
Installation
To install ngx-placeholder-auto-hide, run:
$ npm install ngx-placeholder-auto-hide --save
Demo
A live demo of the ngx-placeholder-auto-hide is hosted on stackblitz.
If you would like to play with this directive, you can use this online editor.
Usage
- Import PlaceholderAutoHideModule :
Once you have installed ngx-placeholder-auto-hide, you can import it in your AppModule
:
;; ; // Import PlaceholderAutoHideModule;
The PlaceholderAutoHideModule module has one directive exported which is placeholder-auto-hide. This directive can be applied on input fields and requires one argument which is the placeholder holder attribute
- Start using it:
Once the PlaceholderAutoHideModule is imported, you can start using the placeholder-auto-hide directive in your Angular application:
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
To lint all *.ts
files:
$ npm run lint
License
MIT © Haithem Mosbahi