namitoyokota / ngx-notation-reveal

Angular component to add rough notation animation when element is visible.

Home Page:https://notation-reveal.namitoyokota.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Notation Reveal

GitHub License NPM Version NPM Downloads

Notation Reveal is an Angular component to add the Rough Notation animation when element scrolls into view.

Demo

Demo Gif

View the live demo or CodeSandbox!

Installation

Install using a package manager:

npm i ngx-notation-reveal

or

yarn add ngx-notation-reveal

Usage

First, import the module.

import { NotationRevealModule } from 'ngx-notation-reveal';

@NgModule({
    imports: [NotationRevealModule],
})
export class AppModule {}

Next, set up a config property. You can read all annotation types on Rough Notation's official documentation.

readonly underline = {
    type: 'underline',
    color: '#F38181',
} as RoughAnnotationConfig;

Lastly, add component in the HTML.

<notation-reveal [config]="underline">This sentence will be underlined.</notation-reveal>

Directives

Optionally, override the reset flag to avoid re-animations.

<notation-reveal [reset]="false"></notation-reveal>

Delay, set to 1000 milliseconds (1 second) by default, can also be overridden.

<notation-reveal [delay]="5000"></notation-reveal>

License

MIT © Namito Yokota

About

Angular component to add rough notation animation when element is visible.

https://notation-reveal.namitoyokota.com

License:MIT License


Languages

Language:HTML 49.0%Language:TypeScript 37.4%Language:SCSS 13.6%