Home

Awesome

ngx-gradient-text

<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-gradient-text is an Angular library that provides a dynamic gradient animation effect for text. This component allows you to display text with a smooth, animated gradient that transitions between two customizable colors.

Features

Installation

Install the library using npm:

npm install @omnedia/ngx-gradient-text

Usage

Import the NgxGradientTextComponent in your Angular module or component:

import {NgxGradientTextComponent} from '@omnedia/ngx-gradient-text';

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

Use the component in your template:


<om-gradient-text
  [text]="'Gradient Text Effect!'"
  [gradientStart]="'#ff7f50'"
  [gradientEnd]="'#6495ed'"
  styleClass="custom-gradient-text"
></om-gradient-text>

API


<om-gradient-text
  [text]="text"
  [gradientStart]="gradientStart"
  [gradientEnd]="gradientEnd"
  styleClass="your-custom-class"
></om-gradient-text>

Example


<om-gradient-text
  [text]="'Hello World!'"
  [gradientStart]="'#ff69b4'"
  [gradientEnd]="'#8a2be2'"
  styleClass="gradient-text-style"
></om-gradient-text>

This will create an animated gradient text effect where the text "Hello World!" smoothly transitions between pink and blue-violet.

Styling

To customize the appearance of the gradient text, use the styleClass input to apply your own CSS classes.

.gradient-text-style {
  font-size: 48px;
  font-weight: bold;
  font-family: 'Verdana', sans-serif;
}

This will style the gradient text with a custom font size, weight, and font family.

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.