ng-dimmer — An Angular overlay library.

Kamal Dev
1 min readDec 27, 2017

--

I always wanted to publish something to the npm, but I wasn’t happening. When I created the dimmer (inspired by https://semantic-ui.com/modules/dimmer.html) component for my angular project, I thought this is it. I can publish this very simple component as angular library.

But there is no official documentation about how to create an angular library. I googled and found few blog post and articles but it is to much from gulp, webpack to rollup. Too many configuration :-(

I need something simple. I found ng-packagr and Yeoman generator generator-angular2-library.

ng-packagr is good but have to read all the doc before I create anything. I need something instant and generator-angular2-library was that which helped me publish my first npm package ng-dimmer.

ng-dimmer is a very small and simple library. It has only one component dimmer.

<dimmer [txColor]=”’#fff’” [bgColor]=”’red’” [bgOpacity]=”’0.7'”>

All the attributes are optional.

It will overlay only the area that its parent element occupies. You can find an working example here https://ng-dimmer.stackblitz.io and install from https://www.npmjs.com/package/ng-dimmer.

--

--

Kamal Dev

A creature belong to the group of higher primates who is social to machine than other primate.