Home

Awesome

ngx-flickering-grid

<a href="https://ngxui.com" target="_blank" style="display: flex;gap: .5rem;align-items: center;cursor: pointer; padding: 0 0 0 0; height: fit-content;"> <img src="https://ngxui.com/assets/img/ngxui-logo.png" style="width: 64px;height: 64px;"> </a>

This Library is part of the NGXUI ecosystem. <br> View all available components at https://ngxui.com

@omnedia/ngx-flickering-grid is an Angular library that renders a dynamic flickering grid background with customizable square size, grid gaps, flicker behavior, and color. This component is perfect for adding a unique animated grid effect behind content in your Angular application.

Features

Installation

Install the library using npm:

npm install @omnedia/ngx-flickering-grid

Usage

Import the NgxFlickeringGridComponent in your Angular module or component:

import {NgxFlickeringGridComponent} from '@omnedia/ngx-flickering-grid';

@Component({
  ...
    imports:
[
  ...
    NgxFlickeringGridComponent,
],
...
})

Use the component in your template:


<om-flickering-grid
  [squareSize]="6"
  [gridGap]="8"
  [flickerChance]="0.5"
  [color]="'#ffcc00'"
  [maxOpacity]="0.4"
  styleClass="custom-flickering-grid"
>
  <h1>Your Content Here</h1>
</om-flickering-grid>

How It Works

API


<om-flickering-grid
  [squareSize]="squareSize"
  [gridGap]="gridGap"
  [flickerChance]="flickerChance"
  [color]="color"
  [maxOpacity]="maxOpacity"
  styleClass="your-custom-class"
>
  <ng-content></ng-content>
</om-flickering-grid>

Example


<om-flickering-grid [squareSize]="8" [gridGap]="10" [flickerChance]="0.4" [color]="'#3498db'" [maxOpacity]="0.5">
  <div class="content">
    <p>Flickering Grid Background Content</p>
  </div>
</om-flickering-grid>

This will create a flickering grid with larger squares, more pronounced gaps, and a blue color, while the content inside remains unaffected by the animation.

Contributing

Contributions are welcome. Please submit a pull request or open an issue to discuss your ideas.

License

This project is licensed under the MIT License.