Skip to content

mouadennaciri/angular-blurhash

Repository files navigation

Angular binding for BlurHash.

Installation

npm install angular-blurhash

Usage

Import AngularBlurhashModule in your root module

import { AngularBlurhashModule } from 'angular-blurhash';

@NgModule({
  imports: [AngularBlurhashModule]
})

Add AngularBlurhash component in the template

<angular-blurhash [hash]="hash"
                  [URL]="URL"
                  [width]="width"
                  [height]="height"
                  [alt]="alt">
</angular-blurhash>

Inputs

Name type Description
hash string BlurHash string
URL string Image URL
width number CSS width
height number CSS height
alt string Optional alt attribute