0.0.4 • Published 2 years ago

ngx-i24-colored-lights v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

NgxI24ColoredLightsLib

npm.io npm.io

A lightweight plugin to render a simple, animated colored lighted cover.

Features

  • highly customizable
  • very easy to implement

Demo

npm.io

Get started

Installation

$ npm i ngx-i24-colored-lights

Example

TS
Module
import { NgxI24ColoredLightsModule } from 'ngx-i24-colored-lights';

@NgModule({
  imports:      [ BrowserModule, FormsModule,NgxI24ColoredLightsModule ],
  declarations: [ AppComponent, HelloComponent ],
  bootstrap:    [ AppComponent ]
})
export class AppModule { }
Component
import { Component, VERSION } from '@angular/core';

@Component({
 selector: 'my-app',
 templateUrl: './app.component.html',
 styleUrls: ['./app.component.css'],
})
export class AppComponent {
 colorCollection = ['#e7e984', '#6bbada', '#e98b84'];
 lights = 30;
 textColor = '#FFFFFF';
 lightSize = 50;
 blurLevel = 3;
 text = '';
 imageUrl =
   'https://raw.githubusercontent.com/HibaAlfarkh/ngx-i24-colored-lights-lib/master/projects/colored-lights-demo/src/assets/street.jpg';
}
HTML
<i24-colored-lights
  [colorCollection]="colorCollection"
  [lightsCount]="lights"
  [lightSize]="lightSize"
  [blurLevel]="blurLevel"
  [title]="text"
  [imageUrl]="imageUrl"
></i24-colored-lights>

Options

Property (Type)DefaultDescription
lightsCount100The count of the lights
colorCollection'#D00010', '#FEC641', '#63C13B', '#FE0016', '#5C6C94', '#6B0D05', '#7D0006', '#DB1913', '#FEE34A', '#2F8A2'The colors of the lights
lightSize75The size of the lights
blurLevel3The blur level of the lights
imageUrl''The background image url

Support

npm.io

Copyright

Copyright (c) 2022 Hiba Alfarkh, contributors. Released under the MIT