npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@softwarity/loading-indicator

v3.0.2

Published

Angular Material 3 expressive loading indicator with smooth morphing animation

Readme

@softwarity/loading-indicator

An Angular component that displays an expressive Material 3 loading indicator with smooth morphing animation between organic shapes.

Live Demo | Release Notes

Features

  • Material 3 Expressive Design - Smooth morphing animation between 7 organic shapes
  • 60fps Animation - Uses requestAnimationFrame for butter-smooth performance
  • Responsive to Theme - Automatically adapts to light/dark color schemes
  • Customizable Size - Adjustable diameter from small to large
  • Optional Container - Circular background for better visibility
  • Material 3 Ready - Uses M3 design tokens for theming (--mat-sys-*)
  • Standalone Component - Easy to import in any Angular 21+ application
  • Lightweight - Pure SVG animation, no external dependencies

Installation

npm install @softwarity/loading-indicator

Peer Dependencies

| Package | Version | |---------|---------| | @angular/core | >= 21.0.0 |

Usage

Import the component in your standalone component:

import { LoadingIndicatorComponent } from '@softwarity/loading-indicator';

@Component({
  selector: 'app-my-component',
  imports: [LoadingIndicatorComponent],
  template: `...`
})
export class MyComponent {}

Add the loading-indicator component in your template:

<!-- Basic usage -->
<loading-indicator />

<!-- With custom diameter -->
<loading-indicator [diameter]="96" />

<!-- With container background -->
<loading-indicator withContainer />

<!-- Combined -->
<loading-indicator [diameter]="64" withContainer />

API

Inputs

| Input | Type | Default | Description | |-------|------|---------|-------------| | diameter | number | 48 | Size of the loading indicator in pixels | | withContainer | boolean | false | When true, displays a circular background container behind the shape |

Theming (Material 3)

The component provides a SCSS mixin to customize the colors. This approach follows Angular Material's theming pattern.

Setup

In your application's styles.scss, import the theme file and call the overrides mixin:

@use '@angular/material' as mat;
@use '@softwarity/loading-indicator/loading-indicator-theme' as loading-indicator;

// Your Material 3 theme
html {
  @include mat.theme((
    color: (
      primary: mat.$violet-palette,
      tertiary: mat.$yellow-palette
    )
  ));

  // Optional: customize loading indicator colors
  // @include loading-indicator.overrides();
}

Customization

The overrides mixin accepts a map of tokens to customize the appearance:

| Token | Default | Description | |-------|---------|-------------| | background-color | var(--mat-sys-primary-container) | Background color when withContainer is true | | shape-color | var(--mat-sys-on-secondary-container) | Color of the animated shape |

Examples

// Customize colors with light/dark support
@include loading-indicator.overrides((
  background-color: light-dark(#e8def8, #4a4458),
  shape-color: light-dark(#6750a4, #ccc2dc)
));

// Use Material 3 system colors
@include loading-indicator.overrides((
  background-color: var(--mat-sys-tertiary-container),
  shape-color: var(--mat-sys-on-tertiary-container)
));

// Custom brand colors
@include loading-indicator.overrides((
  shape-color: #ff5722
));

Examples

Centered Overlay

<div class="loading-overlay">
  <loading-indicator [diameter]="64" withContainer />
</div>

Inline Button Loading

<button [disabled]="isLoading">
  @if (isLoading) {
    <loading-indicator [diameter]="24" />
  } @else {
    Submit
  }
</button>

Content Placeholder

@if (isLoading) {
  <loading-indicator [diameter]="48" />
} @else {
  <app-content />
}

With Deferred Loading

@defer (on idle) {
  <app-heavy-component />
} @placeholder (minimum 500ms) {
  <loading-indicator [diameter]="64" withContainer />
}

License

MIT