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

ngx-input-loader

v0.0.7

Published

<a href="https://github.com/extremebi/ngx-input-loader"> <h1 align="center">Ngx-Input-Loader</h1> </a>

Downloads

238

Readme

Table of contents

Live DEMO

Ngx Input Loader Demo

Installation

To install this library, run:

$ npm install ngx-input-loader --save

Usage

Import NgxInputLoaderModule in the root module (app.module.ts)

...
import { NgxInputLoaderModule } from 'ngx-input-loader';

@NgModule({
    imports: [
        ...
        NgxInputLoaderModule
    ],
})

export class AppModule { }
  

Use the ngxInputLoader directive by binding it to a boolean value in the component's html (any.component.html)

  • INPUTS
<input type="text" [ngxInputLoader]="true"> 
  • BUTTONS
<button [ngxInputLoader]="true" [ngxInputLoaderConfig]="{padButton: true}">SUBMIT</button>

<!-- OR -->

<input type="button" value="Submit" [ngxInputLoader]="true" [ngxInputLoaderConfig]="{padButton: true}">

<input type="submit" value="Submit" [ngxInputLoader]="true" [ngxInputLoaderConfig]="{padButton: true}">

Configuration

Available Options

  • loader - Type of loader to use. See loaders for the list of available loaders. Default: rolling.

  • position - Position of the loader on the input or button element. Default: right.

    • Options: right, left & center.
  • color - Color of the loader. All supported color formats can be used. Default: #000.

  • background - Background of the element when the loader is visible. Images with url('path/to/image') can also be set as background. Default: #fff.

  • padding - Padding to the loader w.r.t. the element. Default: 10px.

    • In case of position: 'right' (default) only padding-right is applied.
    • In case of position: 'left', only padding-left is applied.
    • In case of position: 'center', no padding will be applied even if specified.
  • height - Relative height of the loader w.r.t. the element. Default: 1.

  • opacity - Opacity of the loader. Default: 1.

  • speed - Speed of the loader. Default: 1000 (in milli-seconds).

  • padButton - Whether to pad the button to make space for the loader when it's visible. It will pad if the element is a button or input[type="submit"] or input[type="button"] else it won't, even if specified.

    • Options: true or false.

Modular Level Configuration

Pass in the configuration object in the forRoot method of the NgxInputLoaderModule in the imports array of your root module (app.module.ts)

...
import { NgxInputLoaderModule } from 'ngx-input-loader';

@NgModule({
    imports: [
        ...
        NgxInputLoaderModule.forRoot({
            // Defaults are shown. Change them to your according to your need.
            
            loader: 'rolling', // full list of loaders is provided below
            position: 'right', // options: 'right', 'center', 'left'
            color: '#000',  
            background: '#fff', 
            padding: '10px', // any supported format
            height: 1, // number relative to input height like 0.9 or 0.25
            opacity: 1, 
            speed: 1000, // in milliseconds
            padButton: false, // adds padding to buttons

            // In case any property is not specified, default options are used.
        })
    ]
})

Element Level Configuration

Add ngxInputLoaderConfig property binded to the configuration object to your html element.

Note- This will override your modular level configuration (if any) just for this specific element.


<input type="text" [ngxInputLoader]="true" [ngxInputLoaderConfig]="{
    loader: 'bars-music',
    position: 'center',
    color: '#fff',
    background: '#333',
    padding: '15px',
    height: 0.75,
    opacity: 0.7,
    speed: 750
}">

<!-- In case any property is not specified, modular level configuraition will be used (if any) else default options are used. -->

Loaders

Types of Loaders Available -

  • 'ball-bounce'
  • 'ball-ellipsis'
  • 'ball-fading-shrink'
  • 'ball-fading'
  • 'ball-fountain-fading'
  • 'ball-fountain'
  • 'ball-interwind'
  • 'ball-line'
  • 'ball-mini'
  • 'ball-planets'
  • 'ball-spinner-double'
  • 'ball-spinner'
  • 'ball-triangle'
  • 'bars-music'
  • 'bars-trespassing'
  • 'bars'
  • 'circles-spinner'
  • 'circles'
  • 'clock'
  • 'dots-triple'
  • 'drops-fading'
  • 'eclipse'
  • 'flickr'
  • 'gear'
  • 'grid'
  • 'oval'
  • 'pendulum'
  • 'ring-broken'
  • 'ring-double'
  • 'ring-dual'
  • 'ripple-inbound'
  • 'ripple'
  • 'rolling-short'
  • 'rolling'
  • 'segments'
  • 'snake-chasing'
  • 'snake-full'
  • 'snake-solid'
  • 'tail-spin'
  • 'triangle-spin-triple'
  • 'twirl'
  • 'typing'

License

MIT © Extreme Business Intelligence Private Limited