lbd

UI Components for Angular

Usage no npm install needed!

<script type="module">
  import lbd from 'https://cdn.skypack.dev/lbd';
</script>

README

LBD

UI Components for Angular

Installation

Use the package manager npm to install lbd component library.

npm install lbd

Setup

Import the prebuilt cdk overlay styles in your global stylesheet:

@import '~@angular/cdk/overlay-prebuilt.css';

Toast

...
import { ToastModule } from 'lbd';

@NgModule({
  imports: [
    ...
    ToastModule.forRoot() // pass your global toast configuration here
  ],
  ...
})
import { ToastService } from 'lbd';


@Component({...})
export class SampleComponent {
  constructor(private toastService: ToastService) {}

  showToast() {
    this.toastService.show({
      text: 'Your text',
      type: 'success' // warning, error, info
    });
  }
}
// default configuration:
position: {
    top: 10,
    right: 5,
},
size: {
    width: 350
},
animation: {
    fadeOut: 120,
    fadeIn: 120,
},
color: {
    success: '#51a351',
    error: '#bd362f',
    warning: '#e38705',
    info: '#2f96b4',
},
showProgress: true

License

MIT