Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng-loaders

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-loaders

Angular component to add CSS loaders to your application

  • 5.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
117
decreased by-46.33%
Maintainers
1
Weekly downloads
 
Created
Source

ng-loaders Package

Install the package with the following command:

npm install ng-loaders

Setting the spinnerType

You can change the spinner that displays by setting the spinnerType input on the component. The color is changed by updating the --spinnerColor CSS variable.

Set the Default spinnerType

The library uses an InjectionToken to set the default spinnerType. This makes it so you don't have to provide the spinnerType input on every ngx-loader component. You can set the default spinnerType in your root module or root app component like so:

providers: [
	{
		provide: NG_LOADERS_CONFIG,
		useFactory: () => ({ spinnerType: 'rotating-dots' }),
	}
],

Styling the Loader

You can style the loader with a couple of CSS variables. The loader's color can be set with the --spinnerColor CSS variable. You can set the loader's overlay background color with the --spinnerOverlayColor CSS variable. You can set the loader's overlay opacity with the --spinnerOverlayOpacity CSS variable.

Keywords

FAQs

Package last updated on 17 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc