ngx-simple-typewriter
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Angular Simple Typewriter

A simple angular standalone component for adding a nice typewriter effect to your project.

NPM JavaScript Style Guide npm bundle size GitHub

screenshot

Install

npm

npm i ngx-simple-typewriter

Yarn

yarn add ngx-simple-typewriter

Usage

You can use the standalone Typewriter component in your project.

1. Component

import { Component } from '@angular/core';
import { Typewriter } from 'ngx-simple-typewriter';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [Typewriter],
  template: `
    <ngx-typewriter />
  `,
  styles: []
})
export class AppComponent {
}

Component Input Properties

Prop Type Options Description Default
words array Required Array of strings holding the words ['Hello', '...']
typeSpeed number Optional Character typing speed in Milliseconds 80
deleteSpeed number Optional Character deleting speed in Milliseconds 50
panelClass string Optional CSS classes to be applied for the typewriter text (should be in global stylesheet) ''

Usage Example

import { Component } from '@angular/core';
import { Typewriter } from 'ngx-simple-typewriter';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [Typewriter],
  template: `
    <div class="">
      Hello there, I am
      <ngx-typewriter
        [words]="words"
        [typeSpeed]="1000"
        [deleteSpeed]="100"
        [panelClass]="'text-color'"
      />
    </div>
  `,
})
export class AppComponent {
  words = ['Abdullah Mansoor', 'a Software Engineer', 'a Cricket Player'];
}

// global stylesheet (styles.scss)
.text-color {
    color: red;
}

[Demo] - Not yet


License

MIT © iabu94

Package Sidebar

Install

npm i ngx-simple-typewriter

Weekly Downloads

2

Version

0.0.6

License

MIT

Unpacked Size

19.3 kB

Total Files

10

Last publish

Collaborators

  • iabu94