0.0.4 • Published 2 years ago
ngx-i24-colored-lights v0.0.4
NgxI24ColoredLightsLib
A lightweight plugin to render a simple, animated colored lighted cover.
Features
- highly customizable
- very easy to implement
Demo
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) | Default | Description |
---|---|---|
lightsCount | 100 | The count of the lights |
colorCollection | '#D00010', '#FEC641', '#63C13B', '#FE0016', '#5C6C94', '#6B0D05', '#7D0006', '#DB1913', '#FEE34A', '#2F8A2' | The colors of the lights |
lightSize | 75 | The size of the lights |
blurLevel | 3 | The blur level of the lights |
imageUrl | '' | The background image url |
Support
Copyright
Copyright (c) 2022 Hiba Alfarkh, contributors. Released under the MIT