๐Ÿš€ Groupix Spinner

September 2, 2025 ยท View on GitHub

NPM Downloads
NPM Type Definitions
NPM License
Bundle Size

โšก A lightweight Angular spinner library for seamless loading animations


๐ŸŽฏ Features

โœ”๏ธ Easy to integrate
โœ”๏ธ Lightweight and fast performance
โœ”๏ธ Customizable ball count (3-9 balls)
โœ”๏ธ Multiple size options (sm, m, l, xl, xxl)


๐Ÿ“ฆ Installation

Install the package using NPM:

npm install @groupix/groupix-spinner --save

๐Ÿš€ Usage

1๏ธโƒฃ Import the module in app.module.ts

import { GroupixSpinnerModule } from '@groupix/groupix-spinner';

@NgModule({
  declarations: [AppComponent],
  imports: [GroupixSpinnerModule],
  bootstrap: [AppComponent]
})
export class AppModule {}

2๏ธโƒฃ Add the spinner component to your template

<!-- Basic usage -->
<groupix-spinner></groupix-spinner>

<!-- With custom properties -->
<groupix-spinner 
  [ballCount]="5"
  size="xl">
</groupix-spinner>

โš™๏ธ Configuration Options

PropertyTypeDefaultDescription
ballCountnumber3Number of bouncing balls (3-9)
size'sm' | 'm' | 'l' | 'xl' | 'xxl''l'Size of the balls

๐Ÿ“ Size Options

Choose the perfect size for your spinner! Each size is optimized for different use cases:

๐Ÿ”ธ Available Sizes

SizeDimensionsBest ForExample
`sm$20 \times 20\text{px}\text{Small} \text{buttons}, \text{inline} \text{loading}$`
`m$30 \times 30\text{px}\text{Form} \text{inputs}, \text{compact} \text{spaces}$`
`l$40 \times 40\text{px}\text{Default} - \text{General} \text{purpose}$`
`xl$50 \times 50\text{px}\text{Page} \text{loading}, \text{prominent} \text{areas}$`
`xxl$60 \times 60\text{px}\text{Full}-\text{screen} \text{loading}, \text{hero} \text{sections}$`

๐ŸŽจ Size Examples

<!-- Tiny spinner for buttons -->
<button [disabled]="loading">
  <groupix-spinner *ngIf="loading" size="sm" [ballCount]="3"></groupix-spinner>
  {{ loading ? 'Loading...' : 'Submit' }}
</button>

<!-- Medium spinner for cards -->
<div class="card-loading">
  <groupix-spinner size="m" [ballCount]="5"></groupix-spinner>
</div>

<!-- Large spinner for page loading -->
<div class="page-loader">
  <groupix-spinner size="xl" [ballCount]="7"></groupix-spinner>
  <p>Loading your content...</p>
</div>

<!-- Extra large for splash screens -->
<div class="splash-screen">
  <groupix-spinner size="xxl" [ballCount]="9"></groupix-spinner>
</div>

๐Ÿ’ก Size Tips

  • Responsive Design: Use CSS media queries to change sizes on different screens
  • Performance: Smaller sizes with fewer balls load faster
  • Accessibility: Larger sizes are easier to see for users with visual impairments
  • Context: Match the spinner size to the content it's loading

๐ŸŽฎ Live Demo

๐Ÿš€ Check out the live demo: Groupix Spinner Demo


โ“ FAQ

๐Ÿ”น How do I show/hide the spinner dynamically?

Use Angular binding:

<groupix-spinner *ngIf="isLoading"></groupix-spinner>
<button (click)="isLoading = !isLoading">Toggle Spinner</button>

๐Ÿ”น How do I customize the spinner appearance?

You can customize ball count and size:

<!-- Small spinner with 3 balls -->
<groupix-spinner 
  [ballCount]="3"
  size="sm">
</groupix-spinner>

<!-- Large spinner with 7 balls -->
<groupix-spinner 
  [ballCount]="7"
  size="xxl">
</groupix-spinner>

๐Ÿ”น What's the valid range for ball count?

The ball count must be between 3 and 9. Values outside this range will be automatically clamped.


๐Ÿค Contributing

We โค๏ธ contributions! If you have any suggestions or want to improve this library, feel free to open an issue or submit a PR.


๐Ÿ‘จโ€๐Ÿ’ป Created by

Arshdeep Singh

๐Ÿ“ง arsh199820@gmail.com
๐Ÿ’ผ LinkedIn
๐ŸŒ Personal Website


๐Ÿ“„ License

This project is licensed under the MIT License.