Home

Awesome

ngx-meteors

<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-meteors is an Angular library that adds a mesmerizing meteor shower animation effect to your components. The meteors fly across the screen in a configurable direction and color, creating a dynamic and engaging background effect for your Angular applications.

Features

Installation

Install the library using npm:

npm install @omnedia/ngx-meteors

Usage

Import the NgxMeteorsComponent in your Angular module or component:

import {NgxMeteorsComponent} from '@omnedia/ngx-meteors';

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

Use the component in your template:


<om-meteors
  [meteorColor]="'#ffcc00'"
  [meteorRotation]="'225deg'"
  styleClass="custom-meteor-class"
>
  <h1>Your content here</h1>
</om-meteors>

API


<om-meteors
  [meteorColor]="meteorColor"
  [meteorRotation]="meteorRotation"
  styleClass="your-custom-class"
>
  <ng-content></ng-content>
</om-meteors>

Example


<om-meteors
  [meteorColor]="'#00ffcc'"
  [meteorRotation]="'180deg'"
  styleClass="meteor-background"
>
  <div class="content">This is a meteor background effect</div>
</om-meteors>

This will create a meteor shower effect with cyan-colored meteors moving in a downward direction.

Styling

To further customize the appearance of the meteors or the container, use the styleClass input to apply your own CSS classes.

.meteor-background {
  background-color: #000;
  height: 100vh;
  position: relative;
}

.content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  padding-top: 50px;
}

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.