NG Kit

Spinner

A thin wrapper around the Angular Material progress spinner. Provides a simple way to customize size, color, and stroke width, with an optional Bootstrap spinner fallback.

Overview

Import SpinnerComponent and drop the <spinner> element into any standalone component. By default bootstrapSpinner is true, which renders a Bootstrap spinner (requires Bootstrap CSS). Set bootstrapSpinner to false to render the Angular Material mat-spinner instead, then tune it with diameter, color, and strokeWidth.

  • Tree-shakable: only the imported features are included in your bundle.
  • Fully configurable for size, color, and stroke width.
  • Follows Angular Material and WCAG accessibility best practices with semantic markup and ARIA attributes.

API

Selectors

spinner, lib-spinner

Inputs

NameTypeDefaultDescription
bootstrapSpinnerbooleantrueUse the Bootstrap spinner when true, otherwise the Angular Material spinner
diameternumber50Diameter of the Material spinner (px)
colorThemePalette'primary'Color of the Material spinner ('primary', 'accent', 'warn')
strokeWidthnumber5Stroke width of the Material spinner

Set bootstrapSpinner to false to use the Angular Material spinner. The Bootstrap variant requires Bootstrap CSS to be present in your application.